[Catalyst-commits] r9196 - Catalyst-Runtime/5.80/trunk/t

rafl at dev.catalyst.perl.org rafl at dev.catalyst.perl.org
Wed Feb 4 16:42:07 GMT 2009


Author: rafl
Date: 2009-02-04 16:42:07 +0000 (Wed, 04 Feb 2009)
New Revision: 9196

Modified:
   Catalyst-Runtime/5.80/trunk/t/live_fork.t
Log:
Allow testing of forks with Engine::HTTP using $ENV{REMOTE_FORK}.

Modified: Catalyst-Runtime/5.80/trunk/t/live_fork.t
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/live_fork.t	2009-02-04 15:16:33 UTC (rev 9195)
+++ Catalyst-Runtime/5.80/trunk/t/live_fork.t	2009-02-04 16:42:07 UTC (rev 9196)
@@ -1,5 +1,5 @@
 #!/usr/bin/perl
-# live_fork.t 
+# live_fork.t
 # Copyright (c) 2006 Jonathan Rockway <jrockway at cpan.org>
 
 =head1 SYNOPSIS
@@ -17,12 +17,12 @@
 eval 'use YAML';
 plan skip_all => 'YAML required' if $@;
 
-plan skip_all => 'Using remote server'
-    if $ENV{CATALYST_SERVER};
-    
+plan skip_all => 'Using remote server (and REMOTE_FORK not set)'
+    if $ENV{CATALYST_SERVER} && !$ENV{REMOTE_FORK};
+
 plan skip_all => 'Skipping fork tests: no /bin/ls'
     if !-e '/bin/ls'; # see if /bin/ls exists
-    
+
 plan tests => 13; # otherwise
 
 {
@@ -30,30 +30,30 @@
     ok(my $result = get('/fork/system/%2Fbin%2Fls'), 'system');
     my @result = split /$/m, $result;
     $result = join q{}, @result[-4..-1];
-    
+
     my $result_ref = eval { Load($result) };
     ok($result_ref, 'is YAML');
     is($result_ref->{result}, 0, 'exited OK');
 }
 
-{ 
+{
   backticks:
     ok(my $result = get('/fork/backticks/%2Fbin%2Fls'), '`backticks`');
     my @result = split /$/m, $result;
     $result = join q{}, @result[-4..-1];
-    
+
     my $result_ref = eval { Load($result) };
     ok($result_ref, 'is YAML');
     is($result_ref->{code}, 0, 'exited successfully');
     like($result_ref->{result}, qr{^/bin/ls[^:]}, 'contains ^/bin/ls$');
     like($result_ref->{result}, qr{\n.*\n}m, 'contains two newlines');
 }
-{ 
+{
   fork:
     ok(my $result = get('/fork/fork'), 'fork');
     my @result = split /$/m, $result;
     $result = join q{}, @result[-4..-1];
-    
+
     my $result_ref = eval { Load($result) };
     ok($result_ref, 'is YAML');
     isnt($result_ref->{pid}, 0, q{fork's "pid" wasn't 0});




More information about the Catalyst-commits mailing list