[Rt-commit] r13776 - in rt/3.8/trunk: .
spang at bestpractical.com
spang at bestpractical.com
Thu Jul 3 15:34:30 EDT 2008
Author: spang
Date: Thu Jul 3 15:34:29 2008
New Revision: 13776
Modified:
rt/3.8/trunk/ (props changed)
rt/3.8/trunk/lib/RT/Test.pm
Log:
r43574 at loki: spang | 2008-07-03 13:16:31 +0100
make import_gnupg_key in Test.pm load keys relocateably
Modified: rt/3.8/trunk/lib/RT/Test.pm
==============================================================================
--- rt/3.8/trunk/lib/RT/Test.pm (original)
+++ rt/3.8/trunk/lib/RT/Test.pm Thu Jul 3 15:34:29 2008
@@ -54,6 +54,7 @@
use Test::More;
use Socket;
use File::Temp;
+use File::Spec;
my $config;
our ($existing_server, $port, $dbname);
my $mailsent;
@@ -609,9 +610,13 @@
$key =~ s/\@/-at-/g;
$key .= ".$type.key";
+
require RT::Crypt::GnuPG;
+ (my $volume, my $directories, my $file) = File::Spec->splitpath($0);
+ my $keys_dir = File::Spec->catdir( File::Spec->curdir(), $directories,
+ File::Spec->updir(), qw(data gnupg keys) );
return RT::Crypt::GnuPG::ImportKey(
- RT::Test->file_content([qw(t data gnupg keys), $key])
+ RT::Test->file_content([$keys_dir, $key])
);
}
More information about the Rt-commit
mailing list