NO_META => 1,
NORECURS => 1,
MAN1PODS => {},
- clean => { FILES => 'test_database_check_postgres/', '/tmp/cptesting_socket' },
+ clean => { FILES => 'test_database_check_postgres/ /tmp/cptesting_socket' },
);
{
sub clean {
my $string = shift->SUPER::clean(@_);
$string =~ s{\t}{\tperl t/99_cleanup\.t\n\t};
+ $string .= qq{\nsignature_asc : \n};
+ $string .= qq{\t@ gpg --yes -ba check_postgres.pl\n};
+ $string .= qq{\t@ gpg --verify check_postgres.pl.asc\n};
return $string;
}
}
if (!$ENV{TEST_SIGNATURE} and !$ENV{TEST_EVERYTHING}) {
plan skip_all => 'Set the environment variable TEST_SIGNATURE to enable this test';
}
-plan tests => 1;
+plan tests => 2;
SKIP: {
if ( !-e $sigfile ) {
}
}
}
+
+SKIP: {
+ if (!eval { require Module::Signature; 1 }) {
+ skip ('Must have Module::Signature to test SIGNATURE file', 1);
+ }
+ elsif ( !-e 'SIGNATURE' ) {
+ fail ('SIGNATURE file was not found');
+ }
+ elsif ( ! -s 'SIGNATURE') {
+ fail ('SIGNATURE file was empty');
+ }
+ else {
+ my $ret = Module::Signature::verify();
+ if ($ret eq Module::Signature::SIGNATURE_OK()) {
+ pass ('Valid SIGNATURE file');
+ }
+ else {
+ fail ('Invalid SIGNATURE file');
+ }
+ }
+}