summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2021-03-06 16:11:34 +0100
committerDavid Kalnischkies <david@kalnischkies.de>2021-03-07 02:55:07 +0100
commit2a81f98b124d8fe551b160df55db1d3bf79a77c1 (patch)
tree24a6bc2a81d4b3d7ab716a1f5fd7acb619f0e528 /test
parent59933938f51105066161a6eb88253006826336a2 (diff)
Ensure all index files sent custom tags to the methods
The mirror method can distribute requests for files based on various metadata bits, but some – the main index files – weren't actually passing those on to the methods as advertised in the manpage. This is hidden both by mirror usually falling back to other sources which will eventually hit the right one and that if the repository does not support by-hash apt will automatically stick to the mirror which was used for the Release file.
Diffstat (limited to 'test')
-rwxr-xr-xtest/integration/test-method-mirror10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/integration/test-method-mirror b/test/integration/test-method-mirror
index 56c9a10a0..81a5585fd 100755
--- a/test/integration/test-method-mirror
+++ b/test/integration/test-method-mirror
@@ -192,6 +192,16 @@ http://localhost:${APTHTTPPORT}/redirectme type:deb
testfailure apt update
testrundownload 'foo=2'
+msgmsg 'Mirrors can be filtered by' 'by-hash type'
+echo "http://localhost:${APTHTTPPORT}/failure type:foobar priority:1
+http://localhost:${APTHTTPPORT}/redirectme type:index type:deb
+" > aptarchive/mirror.txt
+rm -rf rootdir/var/lib/apt/lists
+testsuccess apt update -o Acquire::By-Hash=force #-o Debug::pkgAcquire::Worker=1
+cp rootdir/tmp/testsuccess.output forcedbyhash.output
+testfailure grep "localhost:${APTHTTPPORT}/failure" forcedbyhash.output
+testrundownload 'foo=2'
+
msgmsg 'The prefix for the mirrorlist is' 'passed on'
echo 'Dir::Bin::Methods::foo+mirror+file "mirror";
Dir::Bin::Methods::foo+mirror+http "mirror";