IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 2, 2007, 3:44:24 PM (19 years ago)
Author:
jhoblitt
Message:

better paramter checking
overhaul instance table
add ->_is_valid_object_key() method
change ->find_instances() to check it's params and only return instances on mounted & available volumes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Nebulous-Server/t/04_server_replicate_object.t

    r12960 r13173  
    33# Copryight (C) 2004-2005  Joshua Hoblitt
    44#
    5 # $Id: 04_server_replicate_object.t,v 1.7 2007-04-23 20:42:29 jhoblitt Exp $
     5# $Id: 04_server_replicate_object.t,v 1.8 2007-05-03 01:44:24 jhoblitt Exp $
    66
    77use strict;
    88use warnings FATAL => qw( all );
    99
    10 use Test::More tests => 11;
     10use Test::More tests => 12;
    1111
    1212use lib qw( ./t ./lib );
     
    7272
    7373eval {
    74     $neb->replicate_object("foo");
     74    $neb->replicate_object('foo');
    7575};
    76 like($@, qr/storage object does not exist/, "storage object does not exist");
     76like($@, qr/is valid object key/, 'storage object does not exist');
     77
     78Test::Nebulous->setup;
     79
     80eval {
     81    $neb->create_object('foo');
     82    $neb->replicate_object('foo', 'bar');
     83};
     84like($@, qr/is valid volume name/, 'storage volume does not exist');
    7785
    7886Test::Nebulous->setup;
     
    8189    $neb->replicate_object();
    8290};
    83 like($@, qr/1 - 2 were expected/, "no params");
     91like($@, qr/1 - 2 were expected/, 'no params');
    8492
    8593Test::Nebulous->setup;
    8694
    8795eval {
    88     $neb->replicate_object(1, 2, 3);
     96    $neb->create_object('foo');
     97    $neb->replicate_object('foo', 'node01', 3);
    8998};
    90 like($@, qr/1 - 2 were expected/, "too many params");
     99like($@, qr/1 - 2 were expected/, 'too many params');
    91100
    92101Test::Nebulous->cleanup;
Note: See TracChangeset for help on using the changeset viewer.