diff options
Diffstat (limited to 'test')
-rwxr-xr-x | test/integration/test-apt-acquire-additional-files | 18 | ||||
-rwxr-xr-x | test/integration/test-compressed-indexes | 2 |
2 files changed, 18 insertions, 2 deletions
diff --git a/test/integration/test-apt-acquire-additional-files b/test/integration/test-apt-acquire-additional-files index 3465c0a16..fecdf30bf 100755 --- a/test/integration/test-apt-acquire-additional-files +++ b/test/integration/test-apt-acquire-additional-files @@ -57,7 +57,23 @@ testequal 'rootdir/var/lib/apt/lists/localhost:8080_dists_unstable_main_Contents testequal "$(readlink -f ./rootdir/var/lib/apt/lists/localhost:8080_dists_unstable_main_Contents-amd64)" aptget files --format '$(FILENAME)' 'Created-By: Contents' testsuccess cmp 'rootdir/var/lib/apt/lists/localhost:8080_dists_unstable_main_Contents-amd64' 'aptarchive/dists/unstable/main/Contents-amd64' -# no automatic uncompress based on the name please, +rm ./rootdir/var/lib/apt/lists/localhost:8080_dists_unstable_main_Contents-amd64 +testempty aptget files --format '$(FILENAME)' 'Created-By: Contents' + +# if we asked for keeping it compressed, keep it +echo 'APT::Acquire::Targets::deb::Contents::KeepCompressed "true";' >> rootdir/etc/apt/apt.conf.d/content-target.conf +testsuccessequal "Hit:1 http://localhost:8080 unstable InRelease +Get:2 http://localhost:8080 unstable/main amd64 Contents [$(stat -c%s aptarchive/dists/unstable/main/Contents-amd64.gz) B] +Reading package lists..." aptget update + +testequal 'rootdir/var/lib/apt/lists/localhost:8080_dists_unstable_main_Contents-amd64.gz' find rootdir/var/lib/apt/lists -name '*Contents*' +testequal "$(readlink -f ./rootdir/var/lib/apt/lists/localhost:8080_dists_unstable_main_Contents-amd64.gz)" aptget files --format '$(FILENAME)' 'Created-By: Contents' +testsuccess cmp 'rootdir/var/lib/apt/lists/localhost:8080_dists_unstable_main_Contents-amd64.gz' 'aptarchive/dists/unstable/main/Contents-amd64.gz' + +rm ./rootdir/var/lib/apt/lists/localhost:8080_dists_unstable_main_Contents-amd64.gz +testempty aptget files --format '$(FILENAME)' 'Created-By: Contents' + +# and no automatic uncompress based on the name please, # only if we downloaded a compressed file, but target was uncompressed cat > rootdir/etc/apt/apt.conf.d/content-target.conf <<EOF APT::Acquire::Targets::deb::Contents { diff --git a/test/integration/test-compressed-indexes b/test/integration/test-compressed-indexes index c6b292baa..b5d6b8ae4 100755 --- a/test/integration/test-compressed-indexes +++ b/test/integration/test-compressed-indexes @@ -60,7 +60,7 @@ testrun() { msgtest 'Check if package is downloadable' cd downloaded testsuccess --nomsg aptget download testpkg - msgtest '\tdeb file is present'; testsuccess --nomsg test -f testpkg_1.0_i386.deb + msgtest 'deb file is present'; testsuccess --nomsg test -f testpkg_1.0_i386.deb rm -f testpkg_1.0_i386.deb cd - >/dev/null testsuccessequal 'Reading package lists... |