]>
Commit | Line | Data |
---|---|---|
ca7fd76c MV |
1 | #!/bin/sh |
2 | # | |
3 | # Ensure that when going from unauthenticated to authenticated all | |
4 | # files are checked again | |
5 | # | |
6 | set -e | |
7 | ||
8 | TESTDIR=$(readlink -f $(dirname $0)) | |
9 | . $TESTDIR/framework | |
10 | ||
11 | setupenvironment | |
12 | configarchitecture "i386" | |
13 | ||
14 | insertpackage 'unstable' 'foo' 'all' '1.0' | |
15 | insertsource 'unstable' 'foo' 'all' '1.0' | |
16 | ||
17 | setupaptarchive | |
18 | changetowebserver | |
19 | ||
20 | runtest() { | |
21 | # start unauthenticated | |
22 | find rootdir/var/lib/apt/lists/ -type f | xargs rm -f | |
23 | rm -f aptarchive/dists/unstable/*Release* | |
24 | aptget update -qq | |
25 | ||
26 | # become authenticated | |
27 | generatereleasefiles | |
28 | signreleasefiles | |
29 | ||
30 | # and ensure we do download the data again | |
31 | msgtest "Check that the data is check when going to authenticated" | |
32 | if aptget update |grep -q Hit; then | |
33 | msgfail | |
34 | else | |
35 | msgpass | |
36 | fi | |
37 | } | |
38 | ||
39 | for COMPRESSEDINDEXES in 'false' 'true'; do | |
40 | echo "Acquire::GzipIndexes \"$COMPRESSEDINDEXES\";" > rootdir/etc/apt/apt.conf.d/compressindexes | |
41 | if $COMPRESSEDINDEXES; then | |
42 | msgmsg 'Run tests with GzipIndexes enabled' | |
43 | else | |
44 | msgmsg 'Run tests with GzipIndexes disabled' | |
45 | fi | |
46 | ||
47 | runtest | |
48 | done |