]> git.notmuchmail.org Git - notmuch/commitdiff
test: simplify user ID handling
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Sat, 4 May 2019 21:33:27 +0000 (17:33 -0400)
committerDavid Bremner <david@tethera.net>
Tue, 7 May 2019 09:42:11 +0000 (06:42 -0300)
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 <dkg@fifthhorseman.net>
test/T350-crypto.sh
test/test-lib.sh

index bd369f8ffaa828fa84fb8b061e8d1a3815b56f50..f31cd3d7be36ab64941c2d0b26880e55203eb955 100755 (executable)
@@ -158,7 +158,7 @@ expected='[[[{"id": "XXXXX",
  "sigstatus": [{"status": "good",
  "fingerprint": "'$FINGERPRINT'",
  "created": 946728000,
- "userid": "Notmuch Test Suite <test_suite@notmuchmail.org> (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 <test_suite@notmuchmail.org> (INSECURE!)"}],
+ "userid": "'"$SELF_USERID"'"}],
  "content-type": "multipart/encrypted",
  "content": [{"id": 2,
  "content-type": "application/pgp-encrypted",
index 04d93f7d07c03dee970716b805dbb8c14cea6134..b89da572e439f57a9c813659b1c7a3c3d8522684 100644 (file)
@@ -120,6 +120,7 @@ add_gnupg_home ()
 
     # Change this if we ship a new test key
     FINGERPRINT="5AEAB11F5E33DCE875DDB75B6D92612D94E46381"
+    SELF_USERID="Notmuch Test Suite <test_suite@notmuchmail.org> (INSECURE!)"
 }
 
 # Each test should start with something like this, after copyright notices: