use constant KEYID => '34B22806';
use constant EMAIL => 'EdwardNG (Key for testing EdwardNG) <edwardng@ieval.ro>';
+use File::Copy qw/cp/;
+use File::Temp qw/tempdir/;
use Test::More tests => 20;
BEGIN { use_ok('App::EdwardNG', qw/import_pubkeys process_message/) };
+
+umask 0077; # GPG doesn't like group-/world-readable homedirs
$ENV{EDWARDNG_DEBUG} = $ENV{TEST_VERBOSE};
-$ENV{EDWARDNG_KEYDIR} = 't/keydir';
+$ENV{EDWARDNG_KEYDIR} = tempdir 'App-EdwardNG-test.XXXX', TMPDIR => 1, CLEANUP => 1;
+cp "t/keydir/$_", $ENV{EDWARDNG_KEYDIR} for qw/pubring.gpg secring.gpg/;
my $contains_pubkey = App::EdwardNG::mp->parse_open('t/data/contains-pubkey');
my @keys = import_pubkeys ($contains_pubkey, App::EdwardNG::mg);