summaryrefslogtreecommitdiff
path: root/test/integration
diff options
context:
space:
mode:
Diffstat (limited to 'test/integration')
-rwxr-xr-xtest/integration/test-apt-acquire-additional-files15
-rwxr-xr-xtest/integration/test-pdiff-usage24
2 files changed, 29 insertions, 10 deletions
diff --git a/test/integration/test-apt-acquire-additional-files b/test/integration/test-apt-acquire-additional-files
index cd2f3c559..e9bbdbce6 100755
--- a/test/integration/test-apt-acquire-additional-files
+++ b/test/integration/test-apt-acquire-additional-files
@@ -63,6 +63,21 @@ testequal "'http://localhost:${APTHTTPPORT}/dists/unstable/InRelease' localhost:
'http://localhost:${APTHTTPPORT}/dists/unstable/main/Contents-amd64.xz' localhost:${APTHTTPPORT}_dists_unstable_main_Contents-amd64 0
'http://localhost:${APTHTTPPORT}/dists/unstable/main/Contents-all.xz' localhost:${APTHTTPPORT}_dists_unstable_main_Contents-all 0 " aptget update --print-uris
+# apt believes the Contents files we faked are good
+testsuccessequal "Hit:1 http://localhost:${APTHTTPPORT} unstable InRelease
+Reading package lists..." aptget update
+testequal "$(readfile Contents-amd64.gz Contents-all.gz)" aptget indextargets --format '$(FILENAME)' 'Created-By: Contents'
+
+find rootdir/var/lib/apt/lists -name '*Contents*' -delete
+
+testequal "'http://localhost:${APTHTTPPORT}/dists/unstable/InRelease' localhost:${APTHTTPPORT}_dists_unstable_InRelease 0
+'http://localhost:${APTHTTPPORT}/dists/unstable/main/source/Sources.xz' localhost:${APTHTTPPORT}_dists_unstable_main_source_Sources 0
+'http://localhost:${APTHTTPPORT}/dists/unstable/main/binary-amd64/Packages.xz' localhost:${APTHTTPPORT}_dists_unstable_main_binary-amd64_Packages 0
+'http://localhost:${APTHTTPPORT}/dists/unstable/main/binary-all/Packages.xz' localhost:${APTHTTPPORT}_dists_unstable_main_binary-all_Packages 0
+'http://localhost:${APTHTTPPORT}/dists/unstable/main/i18n/Translation-en.xz' localhost:${APTHTTPPORT}_dists_unstable_main_i18n_Translation-en 0
+'http://localhost:${APTHTTPPORT}/dists/unstable/main/Contents-amd64.xz' localhost:${APTHTTPPORT}_dists_unstable_main_Contents-amd64 0
+'http://localhost:${APTHTTPPORT}/dists/unstable/main/Contents-all.xz' localhost:${APTHTTPPORT}_dists_unstable_main_Contents-all 0 " aptget update --print-uris
+
testsuccessequal "Hit:1 http://localhost:${APTHTTPPORT} unstable InRelease
Get:2 http://localhost:${APTHTTPPORT} unstable/main amd64 Contents [$(stat -c%s aptarchive/dists/unstable/main/Contents-amd64.gz) B]
Get:3 http://localhost:${APTHTTPPORT} unstable/main all Contents [$(stat -c%s aptarchive/dists/unstable/main/Contents-all.gz) B]
diff --git a/test/integration/test-pdiff-usage b/test/integration/test-pdiff-usage
index f451e0558..547242cad 100755
--- a/test/integration/test-pdiff-usage
+++ b/test/integration/test-pdiff-usage
@@ -15,7 +15,7 @@ changetowebserver -o aptwebserver::support::modified-since=false
PKGFILE="${TESTDIR}/$(echo "$(basename $0)" | sed 's#^test-#Packages-#')"
wasmergeused() {
- testsuccess aptget update "$@"
+ testsuccess apt update "$@"
msgtest 'No intermediate patch files' 'still exist'
local EDS="$(find rootdir/var/lib/apt/lists -name '*.ed' -o -name '*.ed.*')"
@@ -42,6 +42,7 @@ wasmergeused() {
}
testrun() {
+ configcompression '.' 'xz'
msgmsg "Testcase: setup the base with: $*"
local DOWNLOADHASH=true
if [ "$1" = 'nohash' ]; then DOWNLOADHASH=false; shift; fi
@@ -56,8 +57,10 @@ testrun() {
testnopackage newstuff
testsuccessequal "$(cat "${PKGFILE}")
" aptcache show apt oldstuff
+ configcompression '.' 'gz'
msgmsg "Testcase: apply with one patch: $*"
+ find aptarchive -name 'Packages*' -type f -delete
cp "${PKGFILE}-new" aptarchive/Packages
compressfile 'aptarchive/Packages'
mkdir -p aptarchive/Packages.diff
@@ -194,9 +197,9 @@ SHA256-Download:
cat "$PATCHFILE" | gzip > "${PATCHFILE}.gz"
generatereleasefiles '+1hour'
signreleasefiles
- testsuccess aptget update "$@"
- cp -f rootdir/tmp/testsuccess.output rootdir/tmp/aptgetupdate.output
- testsuccess grep 'Hash Sum mismatch' rootdir/tmp/aptgetupdate.output
+ testsuccess apt update "$@"
+ cp -f rootdir/tmp/testsuccess.output rootdir/tmp/aptupdate.output
+ testsuccess grep 'Hash Sum mismatch' rootdir/tmp/aptupdate.output
testnopackage oldstuff
testsuccessequal "$(cat "${PKGFILE}-new")
" aptcache show apt newstuff
@@ -235,10 +238,9 @@ SHA256-Download:
fi
generatereleasefiles '+1hour'
signreleasefiles
- #find aptarchive -name 'Packages*' -type f -delete
- testsuccess aptget update -o Debug::pkgAcquire::Diffs=1 "$@"
- cp -f rootdir/tmp/testsuccess.output rootdir/tmp/aptgetupdate.output
- testsuccess grep 'bytes (Limit is' rootdir/tmp/aptgetupdate.output
+ testsuccess apt update -o Debug::pkgAcquire::Diffs=1 "$@"
+ cp -f rootdir/tmp/testsuccess.output rootdir/tmp/aptupdate.output
+ testsuccess grep 'bytes (Limit is' rootdir/tmp/aptupdate.output
testnopackage oldstuff
testsuccessequal "$(cat "${PKGFILE}-new")
" aptcache show apt newstuff
@@ -270,5 +272,7 @@ testcase() {
testrun -o Acquire::PDiffs::Merge=1 -o Acquire::ForceHash=SHA256 "$@"
unset -f sha1sum
}
-testcase -o Acquire::GzipIndexes=0
-testcase -o Acquire::GzipIndexes=1
+aptautotest_apt_update() { aptautotest_aptget_update "$@"; testsuccess test -e "rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_Packages"; }
+testcase -o Acquire::IndexTargets::deb::Packages::KeepCompressed=false
+aptautotest_apt_update() { aptautotest_aptget_update "$@"; testsuccess test -e "rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_Packages.gz"; }
+testcase -o Acquire::IndexTargets::deb::Packages::KeepCompressed=true