rm $APTARCHIVE/dists/unstable/Release.gpg
avoid_ims_hit
- # update works
- testsuccess aptget update -o Debug::Acquire::Transaction=1
+ # update fails
+ testequal "E: The repository 'file: unstable Release.gpg' is no longer signed." aptget update -qq
# test that we can install the new packages but do no longer have a sig
testsuccess aptget install old -s
- testsuccess aptget install new -s
- testfailure ls $ROOTDIR/var/lib/apt/lists/*_InRelease
- testfailure ls $ROOTDIR/var/lib/apt/lists/*_Release.gpg
- testsuccess ls $ROOTDIR/var/lib/apt/lists/*_Release
+ testfailure aptget install new -s
+ testsuccess ls $ROOTDIR/var/lib/apt/lists/*_InRelease
+ testfailure ls $ROOTDIR/var/lib/apt/lists/*_Release
}
test_inreleae_to_release_reverts_all() {
break_repository_sources_index
# ensure error
- testequal "W: Failed to fetch file:$APTARCHIVE/dists/unstable/main/source/Sources Hash Sum mismatch
-
-E: Some index files failed to download. They have been ignored, or old ones used instead." aptget update -qq # -o Debug::acquire::transaction=1
+ testequal "E: The repository 'file: unstable Release.gpg' is no longer signed." aptget update -qq # -o Debug::acquire::transaction=1
# ensure that the Packages file is also rolled back
testsuccess aptget install old -s
test_unauthenticated_to_invalid_inrelease() {
msgmsg "Test UnAuthenticated to invalid InRelease reverts everything"
create_fresh_archive
+ rm -rf rootdir/var/lib/apt/lists/*
rm $APTARCHIVE/dists/unstable/InRelease
rm $APTARCHIVE/dists/unstable/Release.gpg
avoid_ims_hit
- testsuccess aptget update -qq
+ testsuccess aptget update -qq --allow-insecure-repositories
testequal "WARNING: The following packages cannot be authenticated!
old
E: There are problems and -y was used without --force-yes" aptget install -qq -y old
# going from Release/Release.gpg -> InRelease and vice versa
# - unauthenticated -> invalid InRelease
+# stuff to do:
+# - ims-hit
+# - gzip-index tests
+
test_inrelease_to_new_inrelease
test_inrelease_to_broken_hash_reverts_all
test_inreleae_to_valid_release