tests: move FINGERPRINT definition to add_gnupg_home

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.
This commit is contained in:
Daniel Kahn Gillmor 2019-04-20 13:40:39 -04:00 committed by David Bremner
parent 816633e636
commit 22ec4a36e6
2 changed files with 3 additions and 2 deletions

View file

@ -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_begin_subtest "emacs delivery of signed message"
test_expect_success \ test_expect_success \

View file

@ -117,6 +117,9 @@ add_gnupg_home ()
echo debug-quick-random >> "$GNUPGHOME"/gpg.conf echo debug-quick-random >> "$GNUPGHOME"/gpg.conf
fi fi
echo no-emit-version >> "$GNUPGHOME"/gpg.conf 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: