[Rt-commit] rt branch, 5.0/clean-up-gpg-homedir-in-tests, created. rt-5.0.0beta1-2-ga088e93689
? sunnavy
sunnavy at bestpractical.com
Thu May 21 10:59:26 EDT 2020
The branch, 5.0/clean-up-gpg-homedir-in-tests has been created
at a088e936891ca488a74276b75f8f5e6561330891 (commit)
- Log -----------------------------------------------------------------
commit 513fe24d3535901178fb6152945fa14ffcaf0d89
Author: sunnavy <sunnavy at bestpractical.com>
Date: Thu May 21 22:32:59 2020 +0800
Clean up gpg homedir in tests
diff --git a/lib/RT/Test/GnuPG.pm b/lib/RT/Test/GnuPG.pm
index 00f7fba9ce..bf07eea49f 100644
--- a/lib/RT/Test/GnuPG.pm
+++ b/lib/RT/Test/GnuPG.pm
@@ -385,7 +385,7 @@ sub gnupg_version {
sub new_homedir {
my $source = shift;
- my $dir = tempdir();
+ my $dir = tempdir( CLEANUP => 1 );
if ($source) {
opendir my $dh, $source or die $!;
commit a088e936891ca488a74276b75f8f5e6561330891
Author: sunnavy <sunnavy at bestpractical.com>
Date: Thu May 21 22:34:08 2020 +0800
No need to explicitly quit gpg-agent launched in tests any more
Previously we needed this because we had gpg homedir set to a non-temp
path like "t/data/gnupg/keyrings/" in some tests. Since 4126e51357, all
gpg homedirs in tests are temporary, and with 513fe24d35, these temp
dirs will be deleted after tests. When homedirs are deleted, gpg-agent
will quit automatically.
diff --git a/lib/RT/Test/GnuPG.pm b/lib/RT/Test/GnuPG.pm
index bf07eea49f..bb42860675 100644
--- a/lib/RT/Test/GnuPG.pm
+++ b/lib/RT/Test/GnuPG.pm
@@ -402,11 +402,4 @@ sub new_homedir {
return $dir;
}
-END {
- if ( gnupg_version() >= 2 ) {
- system( 'gpgconf', '--homedir', RT->Config->Get('GnuPGOptions')->{homedir}, '--quiet', '--kill', 'gpg-agent' )
- && warn $!;
- }
-}
-
1;
-----------------------------------------------------------------------
More information about the rt-commit
mailing list