From bb0c140c38ef26352ad5618ddb4aebb1e184c50d Mon Sep 17 00:00:00 2001 From: Timo Weingärtner Date: Sun, 18 Nov 2018 16:42:06 +0100 Subject: tests: describe the asserts --- tests | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/tests b/tests index d47daf1..0e7e1e7 100755 --- a/tests +++ b/tests @@ -57,19 +57,18 @@ produce_filtered_list () ( test_list_filter () { reference_out=$(ssh-add -L | grep ' key0$') - # sanity check: unfiltered shold be different from filtered - assertNotSame "$reference_out" "$(ssh-add -L)" + assertNotSame "sanity check: unfiltered shold be different from filtered" "$reference_out" "$(ssh-add -L)" - assertSame "$reference_out" "$(produce_filtered_list --comment key0)" - assertSame "$reference_out" "$(produce_filtered_list --comment-confirmed key0)" + assertSame "by comment" "$reference_out" "$(produce_filtered_list --comment key0)" + assertSame "by comment, confirmed" "$reference_out" "$(produce_filtered_list --comment-confirmed key0)" key0_md5=$(cut -d\ -f2 "$SHUNIT_TMPDIR/key0.pub" | base64 -d | md5sum - | cut -d\ -f1) - assertSame "$reference_out" "$(produce_filtered_list --fingerprint "$key0_md5")" - assertSame "$reference_out" "$(produce_filtered_list --fingerprint-confirmed "$key0_md5")" + assertSame "by md5 fingerprint" "$reference_out" "$(produce_filtered_list --fingerprint "$key0_md5")" + assertSame "by md5 fingerprint, confirmed" "$reference_out" "$(produce_filtered_list --fingerprint-confirmed "$key0_md5")" key0_base64=$(cut -d\ -f2 "$SHUNIT_TMPDIR/key0.pub") - assertSame "$reference_out" "$(produce_filtered_list --key "$key0_base64")" - assertSame "$reference_out" "$(produce_filtered_list --key-confirmed "$key0_base64")" + assertSame "by base64 encoded key" "$reference_out" "$(produce_filtered_list --key "$key0_base64")" + assertSame "by base64 encoded key, confirmed" "$reference_out" "$(produce_filtered_list --key-confirmed "$key0_base64")" } sign_key_with_key_filtered () ( -- cgit v1.2.3