]>
Commit | Line | Data |
---|---|---|
63d0f853 MV |
1 | #!/bin/sh |
2 | set -e | |
3 | ||
4 | TESTDIR=$(readlink -f $(dirname $0)) | |
5 | . $TESTDIR/framework | |
6 | setupenvironment | |
7 | configarchitecture 'amd64' | |
8 | ||
9 | buildsimplenativepackage 'unrelated' 'all' '0.5~squeeze1' 'unstable' | |
10 | ||
11 | setupaptarchive | |
12 | changetowebserver | |
13 | ||
47450dea MV |
14 | runtest() { |
15 | rm -f rootdir/var/lib/apt/lists/localhost* | |
63d0f853 | 16 | |
47450dea MV |
17 | testsuccess aptget update |
18 | ||
19 | # ensure no leftovers in partial | |
20 | testfailure ls "rootdir/var/lib/apt/lists/partial/*" | |
21 | ||
22 | # check that I-M-S header is kept in redirections | |
23 | testequal "Hit http://localhost:8080 unstable InRelease | |
63d0f853 MV |
24 | Hit http://localhost:8080 unstable/main Sources |
25 | Hit http://localhost:8080 unstable/main amd64 Packages | |
26 | Hit http://localhost:8080 unstable/main Translation-en | |
47450dea MV |
27 | Reading package lists..." aptget update -o Debug::pkgAcquire::Worker=0 -o Debug::Acquire::http=0 |
28 | ||
29 | # ensure that we still do a hash check on ims hit | |
30 | msgtest 'Test I-M-S reverify' | |
31 | aptget update -o Debug::pkgAcquire::Auth=1 2>&1 | grep -A1 'RecivedHash:' | grep -q -- '- SHA' && msgpass || msgfail | |
32 | ||
33 | # ensure no leftovers in partial | |
34 | testfailure ls "rootdir/var/lib/apt/lists/partial/*" | |
35 | } | |
36 | ||
37 | runtest | |
63d0f853 | 38 | |
47450dea MV |
39 | echo "Acquire::GzipIndexes "1";" > rootdir/etc/apt/apt.conf.d/02compressindex |
40 | runtest |