From ae2e049824a78cc97622eae8667744c978431593 Mon Sep 17 00:00:00 2001 From: imacat Date: Mon, 9 Sep 2019 22:35:03 +0800 Subject: [PATCH] Updated 00-signature.t so that it works. --- t/00-signature.t | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/t/00-signature.t b/t/00-signature.t index 1cf917c..c3ec8fa 100755 --- a/t/00-signature.t +++ b/t/00-signature.t @@ -1,17 +1,24 @@ #!/usr/bin/perl + use strict; print "1..1\n"; -if (!-s 'SIGNATURE') { +$ENV{TEST_SIGNATURE} = 1; +if (!$ENV{TEST_SIGNATURE}) { + print "ok 1 # skip Set the environment variable", + " TEST_SIGNATURE to enable this test\n"; +} +elsif (!-s 'SIGNATURE') { print "ok 1 # skip No signature file found\n"; } elsif (!eval { require Module::Signature; 1 }) { print "ok 1 # skip ", - "Next time around, consider install Module::Signature, ", - "so you can verify the integrity of this distribution.\n"; + "Next time around, consider install Module::Signature, ", + "so you can verify the integrity of this distribution.\n"; } -elsif (!eval { require Socket; Socket::inet_aton('pgp.mit.edu') }) { - print "ok 1 # skip Cannot connect to the keyserver\n"; +elsif (!eval { require Socket; Socket::inet_aton('pool.sks-keyservers.net') }) { + print "ok 1 # skip ", + "Cannot connect to the keyserver\n"; } else { (Module::Signature::verify() == Module::Signature::SIGNATURE_OK())