IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 2, 2007, 5:21:28 PM (19 years ago)
Author:
jhoblitt
Message:

overhaul Nebulous::Client->cull()
add the number of instances to ->stat_object()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Nebulous/t/53_client_cull.t

    r13178 r13180  
    33# Copryight (C) 2004-2005  Joshua Hoblitt
    44#
    5 # $Id: 53_client_cull.t,v 1.4 2007-05-03 01:53:20 jhoblitt Exp $
     5# $Id: 53_client_cull.t,v 1.5 2007-05-03 03:21:28 jhoblitt Exp $
    66
    77use strict;
     
    1414use lib qw( ./t ./lib );
    1515
    16 use Nebulous::Client trace => 'debug';
     16use Nebulous::Client;
    1717use Nebulous::Util qw( :standard );
    1818use Test::Nebulous;
     
    2727        proxy => "http://$hostport/nebulous",
    2828    );
    29     $neb->create( "foo" );
    30     $neb->replicate( "foo" );
     29    $neb->create("foo");
     30    $neb->replicate("foo");
    3131
    32     my $uri = $neb->cull( "foo" );
     32    my $uri = $neb->cull("foo");
    3333
    34     ok( $uri, "good cull" );
    35     ok( ! -e _get_file_path( $uri ), "file doesn't exist" );
     34    ok($uri, "good cull");
     35    ok(! -e _get_file_path($uri), "file doesn't exist");
    3636}
    3737
     
    3939
    4040{
    41 
    4241    # key, $volume
    4342    my $neb = Nebulous::Client->new(
    4443        proxy => "http://$hostport/nebulous",
    4544    );
    46     $neb->create( "foo" );
    47     $neb->replicate( "foo", "node01" );
     45    $neb->create("foo");
     46    $neb->replicate("foo", "node01");
    4847
    49     my $uri = $neb->cull( "foo", "node01" );
     48    my $uri = $neb->cull("foo", "node01");
    5049
    51     ok( $uri, "good cull" );
    52     ok( ! -e _get_file_path( $uri ), "file exists" );
     50    ok($uri, "good cull");
     51    ok(! -e _get_file_path($uri), "file exists");
    5352}
    5453
     
    6059        proxy => "http://$hostport/nebulous",
    6160    );
    62     $neb->create( "foo" );
     61    $neb->create("foo");
    6362
    64     $neb->replicate( "foo", "node01" );
    65     $neb->replicate( "foo", "node02" );
     63    $neb->replicate("foo", "node01");
     64    $neb->replicate("foo", "node02");
    6665
    67     my $uri1 = $neb->cull( "foo" );
    68     my $uri2 = $neb->cull( "foo" );
     66    my $uri1 = $neb->cull("foo");
     67    my $uri2 = $neb->cull("foo");
    6968
    70     ok( $uri1, "good cull" );
    71     ok( $uri2, "good cull" );
    72     ok( ! -e _get_file_path( $uri1 ), "file exists" );
    73     ok( ! -e _get_file_path( $uri2 ), "file exists" );
     69    ok($uri1, "good cull");
     70    ok($uri2, "good cull");
     71    ok(! -e _get_file_path($uri1), "file exists");
     72    ok(! -e _get_file_path($uri2), "file exists");
    7473}
    7574
Note: See TracChangeset for help on using the changeset viewer.