]> git.notmuchmail.org Git - notmuch/commitdiff
tests: move FINGERPRINT definition to add_gnupg_home
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Sat, 20 Apr 2019 17:40:39 +0000 (13:40 -0400)
committerDavid Bremner <david@tethera.net>
Wed, 24 Apr 2019 10:16:46 +0000 (07:16 -0300)
If a test has added a GnuPG homedir, it may well want to know the
fingerprint.  This saves us from having to redefine this magic string
in multiple places when more tests eventually use the GnuPG homedir.

test/T350-crypto.sh
test/test-lib.sh

index 73aa58dee8a8a758974edc0879e43307a4b5c7d8..7b10f434f6d5877b4d4461be7ce7fb0a84ea6934 100755 (executable)
@@ -10,8 +10,6 @@ test_description='PGP/MIME signature verification and decryption'
 ##################################################
 
 add_gnupg_home
 ##################################################
 
 add_gnupg_home
-# Change this if we ship a new test key
-FINGERPRINT="5AEAB11F5E33DCE875DDB75B6D92612D94E46381"
 
 test_begin_subtest "emacs delivery of signed message"
 test_expect_success \
 
 test_begin_subtest "emacs delivery of signed message"
 test_expect_success \
index fca5277dfea3d4e21af869f5d4cf0031f3b8347e..58909ee73b23ffe742ec12d787ea5d1c71734bbb 100644 (file)
@@ -117,6 +117,9 @@ add_gnupg_home ()
        echo debug-quick-random >> "$GNUPGHOME"/gpg.conf
     fi
     echo no-emit-version >> "$GNUPGHOME"/gpg.conf
        echo debug-quick-random >> "$GNUPGHOME"/gpg.conf
     fi
     echo no-emit-version >> "$GNUPGHOME"/gpg.conf
+
+    # Change this if we ship a new test key
+    FINGERPRINT="5AEAB11F5E33DCE875DDB75B6D92612D94E46381"
 }
 
 # Each test should start with something like this, after copyright notices:
 }
 
 # Each test should start with something like this, after copyright notices: