summaryrefslogtreecommitdiff
path: root/test/integration
diff options
context:
space:
mode:
authorMichael Vogt <mvo@ubuntu.com>2014-04-04 17:09:43 +0200
committerMichael Vogt <mvo@ubuntu.com>2014-04-04 17:09:43 +0200
commit53ba4e2c2dd29758be0a911489ca5c23e5107513 (patch)
tree1c01eba553ca6e2deda76be16a26a02ca6ffa4b0 /test/integration
parent215b0faf7b00f836e54f9903c4fe7398c0927e0f (diff)
ensure clean works
Diffstat (limited to 'test/integration')
-rwxr-xr-xtest/integration/test-apt-ftparchive-cachedb7
-rwxr-xr-xtest/integration/test-apt-ftparchive-src-cachedb6
2 files changed, 13 insertions, 0 deletions
diff --git a/test/integration/test-apt-ftparchive-cachedb b/test/integration/test-apt-ftparchive-cachedb
index 2a3bfce99..147272a2c 100755
--- a/test/integration/test-apt-ftparchive-cachedb
+++ b/test/integration/test-apt-ftparchive-cachedb
@@ -91,3 +91,10 @@ ensure_correct_contents_file
testequal " Misses in Cache: 0
dists/test/Contents-i386: New 402 B Misses in Cache: 0" grep Misses stats-out.txt
+# and clean
+rm -rf aptarchive/pool/main/*
+testequal "packages-main-i386.db" aptftparchive clean ftparchive.conf
+aptftparchive clean ftparchive.conf -o Debug::APT::FTPArchive::Clean=1 > clean-out.txt 2>&1
+testequal "0 Number of unique keys in the tree" grep unique clean-out.txt
+testequal "packages-main-i386.db" grep packages-main-i386.db clean-out.txt
+
diff --git a/test/integration/test-apt-ftparchive-src-cachedb b/test/integration/test-apt-ftparchive-src-cachedb
index 3a5507c21..9cc0a98de 100755
--- a/test/integration/test-apt-ftparchive-src-cachedb
+++ b/test/integration/test-apt-ftparchive-src-cachedb
@@ -159,4 +159,10 @@ dd if=/dev/zero of="aptarchive/pool/invalid/toobig_1.0.dsc" bs=1k count=129 2>/d
testequal "
E: DSC file 'aptarchive/pool/invalid/toobig_1.0.dsc' is too large!" aptftparchive sources aptarchive/pool/invalid
+# ensure clean works
+rm -f aptarchive/pool/main/*
+aptftparchive clean apt-ftparchive.conf -o Debug::APT::FTPArchive::Clean=1 > clean-out.txt 2>&1
+testequal "0 Number of unique keys in the tree" grep unique clean-out.txt
+testequal "sources-main.db" grep sources-main.db clean-out.txt
+