IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 19715


Ignore:
Timestamp:
Sep 23, 2008, 2:37:27 PM (18 years ago)
Author:
jhoblitt
Message:

allow ->replicate() volume param to be undef

Location:
trunk/Nebulous
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Nebulous/Changes

    r18858 r19715  
    22
    330.10
     4    - allow ->replicate() volume param to be undef
    45    - fix ->delete() still work if the neb implies a volume on which there is
    56      no instance
  • trunk/Nebulous/lib/Nebulous/Client.pm

    r19497 r19715  
    11# Copyright (c) 2004-2008  Joshua Hoblitt
    22#
    3 # $Id: Client.pm,v 1.59 2008-09-11 23:02:23 jhoblitt Exp $
     3# $Id: Client.pm,v 1.60 2008-09-24 00:36:56 jhoblitt Exp $
    44
    55package Nebulous::Client;
     
    191191        {
    192192            # volume
    193             type        => SCALAR,
     193            type        => SCALAR|UNDEF,
    194194            optional    => 1,
    195195        },
  • trunk/Nebulous/t/52_client_replicate.t

    r5667 r19715  
    33# Copryight (C) 2004-2005  Joshua Hoblitt
    44#
    5 # $Id: 52_client_replicate.t,v 1.1 2005-12-03 02:52:31 jhoblitt Exp $
     5# $Id: 52_client_replicate.t,v 1.2 2008-09-24 00:36:56 jhoblitt Exp $
    66
    77use strict;
     
    1010use Apache::Test qw( -withtestmore );
    1111
    12 plan tests => 11;
     12plan tests => 13;
    1313
    1414use lib qw( ./t ./lib );
     
    4545
    4646    my $uri = $neb->replicate( "foo", "node01" );
     47
     48    ok( $uri, "good replication" );
     49    ok( -e _get_file_path( $uri ), "file exists" );
     50}
     51
     52Test::Nebulous->setup;
     53
     54{
     55    # key, $volume = undef (same as saying no volume)
     56    my $neb = Nebulous::Client->new(
     57        proxy => "http://$hostport/nebulous",
     58    );
     59    $neb->create( "neb://node01/foo" );
     60
     61    my $uri = $neb->replicate( "neb://node01/foo", undef );
    4762
    4863    ok( $uri, "good replication" );
Note: See TracChangeset for help on using the changeset viewer.