summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorGábor Németh <homar@riseup.net>2023-12-15 12:57:54 +0100
committerGábor Németh <homar@riseup.net>2023-12-15 12:57:54 +0100
commitb3a430029360800e1b2cb6dfc385c5182f74fcb8 (patch)
treecfe4b67cd4fadcc1cdfe4c4f7b0ab67db926309d /test
parent6c5384e10aea6585c602cb8fca8c9eea8ff16ba5 (diff)
Test and document 'dist-clean'
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 d05073218..24db45d43 100755
--- a/test/integration/test-apt-get-clean
+++ b/test/integration/test-apt-get-clean
@@ -24,6 +24,9 @@ testsuccess aptget clean -s
# 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
@@ -53,6 +56,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