]> git.saurik.com Git - apt.git/blame_incremental - test/integration/test-http-pipeline-messup
add an additional test for arch specific conflicts
[apt.git] / test / integration / test-http-pipeline-messup
... / ...
CommitLineData
1#!/bin/sh
2set -e
3
4TESTDIR=$(readlink -f $(dirname $0))
5. $TESTDIR/framework
6
7setupenvironment
8configarchitecture "i386"
9
10buildsimplenativepackage 'pkga' 'all' '1.0' 'stable'
11buildsimplenativepackage 'pkgb' 'all' '1.0' 'stable'
12buildsimplenativepackage 'pkgc' 'all' '1.0' 'stable'
13buildsimplenativepackage 'pkgd' 'all' '1.0' 'stable'
14
15setupaptarchive --no-update
16
17# simulate (and be a predictable) pipeline mess-up by the server/proxy
18changetowebserver \
19 -o 'aptwebserver::overwrite::.*pkga.*::filename=/pool/pkgd_1.0_all.deb' \
20 -o 'aptwebserver::overwrite::.*pkgc.*::filename=/pool/pkgb_1.0_all.deb' \
21 -o 'aptwebserver::overwrite::.*pkgb.*::filename=/pool/pkgc_1.0_all.deb' \
22 -o 'aptwebserver::overwrite::.*pkgd.*::filename=/pool/pkga_1.0_all.deb'
23
24testsuccess aptget update -o Debug::Acquire::http=1 -o Debug::pkgAcquire::Worker=1
25
26# messup is bigger than pipeline: checks if fixup isn't trying to hard
27testfailure aptget download pkga pkgb pkgc pkgd "$@" -o Acquire::http::Pipeline-Depth=2
28testfailure test -f pkga_1.0_all.deb
29
30# ensure that pipeling is enabled for rest of this test
31echo 'Acquire::http::Pipeline-Depth 10;' > rootdir/etc/apt/apt.conf.d/99enable-pipeline
32
33# the output is a bit strange: it looks like it has downloaded pkga 4 times
34testsuccess aptget download pkga pkgb pkgc pkgd -o Debug::Acquire::http=1 -o Debug::pkgAcquire::Worker=1
35for pkg in 'pkga' 'pkgb' 'pkgc' 'pkgd'; do
36 testsuccess test -f ${pkg}_1.0_all.deb
37 testsuccess cmp incoming/${pkg}_1.0_all.deb ${pkg}_1.0_all.deb
38 rm -f ${pkg}_1.0_all.deb
39done
40
41# while hashes will pass (as none are available), sizes will not match, so failure
42# checks that no hashes means that pipeline depth is ignored as we can't fixup
43testfailure aptget download pkga pkgb pkgc pkgd "$@" --allow-unauthenticated -o Acquire::ForceHash=ROT26