diff options
author | Michael Vogt <mvo@ubuntu.com> | 2014-09-16 21:13:17 +0200 |
---|---|---|
committer | Michael Vogt <mvo@ubuntu.com> | 2014-09-16 21:13:17 +0200 |
commit | 0e510b0f46350480852b22b966601aaae8cef52f (patch) | |
tree | 7ea57eaaff2a4c2301ebf8b37be8f5a45da957ad /test/integration/test-apt-update-unauth | |
parent | dbb3ee2c93ddd161904fd216f3d3e0e435434c6b (diff) | |
parent | 4502ab82b3cc75e2290cecdef1467da3e51d8647 (diff) |
prepare 1.0.8ubuntu3
Diffstat (limited to 'test/integration/test-apt-update-unauth')
-rwxr-xr-x | test/integration/test-apt-update-unauth | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/test/integration/test-apt-update-unauth b/test/integration/test-apt-update-unauth new file mode 100755 index 000000000..13487603c --- /dev/null +++ b/test/integration/test-apt-update-unauth @@ -0,0 +1,48 @@ +#!/bin/sh +# +# Ensure that when going from unauthenticated to authenticated all +# files are checked again +# +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework + +setupenvironment +configarchitecture "i386" + +insertpackage 'unstable' 'foo' 'all' '1.0' +insertsource 'unstable' 'foo' 'all' '1.0' + +setupaptarchive +changetowebserver + +runtest() { + # start unauthenticated + find rootdir/var/lib/apt/lists/ -type f | xargs rm -f + rm -f aptarchive/dists/unstable/*Release* + aptget update -qq + + # become authenticated + generatereleasefiles + signreleasefiles + + # and ensure we do download the data again + msgtest "Check that the data is check when going to authenticated" + if aptget update |grep -q Hit; then + msgfail + else + msgpass + fi +} + +for COMPRESSEDINDEXES in 'false' 'true'; do + echo "Acquire::GzipIndexes \"$COMPRESSEDINDEXES\";" > rootdir/etc/apt/apt.conf.d/compressindexes + if $COMPRESSEDINDEXES; then + msgmsg 'Run tests with GzipIndexes enabled' + else + msgmsg 'Run tests with GzipIndexes disabled' + fi + + runtest +done |