summaryrefslogtreecommitdiff
path: root/test/integration/test-apt-update-expected-size
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2014-10-19 14:14:37 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2014-10-20 10:37:46 +0200
commit1df24acfdb8ba1cd8bbbaa166f170dda480ce41e (patch)
tree992b2cc2f5f02a34a49b5bac160070ec30cf34b1 /test/integration/test-apt-update-expected-size
parentcecc5532b8d64394a8f8641e78f4a0cc5f7a51fc (diff)
check for failure message in testsuccess/failure
These functions check the exit code of the command, but for apt commands we can go further and require an error message for non-zero exits and none for zero exits. Git-Dch: Ignore
Diffstat (limited to 'test/integration/test-apt-update-expected-size')
-rwxr-xr-xtest/integration/test-apt-update-expected-size8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/integration/test-apt-update-expected-size b/test/integration/test-apt-update-expected-size
index b71853406..2acf56961 100755
--- a/test/integration/test-apt-update-expected-size
+++ b/test/integration/test-apt-update-expected-size
@@ -15,16 +15,16 @@ changetowebserver
# normal update works fine
testsuccess aptget update
-# make InRelease really big
+# make InRelease really big to trigger fallback
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 Apt::Get::List-Cleanup=0 -o acquire::MaxReleaseFileSize=$((1*1000*1000)) -o Debug::pkgAcquire::worker=0 > output.log
+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'
-if grep -q "Writing more data than expected" output.log; then
+if grep -q "Writing more data than expected" rootdir/tmp/testsuccess.output; then
msgpass
else
- cat output.log
+ cat rootdir/tmp/testsuccess.output
msgfail
fi
# ensure the failed InRelease file got renamed