diff options
Diffstat (limited to 'test/integration/test-apt-update-expected-size')
-rwxr-xr-x | test/integration/test-apt-update-expected-size | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/test/integration/test-apt-update-expected-size b/test/integration/test-apt-update-expected-size index 710d05d18..5c73a2396 100755 --- a/test/integration/test-apt-update-expected-size +++ b/test/integration/test-apt-update-expected-size @@ -21,7 +21,7 @@ test_inreleasetoobig() { testsuccess aptget update -o Apt::Get::List-Cleanup=0 -o acquire::MaxReleaseFileSize=$((1*1000*1000)) -o Debug::pkgAcquire::worker=0 msgtest 'Check that the max write warning is triggered' cp rootdir/tmp/testsuccess.output update.output - testsuccess --nomsg grep -q 'Writing more data than expected' update.output + testsuccess --nomsg grep -q 'File is larger than expected' update.output rm -f update.output # ensure the failed InRelease file got renamed testsuccess ls rootdir/var/lib/apt/lists/partial/*InRelease.FAILED @@ -39,7 +39,7 @@ test_packagestoobig() { touch -d '+1hour' "$pkg" done NEW_SIZE="$(stat --printf=%s aptarchive/dists/unstable/main/binary-i386/Packages.gz)" - testfailuremsg "E: Failed to fetch ${1}/dists/unstable/main/binary-i386/Packages.gz Writing more data than expected ($NEW_SIZE > $SIZE) + testfailuremsg "E: Failed to fetch ${1}/dists/unstable/main/binary-i386/Packages.gz File is larger than expected ($NEW_SIZE > $SIZE). Mirror sync in progress? E: Some index files failed to download. They have been ignored, or old ones used instead." aptget update -o Debug::pkgAcquire::Worker=1 -o Debug::Acquire::Transaction=0 testsuccess ls rootdir/var/lib/apt/lists/partial/*Packages*.FAILED testfailure test -e rootdir/var/lib/apt/lists/partial/Old.FAILED @@ -51,29 +51,27 @@ methodtest() { webserverconfig 'aptwebserver::support::last-modified' 'false' "$1" # curl is clever and sees hits here also msgmsg 'Test with' "$1" 'and clean start' - rm -rf rootdir/var/lib/apt/lists rootdir/var/lib/apt/lists.good + rm -rf rootdir/var/lib/apt/lists rootdir/var/lib/apt/lists.good aptarchive/dists + cp -a aptarchive/dists.good aptarchive/dists # normal update works fine testsuccess aptget update touch rootdir/var/lib/apt/lists/partial/Old.FAILED mv rootdir/var/lib/apt/lists rootdir/var/lib/apt/lists.good - # starting fresh works test_inreleasetoobig "$1" rm -rf aptarchive/dists rootdir/var/lib/apt/lists cp -a aptarchive/dists.good aptarchive/dists test_packagestoobig "$1" - rm -rf aptarchive/dists rootdir/var/lib/apt/lists - cp -a aptarchive/dists.good aptarchive/dists msgmsg 'Test with' "$1" 'and existing old data' + rm -rf aptarchive/dists rootdir/var/lib/apt/lists cp -a rootdir/var/lib/apt/lists.good rootdir/var/lib/apt/lists + cp -a aptarchive/dists.good aptarchive/dists test_inreleasetoobig "$1" rm -rf aptarchive/dists rootdir/var/lib/apt/lists cp -a rootdir/var/lib/apt/lists.good rootdir/var/lib/apt/lists cp -a aptarchive/dists.good aptarchive/dists test_packagestoobig "$1" - rm -rf aptarchive/dists - cp -a aptarchive/dists.good aptarchive/dists } changetowebserver |