[Rt-commit] r11865 - in rt/branches/3.8-TESTING/t: mail

ruz at bestpractical.com ruz at bestpractical.com
Wed Apr 23 21:34:42 EDT 2008


Author: ruz
Date: Wed Apr 23 21:34:42 2008
New Revision: 11865

Modified:
   rt/branches/3.8-TESTING/t/mail/crypt-gnupg.t
   rt/branches/3.8-TESTING/t/mail/gnupg-bad.t
   rt/branches/3.8-TESTING/t/mail/gnupg-incoming.t
   rt/branches/3.8-TESTING/t/mail/gnupg-realmail.t
   rt/branches/3.8-TESTING/t/mail/gnupg-reverification.t
   rt/branches/3.8-TESTING/t/web/crypt-gnupg.t
   rt/branches/3.8-TESTING/t/web/gnupg-outgoing.t
   rt/branches/3.8-TESTING/t/web/gnupg-select-keys-on-create.t
   rt/branches/3.8-TESTING/t/web/gnupg-select-keys-on-update.t

Log:
* don't run gpg tests if there is no gpg executable

Modified: rt/branches/3.8-TESTING/t/mail/crypt-gnupg.t
==============================================================================
--- rt/branches/3.8-TESTING/t/mail/crypt-gnupg.t	(original)
+++ rt/branches/3.8-TESTING/t/mail/crypt-gnupg.t	Wed Apr 23 21:34:42 2008
@@ -3,10 +3,14 @@
 use strict;
 use warnings;
 use Test::More;
-eval 'use GnuPG::Interface; 1' or plan skip_all => 'GnuPG required.';
 
-plan tests => 92;
 use RT::Test nodata => 1;
+plan skip_all => 'GnuPG required.'
+    unless eval 'use GnuPG::Interface; 1';
+plan skip_all => 'gpg executable is required.'
+    unless RT::Test->find_executable('gpg');
+
+plan tests => 92;
 
 RT->Config->Set( LogToScreen => 'debug' );
 RT->Config->Set( LogStackTraces => 'error' );

Modified: rt/branches/3.8-TESTING/t/mail/gnupg-bad.t
==============================================================================
--- rt/branches/3.8-TESTING/t/mail/gnupg-bad.t	(original)
+++ rt/branches/3.8-TESTING/t/mail/gnupg-bad.t	Wed Apr 23 21:34:42 2008
@@ -1,8 +1,17 @@
 #!/usr/bin/perl
 use strict;
 use warnings;
-use Test::More tests => 6;
+
+use Test::More;
 use RT::Test;
+
+plan skip_all => 'GnuPG required.'
+    unless eval 'use GnuPG::Interface; 1';
+plan skip_all => 'gpg executable is required.'
+    unless RT::Test->find_executable('gpg');
+
+plan tests => 6;
+
 use Cwd 'getcwd';
 
 my $homedir = File::Spec->catdir( getcwd(), qw(lib t data crypt-gnupg) );

Modified: rt/branches/3.8-TESTING/t/mail/gnupg-incoming.t
==============================================================================
--- rt/branches/3.8-TESTING/t/mail/gnupg-incoming.t	(original)
+++ rt/branches/3.8-TESTING/t/mail/gnupg-incoming.t	Wed Apr 23 21:34:42 2008
@@ -1,8 +1,18 @@
 #!/usr/bin/perl
 use strict;
-use Test::More tests => 46;
-use File::Temp;
+use warnings;
+
+use Test::More;
 use RT::Test;
+
+plan skip_all => 'GnuPG required.'
+    unless eval 'use GnuPG::Interface; 1';
+plan skip_all => 'gpg executable is required.'
+    unless RT::Test->find_executable('gpg');
+
+plan tests => 46;
+
+use File::Temp;
 use Cwd 'getcwd';
 use String::ShellQuote 'shell_quote';
 use IPC::Run3 'run3';

Modified: rt/branches/3.8-TESTING/t/mail/gnupg-realmail.t
==============================================================================
--- rt/branches/3.8-TESTING/t/mail/gnupg-realmail.t	(original)
+++ rt/branches/3.8-TESTING/t/mail/gnupg-realmail.t	Wed Apr 23 21:34:42 2008
@@ -2,9 +2,16 @@
 use strict;
 use warnings;
 
-use Test::More tests => 176;
+use Test::More;
 use RT::Test;
 
+plan skip_all => 'GnuPG required.'
+    unless eval 'use GnuPG::Interface; 1';
+plan skip_all => 'gpg executable is required.'
+    unless RT::Test->find_executable('gpg');
+
+plan tests => 176;
+
 use Digest::MD5 qw(md5_hex);
 
 use File::Temp qw(tempdir);

Modified: rt/branches/3.8-TESTING/t/mail/gnupg-reverification.t
==============================================================================
--- rt/branches/3.8-TESTING/t/mail/gnupg-reverification.t	(original)
+++ rt/branches/3.8-TESTING/t/mail/gnupg-reverification.t	Wed Apr 23 21:34:42 2008
@@ -2,9 +2,16 @@
 use strict;
 use warnings;
 
-use Test::More tests => 111;
+use Test::More;
 use RT::Test;
 
+plan skip_all => 'GnuPG required.'
+    unless eval 'use GnuPG::Interface; 1';
+plan skip_all => 'gpg executable is required.'
+    unless RT::Test->find_executable('gpg');
+
+plan tests => 111;
+
 use File::Temp qw(tempdir);
 my $homedir = tempdir( CLEANUP => 1 );
 

Modified: rt/branches/3.8-TESTING/t/web/crypt-gnupg.t
==============================================================================
--- rt/branches/3.8-TESTING/t/web/crypt-gnupg.t	(original)
+++ rt/branches/3.8-TESTING/t/web/crypt-gnupg.t	Wed Apr 23 21:34:42 2008
@@ -1,8 +1,16 @@
 #!/usr/bin/perl -w
 use strict;
 
-use Test::More tests => 94;
+use Test::More;
 use RT::Test;
+
+plan skip_all => 'GnuPG required.'
+    unless eval 'use GnuPG::Interface; 1';
+plan skip_all => 'gpg executable is required.'
+    unless RT::Test->find_executable('gpg');
+
+plan tests => 94;
+
 use RT::Action::SendEmail;
 
 eval 'use GnuPG::Interface; 1' or plan skip_all => 'GnuPG required.';

Modified: rt/branches/3.8-TESTING/t/web/gnupg-outgoing.t
==============================================================================
--- rt/branches/3.8-TESTING/t/web/gnupg-outgoing.t	(original)
+++ rt/branches/3.8-TESTING/t/web/gnupg-outgoing.t	Wed Apr 23 21:34:42 2008
@@ -2,8 +2,16 @@
 use strict;
 use warnings;
 
-use Test::More tests => 492;
+use Test::More;
 use RT::Test;
+
+plan skip_all => 'GnuPG required.'
+    unless eval 'use GnuPG::Interface; 1';
+plan skip_all => 'gpg executable is required.'
+    unless RT::Test->find_executable('gpg');
+
+plan tests => 492;
+
 use RT::Action::SendEmail;
 use File::Temp qw(tempdir);
 

Modified: rt/branches/3.8-TESTING/t/web/gnupg-select-keys-on-create.t
==============================================================================
--- rt/branches/3.8-TESTING/t/web/gnupg-select-keys-on-create.t	(original)
+++ rt/branches/3.8-TESTING/t/web/gnupg-select-keys-on-create.t	Wed Apr 23 21:34:42 2008
@@ -2,8 +2,16 @@
 use strict;
 use warnings;
 
-use Test::More tests => 60;
+use Test::More;
 use RT::Test;
+
+plan skip_all => 'GnuPG required.'
+    unless eval 'use GnuPG::Interface; 1';
+plan skip_all => 'gpg executable is required.'
+    unless RT::Test->find_executable('gpg');
+
+plan tests => 60;
+
 use RT::Action::SendEmail;
 use File::Temp qw(tempdir);
 

Modified: rt/branches/3.8-TESTING/t/web/gnupg-select-keys-on-update.t
==============================================================================
--- rt/branches/3.8-TESTING/t/web/gnupg-select-keys-on-update.t	(original)
+++ rt/branches/3.8-TESTING/t/web/gnupg-select-keys-on-update.t	Wed Apr 23 21:34:42 2008
@@ -2,8 +2,16 @@
 use strict;
 use warnings;
 
-use Test::More tests => 68;
+use Test::More;
 use RT::Test;
+
+plan skip_all => 'GnuPG required.'
+    unless eval 'use GnuPG::Interface; 1';
+plan skip_all => 'gpg executable is required.'
+    unless RT::Test->find_executable('gpg');
+
+plan tests => 68;
+
 use RT::Action::SendEmail;
 use File::Temp qw(tempdir);
 


More information about the Rt-commit mailing list