[PATCH] tests: move FINGERPRINT definition to add_gnupg_home

Tomi Ollila tomi.ollila at iki.fi
Mon Apr 22 12:04:37 PDT 2019


On Sat, Apr 20 2019, Daniel Kahn Gillmor wrote:

> 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 evenutally use the GnuPG homedir.

This change looks good (s/evenutally/eventually/)

> ---
>  test/T350-crypto.sh | 2 --
>  test/test-lib.sh    | 3 +++
>  2 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/test/T350-crypto.sh b/test/T350-crypto.sh
> index 73aa58de..7b10f434 100755
> --- a/test/T350-crypto.sh
> +++ b/test/T350-crypto.sh
> @@ -10,8 +10,6 @@ test_description='PGP/MIME signature verification and decryption'
>  ##################################################
>  
>  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 \
> diff --git a/test/test-lib.sh b/test/test-lib.sh
> index fca5277d..58909ee7 100644
> --- a/test/test-lib.sh
> +++ b/test/test-lib.sh
> @@ -117,6 +117,9 @@ add_gnupg_home ()
>  	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:
> -- 
> 2.20.1
>
> _______________________________________________
> notmuch mailing list
> notmuch at notmuchmail.org
> https://notmuchmail.org/mailman/listinfo/notmuch


More information about the notmuch mailing list