]> git.saurik.com Git - apt.git/blobdiff - test/integration/test-apt-update-expected-size
fix compile and tests error
[apt.git] / test / integration / test-apt-update-expected-size
index f8ec24dcc39a8f33cf7c80ecf78b597354d42795..a039e9e1cddec217d530a0d0c645d491503942c9 100755 (executable)
@@ -19,7 +19,7 @@ testsuccess aptget update
 mv aptarchive/dists/unstable/InRelease aptarchive/dists/unstable/InRelease.good
 dd if=/dev/zero of=aptarchive/dists/unstable/InRelease bs=1M count=2 2>/dev/null
 touch -d '+1hour' aptarchive/dists/unstable/InRelease
-aptget update  -o acquire::MaxReleaseFileSize=$((1*1000*1000)) -o Debug::pkgAcquire::worker=0 > output.log
+aptget update -o Apt::Get::List-Cleanup=0  -o acquire::MaxReleaseFileSize=$((1*1000*1000)) -o Debug::pkgAcquire::worker=0 > output.log
 msgtest 'Check that the max write warning is triggered'
 if grep -q "Writing more data than expected" output.log; then
     msgpass
@@ -27,15 +27,18 @@ else
     cat output.log
     msgfail
 fi
+# ensure the failed InRelease file got renamed
+testsuccess ls rootdir/var/lib/apt/lists/partial/*InRelease.FAILED
 mv aptarchive/dists/unstable/InRelease.good aptarchive/dists/unstable/InRelease
 
+
 # append junk at the end of the Packages.gz/Packages
 SIZE="$(stat --printf=%s aptarchive/dists/unstable/main/binary-i386/Packages)"
 echo "1234567890" >> aptarchive/dists/unstable/main/binary-i386/Packages.gz
 echo "1234567890" >> aptarchive/dists/unstable/main/binary-i386/Packages
 NEW_SIZE="$(stat --printf=%s aptarchive/dists/unstable/main/binary-i386/Packages)"
 rm -f rootdir/var/lib/apt/lists/localhost*
-testequal "W: Failed to fetch http://localhost:8080/dists/unstable/main/binary-i386/Packages  Writing more data than expected ($NEW_SIZE > $SIZE) [IP: ::1 8080]
+testequal "W: Failed to fetch http://localhost:8080/dists/unstable/main/binary-i386/Packages  Writing more data than expected ($NEW_SIZE > $SIZE)
 
 E: Some index files failed to download. They have been ignored, or old ones used instead." aptget update -qq