[Catalyst-commits] r6613 - trunk/Catalyst-Runtime/t

andyg at dev.catalyst.perl.org andyg at dev.catalyst.perl.org
Fri Aug 3 05:57:21 GMT 2007


Author: andyg
Date: 2007-08-03 05:57:21 +0100 (Fri, 03 Aug 2007)
New Revision: 6613

Modified:
   trunk/Catalyst-Runtime/t/live_component_controller_action_regexp.t
   trunk/Catalyst-Runtime/t/live_component_controller_action_streaming.t
Log:
Fix a few tests to work properly on remote servers

Modified: trunk/Catalyst-Runtime/t/live_component_controller_action_regexp.t
===================================================================
--- trunk/Catalyst-Runtime/t/live_component_controller_action_regexp.t	2007-08-03 01:53:17 UTC (rev 6612)
+++ trunk/Catalyst-Runtime/t/live_component_controller_action_regexp.t	2007-08-03 04:57:21 UTC (rev 6613)
@@ -13,6 +13,8 @@
 use Test::More tests => 28*$iters;
 use Catalyst::Test 'TestApp';
 
+use Catalyst::Request;
+
 if ( $ENV{CAT_BENCHMARK} ) {
     require Benchmark;
     Benchmark::timethis( $iters, \&run_tests );

Modified: trunk/Catalyst-Runtime/t/live_component_controller_action_streaming.t
===================================================================
--- trunk/Catalyst-Runtime/t/live_component_controller_action_streaming.t	2007-08-03 01:53:17 UTC (rev 6612)
+++ trunk/Catalyst-Runtime/t/live_component_controller_action_streaming.t	2007-08-03 04:57:21 UTC (rev 6613)
@@ -29,8 +29,17 @@
         ok( my $response = request('http://localhost/streaming'), 'Request' );
         ok( $response->is_success, 'Response Successful 2xx' );
         is( $response->content_type, 'text/plain', 'Response Content-Type' );
-        # XXX: Length should be undef here, but HTTP::Request::AsCGI sets it
-        is( $response->content_length, 12, 'Response Content-Length' );
+        
+        SKIP:
+        {
+            if ( $ENV{CATALYST_SERVER} ) {
+                skip "Using remote server", 1;
+            }
+            
+            # XXX: Length should be undef here, but HTTP::Request::AsCGI sets it
+            is( $response->content_length, 12, 'Response Content-Length' );
+        }
+        
         is( $response->content,, <<'EOF', 'Content is a stream' );
 foo
 bar




More information about the Catalyst-commits mailing list