[Pkg-privacy-commits] [msva-perl] 314/356: allow passing keyserver via environment.
Ximin Luo
infinity0 at moszumanska.debian.org
Mon Aug 24 07:42:08 UTC 2015
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch debian
in repository msva-perl.
commit 30999dcfc62c93464e251eaea7da19d97b15652d
Author: David Bremner <bremner at unb.ca>
Date: Sat Mar 19 10:09:01 2011 -0300
allow passing keyserver via environment.
I decided to use MSTEST_KEYSERVER to allow both setting the fallback
keyserver and testing the user environment settings (although this is
not done now).
---
unit-tests/10.keyserver/20.fetch_fpr.t | 3 +++
unit-tests/10.keyserver/20.fetch_uid.t | 3 +++
unit-tests/20.validator/20.remote.t | 4 +++-
3 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/unit-tests/10.keyserver/20.fetch_fpr.t b/unit-tests/10.keyserver/20.fetch_fpr.t
index cbdef5e..e3fa853 100644
--- a/unit-tests/10.keyserver/20.fetch_fpr.t
+++ b/unit-tests/10.keyserver/20.fetch_fpr.t
@@ -5,6 +5,8 @@ use Crypt::Monkeysphere::Keyserver;
use GnuPG::Interface;
use File::Temp qw(tempdir);
+my $keyserver= $ENV{MSTEST_KEYSERVER} || 'hkp://pool.sks-keyservers.net';
+
my $fpr='762B57BB784206AD';
plan tests =>2;
@@ -13,6 +15,7 @@ my $gnupg = new GnuPG::Interface();
$gnupg->options->hash_init(homedir=>$tempdir);
my $ks=new Crypt::Monkeysphere::Keyserver(gnupg=>$gnupg,
+ keyserver=>$keyserver,
loglevel=>'debug');
isa_ok($ks,'Crypt::Monkeysphere::Keyserver');
diff --git a/unit-tests/10.keyserver/20.fetch_uid.t b/unit-tests/10.keyserver/20.fetch_uid.t
index 248cbda..3b8ccf3 100644
--- a/unit-tests/10.keyserver/20.fetch_uid.t
+++ b/unit-tests/10.keyserver/20.fetch_uid.t
@@ -7,6 +7,8 @@ use File::Temp qw(tempdir);
use strict;
+my $keyserver= $ENV{MSTEST_KEYSERVER} || 'hkp://pool.sks-keyservers.net';
+
my $uid='David Bremner <david at tethera.net>';
plan tests =>2;
@@ -15,6 +17,7 @@ my $gnupg = new GnuPG::Interface();
$gnupg->options->hash_init(homedir=>$tempdir);
my $ks=new Crypt::Monkeysphere::Keyserver(gnupg=>$gnupg,
+ keyserver=>$keyserver,
loglevel=>'debug');
isa_ok($ks,'Crypt::Monkeysphere::Keyserver');
diff --git a/unit-tests/20.validator/20.remote.t b/unit-tests/20.validator/20.remote.t
index ecbf91c..21b55be 100644
--- a/unit-tests/20.validator/20.remote.t
+++ b/unit-tests/20.validator/20.remote.t
@@ -11,6 +11,7 @@ use strict;
my $uid='David Bremner <david at tethera.net>';
plan tests =>2;
+my $keyserver= $ENV{MSTEST_KEYSERVER} || 'hkp://pool.sks-keyservers.net';
my $tempdir = tempdir("unitXXXXX", CLEANUP=> 1);
my $gnupg = new GnuPG::Interface();
$gnupg->options->hash_init(homedir=>$tempdir,
@@ -18,7 +19,8 @@ $gnupg->options->hash_init(homedir=>$tempdir,
);
my $validator=new Crypt::Monkeysphere::Validator(gnupg=>$gnupg,
- loglevel=>'debug');
+ keyserver=>$keyserver,
+ loglevel=>'debug');
isa_ok($validator,'Crypt::Monkeysphere::Validator');
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/msva-perl.git
More information about the Pkg-privacy-commits
mailing list