]> git.saurik.com Git - apt.git/blame - test/integration/test-apt-update-unauth
Use _apt as our unprivileged user name
[apt.git] / test / integration / test-apt-update-unauth
CommitLineData
ca7fd76c
MV
1#!/bin/sh
2#
3# Ensure that when going from unauthenticated to authenticated all
4# files are checked again
5#
6set -e
7
8TESTDIR=$(readlink -f $(dirname $0))
9. $TESTDIR/framework
10
11setupenvironment
12configarchitecture "i386"
13
14insertpackage 'unstable' 'foo' 'all' '1.0'
15insertsource 'unstable' 'foo' 'all' '1.0'
16
17setupaptarchive
18changetowebserver
19
20runtest() {
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
39for 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
48done