IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 27, 2007, 1:50:57 PM (19 years ago)
Author:
jhoblitt
Message:

add $volume param to ->copy()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Nebulous/t/60_client_copy.t

    r5667 r13067  
    33# Copryight (C) 2004-2005  Joshua Hoblitt
    44#
    5 # $Id: 60_client_copy.t,v 1.1 2005-12-03 02:52:31 jhoblitt Exp $
     5# $Id: 60_client_copy.t,v 1.2 2007-04-27 23:50:57 jhoblitt Exp $
    66
    77use strict;
     
    1010use Apache::Test qw( -withtestmore );
    1111
    12 plan tests => 8;
     12plan tests => 11;
    1313
    1414use lib qw( ./t ./lib );
     
    4343        proxy => "http://$hostport/nebulous",
    4444    );
     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
     56Test::Nebulous->setup;
     57
     58{
     59    my $neb = Nebulous::Client->new(
     60        proxy => "http://$hostport/nebulous",
     61    );
    4562
    4663    ok( ! $neb->copy( "foo", "foobar" ), "copy non-existant object" );
     
    5976    $neb->copy();
    6077};
    61 like( $@, qr/2 were expected/, "no params" );
     78like( $@, qr/2 - 3 were expected/, "no params" );
    6279
    6380Test::Nebulous->setup;
     
    6986    $neb->copy( "foo" );
    7087};
    71 like( $@, qr/2 were expected/, "not enough params" );
     88like( $@, qr/2 - 3 were expected/, "not enough params" );
    7289
    7390Test::Nebulous->setup;
     
    7794        proxy => "http://$hostport/nebulous",
    7895    );
    79     $neb->copy( "foo", "bar", "baz" );
     96    $neb->copy( "foo", "bar", "baz", "bong" );
    8097};
    81 like( $@, qr/2 were expected/, "too many params" );
     98like( $@, qr/2 - 3 were expected/, "too many params" );
    8299
    83100Test::Nebulous->cleanup;
Note: See TracChangeset for help on using the changeset viewer.