summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rwxr-xr-xtest/integration/test-apt-by-hash-update8
-rwxr-xr-xtest/integration/test-apt-get-update-unauth-warning8
-rwxr-xr-xtest/integration/test-apt-update-incomplete-file-mirror5
-rwxr-xr-xtest/integration/test-method-mirror1
4 files changed, 11 insertions, 11 deletions
diff --git a/test/integration/test-apt-by-hash-update b/test/integration/test-apt-by-hash-update
index 65c3766d0..a33eb9117 100755
--- a/test/integration/test-apt-by-hash-update
+++ b/test/integration/test-apt-by-hash-update
@@ -13,6 +13,7 @@ insertpackage 'unstable' 'foo' 'all' '1.0'
insertpackage 'unstable' 'bar' 'i386' '1.0'
setupaptarchive --no-update
+changetowebserver
# make Packages *only* accessible by-hash for this test
makebyhashonly() {
@@ -100,8 +101,7 @@ msgmsg 'Test InRelease by-hash with' 'no fallback'
rm -rf aptarchive/dists
cp -a aptarchive/dists.bak aptarchive/dists
-testfailureequal "Get:1 file:${TMPWORKINGDIRECTORY}/aptarchive unstable InRelease
-Err:1 file:${TMPWORKINGDIRECTORY}/aptarchive unstable InRelease
- File not found - ${TMPWORKINGDIRECTORY}/aptarchive/dists/unstable/by-hash/SHA256/${inrelease_hash} (2: No such file or directory)
+testfailureequal "Err:1 http://localhost:${APTHTTPPORT} unstable InRelease
+ 404 Not Found
Reading package lists...
-E: Failed to fetch file:${TMPWORKINGDIRECTORY}/aptarchive/dists/unstable/InRelease File not found - ${TMPWORKINGDIRECTORY}/aptarchive/dists/unstable/by-hash/SHA256/${inrelease_hash} (2: No such file or directory)" aptget update
+E: Failed to fetch http://localhost:${APTHTTPPORT}/dists/unstable/InRelease 404 Not Found" aptget update
diff --git a/test/integration/test-apt-get-update-unauth-warning b/test/integration/test-apt-get-update-unauth-warning
index 46df14c29..9f252ad9d 100755
--- a/test/integration/test-apt-get-update-unauth-warning
+++ b/test/integration/test-apt-get-update-unauth-warning
@@ -28,9 +28,7 @@ testwarning aptget update --allow-insecure-repositories
rm -rf rootdir/var/lib/apt/lists
find "$APTARCHIVE/dists/unstable" -name '*Release*' -delete
# update without authenticated files leads to warning
-testfailureequal "Get:1 file:$APTARCHIVE unstable InRelease
-Ign:1 file:$APTARCHIVE unstable InRelease
-Get:2 file:$APTARCHIVE unstable Release
+testfailureequal "Ign:1 file:$APTARCHIVE unstable InRelease
Err:2 file:$APTARCHIVE unstable Release
File not found - ${APTARCHIVE}/dists/unstable/Release (2: No such file or directory)
Reading package lists...
@@ -45,9 +43,7 @@ lock
partial' ls rootdir/var/lib/apt/lists
# allow override
-testwarningequal "Get:1 file:$APTARCHIVE unstable InRelease
-Ign:1 file:$APTARCHIVE unstable InRelease
-Get:2 file:$APTARCHIVE unstable Release
+testwarningequal "Ign:1 file:$APTARCHIVE unstable InRelease
Ign:2 file:$APTARCHIVE unstable Release
Get:3 file:$APTARCHIVE unstable/main Sources
Get:4 file:$APTARCHIVE unstable/main i386 Packages
diff --git a/test/integration/test-apt-update-incomplete-file-mirror b/test/integration/test-apt-update-incomplete-file-mirror
index 959ddc1a6..dec9383c9 100755
--- a/test/integration/test-apt-update-incomplete-file-mirror
+++ b/test/integration/test-apt-update-incomplete-file-mirror
@@ -37,6 +37,7 @@ testfailure apt update -o Debug::pkgAcquire::Worker=1
testsuccessequal '4' grep -c -- '- Filesize:' rootdir/tmp/testfailure.output
testsuccessequal '2' grep -c '%0aAlt-Checksum-FileSize-Hash:%20' rootdir/tmp/testfailure.output
+echo 'Acquire::By-Hash "force";' > rootdir/etc/apt/apt.conf.d/99force-by-hash.conf
msgmsg 'Fallback over hashsum errors'
rm -f rootdir/etc/apt/sources.list rootdir/etc/apt/sources.list.d/*
@@ -47,6 +48,8 @@ copy:${TMPWORKINGDIRECTORY}/aptarchive priority:1
file:${TMPWORKINGDIRECTORY}/aptarchive2 priority:2
EOF
testsuccess apt update
+cp -a rootdir/tmp/testsuccess.output aptupdate.log
+testsuccessequal '2' grep -c -- '^Ign:' aptupdate.log
rm -rf rootdir/var/lib/apt/lists
cat > mirror.list <<EOF
@@ -61,3 +64,5 @@ file:${TMPWORKINGDIRECTORY}/aptarchive priority:1
file:${TMPWORKINGDIRECTORY}/aptarchive2 priority:2
EOF
testsuccess apt update
+cp -a rootdir/tmp/testsuccess.output aptupdate.log
+testsuccessequal '1' grep -c -- '^Ign:' aptupdate.log
diff --git a/test/integration/test-method-mirror b/test/integration/test-method-mirror
index 1784e1ecb..79c675455 100755
--- a/test/integration/test-method-mirror
+++ b/test/integration/test-method-mirror
@@ -255,7 +255,6 @@ echo "file:/nonexistent/apt/archive priority:1
http://localhost:${APTHTTPPORT}/redirectme
" > aptarchive/mirror.txt
testsuccessequal "Get:1 foo+file:${APTARCHIVE}/mirror.txt Mirrorlist [$(stat -c%s 'aptarchive/mirror.txt') B]
-Get:2 foo+file:/nonexistent/apt/archive unstable InRelease
Ign:2 foo+file:/nonexistent/apt/archive unstable InRelease
File not found - /nonexistent/apt/archive/dists/unstable/InRelease (2: No such file or directory)
Hit:2 foo+http://localhost:${APTHTTPPORT}/redirectme unstable InRelease