summaryrefslogtreecommitdiff
path: root/test/integration/test-apt-update-rollback
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2014-10-18 22:46:48 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2014-10-20 10:37:46 +0200
commit846bc058cb0c1bf7ce7c2fb30b9c277e96e9eaf7 (patch)
tree294c9726017a5436391d5eda564cae00bb9dc9ca /test/integration/test-apt-update-rollback
parentab25bf1f08ca605d3eb4c05619e8df495ccca30a (diff)
check lists/ content in tests doing rollback
Git-Dch: Ignore
Diffstat (limited to 'test/integration/test-apt-update-rollback')
-rwxr-xr-xtest/integration/test-apt-update-rollback10
1 files changed, 9 insertions, 1 deletions
diff --git a/test/integration/test-apt-update-rollback b/test/integration/test-apt-update-rollback
index 220c3052b..d33411da4 100755
--- a/test/integration/test-apt-update-rollback
+++ b/test/integration/test-apt-update-rollback
@@ -37,6 +37,7 @@ break_repository_sources_index() {
start_with_good_inrelease() {
create_fresh_archive
testsuccess aptget update
+ listcurrentlistsdirectory > lists.before
testequal "old/unstable 1.0 all" apt list -q
}
@@ -63,6 +64,7 @@ test_inrelease_to_broken_hash_reverts_all() {
E: Some index files failed to download. They have been ignored, or old ones used instead." aptget update -qq
# ensure that the Packages file is also rolled back
+ testfileequal lists.before "$(listcurrentlistsdirectory)"
testequal "E: Unable to locate package new" aptget install new -s -qq
}
@@ -78,7 +80,8 @@ test_inrelease_to_valid_release() {
# 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
+ # test that security downgrade was not successful
+ testfileequal lists.before "$(listcurrentlistsdirectory)"
testsuccess aptget install old -s
testfailure aptget install new -s
testsuccess ls $ROOTDIR/var/lib/apt/lists/*_InRelease
@@ -101,6 +104,7 @@ test_inrelease_to_release_reverts_all() {
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
+ testfileequal lists.before "$(listcurrentlistsdirectory)"
testsuccess aptget install old -s
testfailure aptget install new -s
testsuccess ls $ROOTDIR/var/lib/apt/lists/*_InRelease
@@ -114,6 +118,7 @@ test_unauthenticated_to_invalid_inrelease() {
rm $APTARCHIVE/dists/unstable/Release.gpg
testsuccess aptget update --allow-insecure-repositories
+ listcurrentlistsdirectory > lists.before
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
@@ -126,6 +131,7 @@ E: There are problems and -y was used without --force-yes" aptget install -qq -y
E: Some index files failed to download. They have been ignored, or old ones used instead." aptget update -qq
+ testfileequal lists.before "$(listcurrentlistsdirectory)"
testfailure ls rootdir/var/lib/apt/lists/*_InRelease
testequal "WARNING: The following packages cannot be authenticated!
old
@@ -144,6 +150,7 @@ W: Failed to fetch file:$APTARCHIVE/dists/unstable/InRelease The following sign
W: Some index files failed to download. They have been ignored, or old ones used instead." aptget update -qq
+ testfileequal lists.before "$(listcurrentlistsdirectory)"
testsuccess ls rootdir/var/lib/apt/lists/*_InRelease
}
@@ -158,6 +165,7 @@ test_inrelease_to_broken_gzip() {
rm $APTARCHIVE/dists/unstable/main/source/Sources
testfailure aptget update
+ testfileequal lists.before "$(listcurrentlistsdirectory)"
}
TESTDIR=$(readlink -f $(dirname $0))