Changeset 13067 for trunk/Nebulous/t/60_client_copy.t
- Timestamp:
- Apr 27, 2007, 1:50:57 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/Nebulous/t/60_client_copy.t (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Nebulous/t/60_client_copy.t
r5667 r13067 3 3 # Copryight (C) 2004-2005 Joshua Hoblitt 4 4 # 5 # $Id: 60_client_copy.t,v 1. 1 2005-12-03 02:52:31jhoblitt Exp $5 # $Id: 60_client_copy.t,v 1.2 2007-04-27 23:50:57 jhoblitt Exp $ 6 6 7 7 use strict; … … 10 10 use Apache::Test qw( -withtestmore ); 11 11 12 plan tests => 8;12 plan tests => 11; 13 13 14 14 use lib qw( ./t ./lib ); … … 43 43 proxy => "http://$hostport/nebulous", 44 44 ); 45 $neb->create( "foo" ); 46 47 ok( $neb->copy( "foo", "foobar", "node01" ), "copied object" ); 48 49 my $locations1 = $neb->find_instances( "foobar" ); 50 my $locations2 = $neb->find_instances( "foobar" ); 51 52 is( scalar @$locations1, 1, "old object has an instances" ); 53 is( scalar @$locations2, 1, "new object has an instances" ); 54 } 55 56 Test::Nebulous->setup; 57 58 { 59 my $neb = Nebulous::Client->new( 60 proxy => "http://$hostport/nebulous", 61 ); 45 62 46 63 ok( ! $neb->copy( "foo", "foobar" ), "copy non-existant object" ); … … 59 76 $neb->copy(); 60 77 }; 61 like( $@, qr/2 were expected/, "no params" );78 like( $@, qr/2 - 3 were expected/, "no params" ); 62 79 63 80 Test::Nebulous->setup; … … 69 86 $neb->copy( "foo" ); 70 87 }; 71 like( $@, qr/2 were expected/, "not enough params" );88 like( $@, qr/2 - 3 were expected/, "not enough params" ); 72 89 73 90 Test::Nebulous->setup; … … 77 94 proxy => "http://$hostport/nebulous", 78 95 ); 79 $neb->copy( "foo", "bar", "baz" );96 $neb->copy( "foo", "bar", "baz", "bong" ); 80 97 }; 81 like( $@, qr/2 were expected/, "too many params" );98 like( $@, qr/2 - 3 were expected/, "too many params" ); 82 99 83 100 Test::Nebulous->cleanup;
Note:
See TracChangeset
for help on using the changeset viewer.
