confidence_test.sh: Verify that invalid key names get an error

This commit is contained in:
tlimoncelli@stackexchange.com
2015-06-20 20:05:52 +00:00
parent 7c99a8f94c
commit 521d108df9

View File

@@ -447,6 +447,8 @@ assert_file_exists 'keyrings/live/blackbox-files.txt'
assert_line_not_exists 'mistake.txt' 'keyrings/live/blackbox-files.txt' assert_line_not_exists 'mistake.txt' 'keyrings/live/blackbox-files.txt'
assert_file_missing 'mistake.txt.gpg' assert_file_missing 'mistake.txt.gpg'
assert_file_exists 'mistake.txt' 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' PHASE 'Bob enrolls multiple files: multi1.txt and multi2.txt'
echo 'One singular sensation.' >'multi1.txt' echo 'One singular sensation.' >'multi1.txt'
@@ -470,6 +472,19 @@ else
echo 'NOTE: Alice was not able to decrypt secret.txt as expected.' echo 'NOTE: Alice was not able to decrypt secret.txt as expected.'
fi 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. # TODO: Create a new directory. "git clone" the repo into it.
# #