]> git.saurik.com Git - apt.git/blobdiff - test/integration/test-apt-update-filesize-mismatch
test-apt-cdrom: Fix for gnupg 2.1.15
[apt.git] / test / integration / test-apt-update-filesize-mismatch
index b484c5161645d36a03a456b7f74a3a426101ee62..9f95906b5ab135d252b313e353a32be4ee208e24 100755 (executable)
@@ -1,8 +1,8 @@
 #!/bin/sh
 set -e
 
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
 setupenvironment
 configarchitecture 'i386'
 configcompression 'gz'
@@ -38,16 +38,11 @@ for get in $(sed -n 's#^GET /\([^ ]\+\.gz\) HTTP.\+$#\1#p' aptarchive/webserver.
                done
                signreleasefiles
 
-               TEST='testfailure'
-               if expr match "$COMPRESSFILE" '^.*Translation-.*$' >/dev/null; then
-                       TEST='testsuccess'
-                       unset COMPRESSFILE
-               fi
-               $TEST aptget update -o Debug::pkgAcquire::Worker=1
-               cp rootdir/tmp/${TEST}.output rootdir/tmp/update.output
-               testsuccess grep -E "$(basename -s '.gz' "$COMPRESSFILE").*Hash Sum mismatch" rootdir/tmp/update.output
-               $TEST aptcache show foo
-               $TEST aptget install foo -s
+               testfailure aptget update -o Debug::pkgAcquire::Worker=1
+               cp rootdir/tmp/testfailure.output rootdir/tmp/update.output
+               testsuccess grep -E "$(basename "$COMPRESSFILE" '.gz').*Hash Sum mismatch" rootdir/tmp/update.output
+               testfailure aptcache show foo
+               testfailure aptget install foo -s
 
                testfailure aptcache show bar
                testfailure aptget install bar -s