aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimo Weingärtner <timo@tiwe.de>2018-11-18 16:42:06 +0100
committerTimo Weingärtner <timo@tiwe.de>2018-11-19 21:31:26 +0100
commitbb0c140c38ef26352ad5618ddb4aebb1e184c50d (patch)
tree9bcf09c9dd9eafebd01eef1a7150efe589df6e03
parentcc7b883c67b78021c13df453abeb35d8d9055c35 (diff)
downloadssh-agent-filter-bb0c140c38ef26352ad5618ddb4aebb1e184c50d.tar.gz
tests: describe the asserts
-rwxr-xr-xtests15
1 files 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 () (