summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2024-01-08 09:16:51 +0000
committerJulian Andres Klode <jak@debian.org>2024-01-08 09:16:51 +0000
commit86e6eace1d50527b5a2396290acd1db819b13e26 (patch)
tree510b468438d72823eeb06439cddc90ee94a4a75a /test
parent6e43eef9ca8250eb561f2c9af2f4890d674f3911 (diff)
parentb3a430029360800e1b2cb6dfc385c5182f74fcb8 (diff)
Merge branch 'distclean-doc-an-test' into 'main'
Document and test 'distclean' See merge request apt-team/apt!312
Diffstat (limited to 'test')
-rwxr-xr-xtest/integration/test-apt-get-clean9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/integration/test-apt-get-clean b/test/integration/test-apt-get-clean
index 32dd3e852..cb49f9b35 100755
--- a/test/integration/test-apt-get-clean
+++ b/test/integration/test-apt-get-clean
@@ -38,6 +38,9 @@ done
# generate some dirt and clean it up
generatedirt() {
touch rootdir/var/lib/apt/lists/partial/http.debian.net_debian_dists_sid_main_i18n_Translation-en
+ touch rootdir/var/lib/apt/lists/deb.debian.org_debian_dists_sid_InRelease
+ touch rootdir/var/lib/apt/lists/deb.debian.org_debian_dists_sid_main_binary-amd64_Packages
+ touch rootdir/var/lib/apt/lists/deb.debian.org_debian_dists_sid_main_binary-amd64_Packages.diff_Index
mkdir -p rootdir/var/cache/apt/archives/lost+found
touch rootdir/var/cache/apt/archives/foo_1_all.deb
touch rootdir/var/cache/apt/archives/foo_1%3a1_all.deb
@@ -67,6 +70,12 @@ testfailure test -e rootdir/var/cache/apt/archives/foo_2_all.deb
testfailure test -e rootdir/var/cache/apt/archives/foo_3_all.deb
testfailure test -e rootdir/var/cache/apt/archives/foo_4_all.deb
+generatedirt
+testsuccess aptget distclean
+testsuccess test -e rootdir/var/lib/apt/lists/deb.debian.org_debian_dists_sid_InRelease
+testfailure test -e rootdir/var/lib/apt/lists/deb.debian.org_debian_dists_sid_main_binary-amd64_Packages
+testfailure test -e rootdir/var/lib/apt/lists/deb.debian.org_debian_dists_sid_main_binary-amd64_Packages.diff_Index
+
if [ "$(id -u)" != '0' ]; then
msgmsg 'No clean if lock can not be acquired'
touch rootdir/var/cache/apt/archives/foo_4_all.deb