]> git.saurik.com Git - apt.git/blobdiff - test/integration/test-apt-update-nofallback
don't try other compressions on hashsum mismatch
[apt.git] / test / integration / test-apt-update-nofallback
index 831fc67eb1c5c96082a3a5a4d2986191d537195b..db4430ea32fdf86943b115d1feb90968f4e61b89 100755 (executable)
@@ -8,6 +8,7 @@ set -e
 
 simulate_mitm_and_inject_evil_package()
 {
+    redatereleasefiles '+1 hour'
     rm -f $APTARCHIVE/dists/unstable/InRelease
     rm -f $APTARCHIVE/dists/unstable/Release.gpg
     inject_evil_package
@@ -31,14 +32,14 @@ EOF
 
 assert_update_is_refused_and_last_good_state_used()
 {
-    testequal "E: The repository 'file: unstable Release.gpg' is no longer signed." aptget update -qq
+    testfailuremsg "E: The repository 'file: unstable Release' is no longer signed." aptget update
 
     assert_repo_is_intact
 }
 
 assert_repo_is_intact()
 {
-    testequal "foo/unstable 2.0 all" apt list -q
+    testsuccessequal "foo/unstable 2.0 all" apt list -q
     testsuccess aptget install -y -s foo
     testfailure aptget install -y evil
     testsuccess aptget source foo --print-uris
@@ -97,7 +98,7 @@ test_from_inrelease_to_unsigned_with_override()
     testwarning aptget update --allow-insecure-repositories \
         -o Acquire::AllowDowngradeToInsecureRepositories=1
     # but that the individual packages are still considered untrusted
-    testequal "WARNING: The following packages cannot be authenticated!
+    testfailureequal "WARNING: The following packages cannot be authenticated!
   evil
 E: There are problems and -y was used without --force-yes" aptget install -qq -y evil
 }
@@ -149,7 +150,7 @@ test_subvert_inrelease()
     # replace InRelease with something else
     mv $APTARCHIVE/dists/unstable/Release $APTARCHIVE/dists/unstable/InRelease
 
-    testequal "W: Failed to fetch file:${APTARCHIVE}/dists/unstable/InRelease  Does not start with a cleartext signature
+    testfailureequal "W: Failed to fetch file:${APTARCHIVE}/dists/unstable/InRelease  Does not start with a cleartext signature
 
 E: Some index files failed to download. They have been ignored, or old ones used instead." aptget update -qq
 
@@ -169,7 +170,7 @@ test_inrelease_to_invalid_inrelease()
     sed -i 's/Codename.*/Codename: evil!'/ $APTARCHIVE/dists/unstable/InRelease
     inject_evil_package
 
-    testequal "W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: file: unstable InRelease: The following signatures were invalid: BADSIG 5A90D141DBAC8DAE Joe Sixpack (APT Testcases Dummy) <joe@example.org>
+    testwarningequal "W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: file: unstable InRelease: The following signatures were invalid: BADSIG 5A90D141DBAC8DAE Joe Sixpack (APT Testcases Dummy) <joe@example.org>
 
 W: Failed to fetch file:${APTARCHIVE}/dists/unstable/InRelease  The following signatures were invalid: BADSIG 5A90D141DBAC8DAE Joe Sixpack (APT Testcases Dummy) <joe@example.org>
 
@@ -193,9 +194,9 @@ test_release_gpg_to_invalid_release_release_gpg()
     echo "Some evil data" >>  $APTARCHIVE/dists/unstable/Release
     inject_evil_package
 
-    testequal "W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: file: unstable Release.gpg: The following signatures were invalid: BADSIG 5A90D141DBAC8DAE Joe Sixpack (APT Testcases Dummy) <joe@example.org>
+    testwarningequal "W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: file: unstable Release: The following signatures were invalid: BADSIG 5A90D141DBAC8DAE Joe Sixpack (APT Testcases Dummy) <joe@example.org>
 
-W: Failed to fetch file:${APTARCHIVE}/dists/unstable/Release.gpg  
+W: Failed to fetch file:${APTARCHIVE}/dists/unstable/Release.gpg  The following signatures were invalid: BADSIG 5A90D141DBAC8DAE Joe Sixpack (APT Testcases Dummy) <joe@example.org>
 
 W: Some index files failed to download. They have been ignored, or old ones used instead." aptget update -qq