[Catalyst-commits] r8752 - Catalyst-Runtime/5.80/trunk/t/aggregate

andyg at dev.catalyst.perl.org andyg at dev.catalyst.perl.org
Fri Dec 5 17:25:30 GMT 2008


Author: andyg
Date: 2008-12-05 17:25:29 +0000 (Fri, 05 Dec 2008)
New Revision: 8752

Modified:
   Catalyst-Runtime/5.80/trunk/t/aggregate/live_engine_request_uploads.t
Log:
Fix upload test to work with remote servers, don't check for deleted files

Modified: Catalyst-Runtime/5.80/trunk/t/aggregate/live_engine_request_uploads.t
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/aggregate/live_engine_request_uploads.t	2008-12-05 17:14:58 UTC (rev 8751)
+++ Catalyst-Runtime/5.80/trunk/t/aggregate/live_engine_request_uploads.t	2008-12-05 17:25:29 UTC (rev 8752)
@@ -11,6 +11,7 @@
 
 use Catalyst::Request;
 use Catalyst::Request::Upload;
+use HTTP::Body::OctetStream;
 use HTTP::Headers;
 use HTTP::Headers::Util 'split_header_words';
 use HTTP::Request::Common;
@@ -72,7 +73,13 @@
         is( $creq->parameters->{ $upload->filename },
             $upload->filename, 'legacy param method ok' );
 
-        ok( !-e $upload->tempname, 'Upload temp file was deleted' );
+        SKIP:
+        {
+            if ( $ENV{CATALYST_SERVER} ) {
+                skip 'Not testing for deleted file on remote server', 1;
+            }
+            ok( !-e $upload->tempname, 'Upload temp file was deleted' );
+        }
     }
 }
 
@@ -128,7 +135,13 @@
         is( $upload->filename, $parameters{filename}, 'Upload filename' );
         is( $upload->size, length( $part->content ), 'Upload Content-Length' );
 
-        ok( !-e $upload->tempname, 'Upload temp file was deleted' );
+        SKIP:
+        {
+            if ( $ENV{CATALYST_SERVER} ) {
+                skip 'Not testing for deleted file on remote server', 1;
+            }
+            ok( !-e $upload->tempname, 'Upload temp file was deleted' );
+        }
     }
 }
 
@@ -197,7 +210,13 @@
     
     for my $file ( $creq->upload ) {
         my $upload = $creq->upload($file);
-        ok( !-e $upload->tempname, 'Upload temp file was deleted' );
+        SKIP:
+        {
+            if ( $ENV{CATALYST_SERVER} ) {
+                skip 'Not testing for deleted file on remote server', 1;
+            }
+            ok( !-e $upload->tempname, 'Upload temp file was deleted' );
+        }
     }
 }
 
@@ -257,7 +276,14 @@
         is( $upload->type, $part->content_type, 'Upload Content-Type' );
         is( $upload->size, length( $part->content ), 'Upload Content-Length' );
         is( $upload->filename, 'catalyst_130pix.gif', 'Upload Filename' );
-        ok( !-e $upload->tempname, 'Upload temp file was deleted' );
+        
+        SKIP:
+        {
+            if ( $ENV{CATALYST_SERVER} ) {
+                skip 'Not testing for deleted file on remote server', 1;
+            }
+            ok( !-e $upload->tempname, 'Upload temp file was deleted' );
+        }
     }
 }
 
@@ -293,12 +319,22 @@
     isa_ok( $body, 'HTTP::Body::OctetStream' );
     isa_ok($body->body, 'File::Temp');
 
-    ok( !-e $body->body->filename, 'Upload temp file was deleted' );
+    SKIP:
+    {
+        if ( $ENV{CATALYST_SERVER} ) {
+            skip 'Not testing for deleted file on remote server', 1;
+        }
+        ok( !-e $body->body->filename, 'Upload temp file was deleted' );
+    }
 }
 
 # test uploadtmp config var
-
+SKIP:
 {
+    if ( $ENV{CATALYST_SERVER} ) {
+        skip 'Not testing uploadtmp on remote server', 14;
+    }
+    
     my $creq;
 
     my $dir = "$FindBin::Bin/";




More information about the Catalyst-commits mailing list