Changeset 12646 for trunk/Nebulous/t/09_server_stat_object.t
- Timestamp:
- Mar 28, 2007, 12:02:11 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/Nebulous/t/09_server_stat_object.t (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Nebulous/t/09_server_stat_object.t
r10546 r12646 3 3 # Copryight (C) 2004-2005 Joshua Hoblitt 4 4 # 5 # $Id: 09_server_stat_object.t,v 1. 8 2006-12-08 03:29:19jhoblitt Exp $5 # $Id: 09_server_stat_object.t,v 1.9 2007-03-28 22:01:37 jhoblitt Exp $ 6 6 7 7 use strict; … … 25 25 26 26 { 27 my $uri = $neb->create_object( "foo");27 my $uri = $neb->create_object("foo"); 28 28 29 my $info = $neb->stat_object( "foo");29 my $info = $neb->stat_object("foo"); 30 30 31 is( scalar @$info, 8, "number of columns");31 is(scalar @$info, 8, "number of columns"); 32 32 } 33 33 … … 35 35 36 36 { 37 my $uri = $neb->create_object( "foo", 0, "node01", "foobar");37 my $uri = $neb->create_object("foo", 0, "node01", "foobar"); 38 38 39 my $info = $neb->stat_object( "foo");39 my $info = $neb->stat_object("foo"); 40 40 41 is( scalar @$info, 8, "number of columns");42 is( @$info[0], 1, "so_id");43 is( @$info[1], "foo", "ext_id");44 is( @$info[2], 0, "class_id");45 is( @$info[3], "foobar", "comment");46 is( @$info[4], 0, "read lock");47 is( @$info[5], undef, "write lock");48 like( @$info[6], qr/....-..-.. ..:..:../, "epoch");49 like( @$info[6], qr/....-..-.. ..:..:../, "mtime");41 is(scalar @$info, 8, "number of columns"); 42 is(@$info[0], 1, "so_id"); 43 is(@$info[1], "foo", "ext_id"); 44 is(@$info[2], 0, "class_id"); 45 is(@$info[3], "foobar", "comment"); 46 is(@$info[4], 0, "read lock"); 47 is(@$info[5], undef, "write lock"); 48 like(@$info[6], qr/....-..-.. ..:..:../, "epoch"); 49 like(@$info[6], qr/....-..-.. ..:..:../, "mtime"); 50 50 } 51 51 … … 53 53 54 54 eval { 55 $neb->stat_object( "foo");55 $neb->stat_object("foo"); 56 56 }; 57 like( $@, qr/no storage object found/, "object does not exist");57 like($@, qr/no storage object found/, "object does not exist"); 58 58 59 59 Test::Nebulous->setup; … … 62 62 $neb->stat_object(); 63 63 }; 64 like( $@, qr/1 was expected/, "no params");64 like($@, qr/1 was expected/, "no params"); 65 65 66 66 Test::Nebulous->setup; 67 67 68 68 eval { 69 $neb->stat_object( "foo", 2);69 $neb->stat_object("foo", 2); 70 70 }; 71 like( $@, qr/1 was expected/, "too many params");71 like($@, qr/1 was expected/, "too many params"); 72 72 73 73 Test::Nebulous->cleanup;
Note:
See TracChangeset
for help on using the changeset viewer.
