IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 13203 for trunk/Nebulous/t


Ignore:
Timestamp:
May 3, 2007, 12:10:14 PM (19 years ago)
Author:
jhoblitt
Message:

valid that $key arguments are valid

Location:
trunk/Nebulous/t
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Nebulous/t/05_server_lock_object.t

    r12640 r13203  
    33# Copryight (C) 2004-2005  Joshua Hoblitt
    44#
    5 # $Id: 05_server_lock_object.t,v 1.7 2007-03-28 21:32:54 jhoblitt Exp $
     5# $Id: 05_server_lock_object.t,v 1.8 2007-05-03 22:10:14 jhoblitt Exp $
    66
    77use strict;
     
    5252    $neb->lock_object("foo", "read");
    5353};
    54 like($@, qr/storage object does not exist/, "storage object does not exist");
     54like($@, qr/is valid object key/, "storage object does not exist");
    5555
    5656Test::Nebulous->setup;
     
    5959    $neb->lock_object("foo", "write");
    6060};
    61 like($@, qr/storage object does not exist/, "storage object does not exist");
     61like($@, qr/is valid object key/, "storage object does not exist");
    6262
    6363Test::Nebulous->setup;
     
    101101
    102102eval {
     103    $neb->create_object("foo");
     104
    103105    $neb->lock_object("foo");
    104106};
     
    108110
    109111eval {
     112    $neb->create_object("foo");
     113
    110114    $neb->lock_object("foo", "both");
    111115};
     
    115119
    116120eval {
     121    $neb->create_object("foo");
     122
    117123    $neb->lock_object("foo", 'read', 3);
    118124};
  • trunk/Nebulous/t/06_server_unlock_object.t

    r12641 r13203  
    33# Copryight (C) 2004-2005  Joshua Hoblitt
    44#
    5 # $Id: 06_server_unlock_object.t,v 1.7 2007-03-28 21:41:11 jhoblitt Exp $
     5# $Id: 06_server_unlock_object.t,v 1.8 2007-05-03 22:10:14 jhoblitt Exp $
    66
    77use strict;
     
    5959    $neb->unlock_object("foo", "read");
    6060};
    61 like($@, qr/storage object does not exist/, "storage object does not exist");
     61like($@, qr/is valid object key/, "storage object does not exist");
    6262
    6363Test::Nebulous->setup;
     
    6666    $neb->unlock_object("foo", "write");
    6767};
    68 like($@, qr/storage object does not exist/, "storage object does not exist");
     68like($@, qr/is valid object key/, "storage object does not exist");
    6969
    7070Test::Nebulous->setup;
     
    116116
    117117eval {
     118    $neb->create_object("foo");
     119
    118120    $neb->unlock_object("foo");
    119121};
     
    123125
    124126eval {
     127    $neb->create_object("foo");
     128
    125129    $neb->unlock_object("foo", "both");
    126130};
     
    130134
    131135eval {
     136    $neb->create_object("foo");
     137
    132138    $neb->unlock_object("foo", 'read', 3);
    133139};
  • trunk/Nebulous/t/13_server_rename_object.t

    r13071 r13203  
    33# Copryight (C) 2007  Joshua Hoblitt
    44#
    5 # $Id: 13_server_rename_object.t,v 1.1 2007-04-28 00:44:58 jhoblitt Exp $
     5# $Id: 13_server_rename_object.t,v 1.2 2007-05-03 22:10:14 jhoblitt Exp $
    66
    77use strict;
    88use warnings FATAL => qw( all );
    99
    10 use Test::More tests => 5;
     10use Test::More tests => 6;
    1111
    1212use lib qw( ./t ./lib );
     
    3737Test::Nebulous->setup;
    3838
     39# destination key exists
     40eval {
     41    $neb->create_object('foo');
     42    $neb->create_object('bar');
     43
     44    $neb->rename_object('foo', 'bar');
     45};
     46like($@, qr/is not valid object key/, "too few params");
     47
     48Test::Nebulous->setup;
     49
    3950eval {
    4051    $neb->rename_object();
     
    4253like($@, qr/2 were expected/, "no params");
    4354
    44 Test::Nebulous->cleanup;
     55Test::Nebulous->setup;
    4556
    4657eval {
     58    $neb->create_object("foo");
     59
    4760    $neb->rename_object("foo");
    4861};
    4962like($@, qr/2 were expected/, "too few params");
    5063
    51 Test::Nebulous->cleanup;
     64Test::Nebulous->setup;
    5265
    5366eval {
     67    $neb->create_object("foo");
     68
    5469    $neb->rename_object("foo", "bar", "baz");
    5570};
  • trunk/Nebulous/t/14_server_xattr.t

    r13087 r13203  
    33# Copryight (C) 2007  Joshua Hoblitt
    44#
    5 # $Id: 14_server_xattr.t,v 1.1 2007-05-01 02:00:07 jhoblitt Exp $
     5# $Id: 14_server_xattr.t,v 1.2 2007-05-03 22:10:14 jhoblitt Exp $
    66
    77use strict;
     
    114114
    115115eval {
     116    $neb->create_object('foo');
     117
    116118    $neb->setxattr_object('foo', 'bar');
    117119};
     
    121123
    122124eval {
     125    $neb->create_object('foo');
     126
    123127    $neb->setxattr_object('foo', 'bar', 'baz');
    124128};
     
    128132
    129133eval {
     134    $neb->create_object('foo');
     135
    130136    $neb->setxattr_object('foo', 'bar', 'baz', 'create', 'quix');
    131137};
     
    137143
    138144eval {
     145    $neb->create_object('foo');
     146
    139147    $neb->listxattr_object();
    140148};
     
    144152
    145153eval {
     154    $neb->create_object('foo');
     155
    146156    $neb->listxattr_object('foo', 'bar');
    147157};
     
    160170
    161171eval {
     172    $neb->create_object('foo');
     173
    162174    $neb->getxattr_object('foo');
    163175};
     
    167179
    168180eval {
     181    $neb->create_object('foo');
     182
    169183    $neb->getxattr_object('foo', 'bar', 'baz');
    170184};
  • trunk/Nebulous/t/63_client_stat.t

    r13092 r13203  
    33# Copryight (C) 2004-2005  Joshua Hoblitt
    44#
    5 # $Id: 63_client_stat.t,v 1.2 2007-05-01 02:52:04 jhoblitt Exp $
     5# $Id: 63_client_stat.t,v 1.3 2007-05-03 22:10:14 jhoblitt Exp $
    66
    77use strict;
     
    1010use Apache::Test qw( -withtestmore );
    1111
    12 plan tests => 11;
     12plan tests => 12;
    1313
    1414use lib qw( ./t ./lib );
     
    3030    my $info = $neb->stat( "foo" );
    3131
    32     is( scalar @$info, 6, "number of columns" );
     32    is( scalar @$info, 7, "number of columns" );
    3333}
    3434
     
    4343    my $info = $neb->stat( "foo" );
    4444
    45     is( scalar @$info, 6,                       "number of columns" );
     45    is( scalar @$info, 7,                       "number of columns" );
    4646    is( @$info[0], 1,                           "so_id" );
    4747    is( @$info[1], "foo",                       "ext_id" );
     
    5050    like( @$info[4], qr/....-..-.. ..:..:../,   "epoch" );
    5151    like( @$info[5], qr/....-..-.. ..:..:../,   "mtime" );
     52    is( @$info[6], 1,                           "instances" );
    5253}
    5354
Note: See TracChangeset for help on using the changeset viewer.