diff --git a/tools/confidence_test.sh b/tools/confidence_test.sh index 8d824f0..10ca5ed 100755 --- a/tools/confidence_test.sh +++ b/tools/confidence_test.sh @@ -447,6 +447,8 @@ assert_file_exists 'keyrings/live/blackbox-files.txt' assert_line_not_exists 'mistake.txt' 'keyrings/live/blackbox-files.txt' assert_file_missing 'mistake.txt.gpg' assert_file_exists 'mistake.txt' +# Now remove 'mistake.txt' to leave the area clean. +rm 'mistake.txt' PHASE 'Bob enrolls multiple files: multi1.txt and multi2.txt' echo 'One singular sensation.' >'multi1.txt' @@ -470,6 +472,19 @@ else echo 'NOTE: Alice was not able to decrypt secret.txt as expected.' fi +PHASE 'Bob returns. Tries to update all files with a corrupt blackbox-admins.txt' +become_bob +# Corrupt the blackbox-admins.txt list: +echo 'abba@notarealuser.com' >> keyrings/live/blackbox-admins.txt +# Make sure it fails. +if blackbox_update_all_files; then + echo '!!!!! blackbox_update_all_files should have failed and it did NOT.' + exit 1 +fi +# Cleanup: +blackbox_removeadmin abba@notarealuser.com + + # TODO: Create a new directory. "git clone" the repo into it. #