Changeset 1309

Show
Ignore:
Timestamp:
10/16/09 07:47:17 (6 weeks ago)
Author:
dormando
Message:

Make edit tests skip in absence of a tracker.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/api/perl/MogileFS-Client/t/20-edit.t

    r1113 r1309  
    77 
    88use strict; 
    9 use Test::More tests => $NUM_TESTS; 
     9use Test::More; 
    1010use MogileFS::Client; 
    1111use LWP; 
     
    1919 
    2020my $key = 'edit_test_file'; 
    21                             
    22 my $fh = $mogc->new_file($key, undef, undef, { largefile => 1 } ); 
     21 
     22my $fh;                            
     23eval { $fh = $mogc->new_file($key, undef, undef, { largefile => 1 } ); }; 
     24 
     25if ($@ =~ m/couldn't connect/) { 
     26    plan skip_all => "No mogilefsd process running on 127.0.0.1:7001"; 
     27    exit 0; 
     28} else { 
     29    plan tests => $NUM_TESTS; 
     30} 
    2331 
    2432ok($fh, "file handle using HTTPFile");