summaryrefslogtreecommitdiff
path: root/test/integration/test-apt-ftparchive-src-cachedb
diff options
context:
space:
mode:
authorMichael Vogt <mvo@ubuntu.com>2014-04-07 09:41:20 +0200
committerMichael Vogt <mvo@ubuntu.com>2014-04-07 09:41:20 +0200
commitcf6bbca0a93b21ab7d3378f26dd9b57951a1d987 (patch)
tree5a3efc0cc314ff0171d898b797ea053158bdb485 /test/integration/test-apt-ftparchive-src-cachedb
parent37497bd5fa0f070e12c1c28d849aef1af8f369b5 (diff)
ensure "--db" also works with the new srcpkgdb
Diffstat (limited to 'test/integration/test-apt-ftparchive-src-cachedb')
-rwxr-xr-xtest/integration/test-apt-ftparchive-src-cachedb27
1 files changed, 26 insertions, 1 deletions
diff --git a/test/integration/test-apt-ftparchive-src-cachedb b/test/integration/test-apt-ftparchive-src-cachedb
index 9cc0a98de..1af193632 100755
--- a/test/integration/test-apt-ftparchive-src-cachedb
+++ b/test/integration/test-apt-ftparchive-src-cachedb
@@ -105,6 +105,30 @@ mkdir -p aptarchive/dists/test/main/source/
mkdir aptarchive-overrides
mkdir aptarchive-cache
+
+
+
+# generate with --db option
+(cd aptarchive && aptftparchive --db ./test.db sources pool/main/ \
+ -o APT::FTPArchive::ShowCacheMisses=1 \
+ > dists/test/main/source/Sources \
+ 2> stats-out.txt
+ testequal " Misses in Cache: 2" grep Misses stats-out.txt
+)
+assert_correct_sources_file
+
+# generate with --db option (again to ensure its in the cache)
+(cd aptarchive && aptftparchive --db ./test.db sources pool/main/ \
+ -o APT::FTPArchive::ShowCacheMisses=1 \
+ > dists/test/main/source/Sources \
+ 2> stats-out.txt
+ testequal " Misses in Cache: 0" grep Misses stats-out.txt
+)
+assert_correct_sources_file
+
+
+
+# get ready for the "apt-ftparchive generate" command
cat > apt-ftparchive.conf <<"EOF"
Dir {
ArchiveDir "./aptarchive";
@@ -135,7 +159,6 @@ Tree "dists/test" {
};
EOF
-
# generate (empty cachedb)
aptftparchive generate apt-ftparchive.conf -o APT::FTPArchive::ShowCacheMisses=1 2> stats-out.txt
testequal " Misses in Cache: 2" grep Misses stats-out.txt
@@ -148,6 +171,8 @@ aptftparchive generate apt-ftparchive.conf -o APT::FTPArchive::ShowCacheMisses=1
testequal " Misses in Cache: 0" grep Misses stats-out.txt
assert_correct_sources_file
+
+
# generate invalid files
mkdir aptarchive/pool/invalid
printf "meep" > aptarchive/pool/invalid/invalid_1.0.dsc