From 93e699e5c86bb93b2992f4ab3a15680824b7ee2d Mon Sep 17 00:00:00 2001 From: Daniel Kahn Gillmor Date: Sat, 4 May 2019 17:33:27 -0400 Subject: [PATCH] test: simplify user ID handling The user ID on the self-test is a little bit clunky-looking. It also may end up showing up elsewhere in the test suite. Centralizing the user ID in one place should make it easier to handle if it ever changes, and should make tests easier to read. Signed-off-by: Daniel Kahn Gillmor --- test/T350-crypto.sh | 4 ++-- test/test-lib.sh | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/test/T350-crypto.sh b/test/T350-crypto.sh index bd369f8f..f31cd3d7 100755 --- a/test/T350-crypto.sh +++ b/test/T350-crypto.sh @@ -158,7 +158,7 @@ expected='[[[{"id": "XXXXX", "sigstatus": [{"status": "good", "fingerprint": "'$FINGERPRINT'", "created": 946728000, - "userid": "Notmuch Test Suite (INSECURE!)"}], + "userid": "'"$SELF_USERID"'"}], "content-type": "multipart/signed", "content": [{"id": 2, "content-type": "text/plain", @@ -366,7 +366,7 @@ expected='[[[{"id": "XXXXX", "sigstatus": [{"status": "good", "fingerprint": "'$FINGERPRINT'", "created": 946728000, - "userid": "Notmuch Test Suite (INSECURE!)"}], + "userid": "'"$SELF_USERID"'"}], "content-type": "multipart/encrypted", "content": [{"id": 2, "content-type": "application/pgp-encrypted", diff --git a/test/test-lib.sh b/test/test-lib.sh index 04d93f7d..b89da572 100644 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -120,6 +120,7 @@ add_gnupg_home () # Change this if we ship a new test key FINGERPRINT="5AEAB11F5E33DCE875DDB75B6D92612D94E46381" + SELF_USERID="Notmuch Test Suite (INSECURE!)" } # Each test should start with something like this, after copyright notices: -- 2.43.0