Changeset 13203 for trunk/Nebulous/t
- Timestamp:
- May 3, 2007, 12:10:14 PM (19 years ago)
- Location:
- trunk/Nebulous/t
- Files:
-
- 5 edited
-
05_server_lock_object.t (modified) (6 diffs)
-
06_server_unlock_object.t (modified) (6 diffs)
-
13_server_rename_object.t (modified) (3 diffs)
-
14_server_xattr.t (modified) (8 diffs)
-
63_client_stat.t (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Nebulous/t/05_server_lock_object.t
r12640 r13203 3 3 # Copryight (C) 2004-2005 Joshua Hoblitt 4 4 # 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 $ 6 6 7 7 use strict; … … 52 52 $neb->lock_object("foo", "read"); 53 53 }; 54 like($@, qr/ storage object does not exist/, "storage object does not exist");54 like($@, qr/is valid object key/, "storage object does not exist"); 55 55 56 56 Test::Nebulous->setup; … … 59 59 $neb->lock_object("foo", "write"); 60 60 }; 61 like($@, qr/ storage object does not exist/, "storage object does not exist");61 like($@, qr/is valid object key/, "storage object does not exist"); 62 62 63 63 Test::Nebulous->setup; … … 101 101 102 102 eval { 103 $neb->create_object("foo"); 104 103 105 $neb->lock_object("foo"); 104 106 }; … … 108 110 109 111 eval { 112 $neb->create_object("foo"); 113 110 114 $neb->lock_object("foo", "both"); 111 115 }; … … 115 119 116 120 eval { 121 $neb->create_object("foo"); 122 117 123 $neb->lock_object("foo", 'read', 3); 118 124 }; -
trunk/Nebulous/t/06_server_unlock_object.t
r12641 r13203 3 3 # Copryight (C) 2004-2005 Joshua Hoblitt 4 4 # 5 # $Id: 06_server_unlock_object.t,v 1. 7 2007-03-28 21:41:11jhoblitt Exp $5 # $Id: 06_server_unlock_object.t,v 1.8 2007-05-03 22:10:14 jhoblitt Exp $ 6 6 7 7 use strict; … … 59 59 $neb->unlock_object("foo", "read"); 60 60 }; 61 like($@, qr/ storage object does not exist/, "storage object does not exist");61 like($@, qr/is valid object key/, "storage object does not exist"); 62 62 63 63 Test::Nebulous->setup; … … 66 66 $neb->unlock_object("foo", "write"); 67 67 }; 68 like($@, qr/ storage object does not exist/, "storage object does not exist");68 like($@, qr/is valid object key/, "storage object does not exist"); 69 69 70 70 Test::Nebulous->setup; … … 116 116 117 117 eval { 118 $neb->create_object("foo"); 119 118 120 $neb->unlock_object("foo"); 119 121 }; … … 123 125 124 126 eval { 127 $neb->create_object("foo"); 128 125 129 $neb->unlock_object("foo", "both"); 126 130 }; … … 130 134 131 135 eval { 136 $neb->create_object("foo"); 137 132 138 $neb->unlock_object("foo", 'read', 3); 133 139 }; -
trunk/Nebulous/t/13_server_rename_object.t
r13071 r13203 3 3 # Copryight (C) 2007 Joshua Hoblitt 4 4 # 5 # $Id: 13_server_rename_object.t,v 1. 1 2007-04-28 00:44:58jhoblitt Exp $5 # $Id: 13_server_rename_object.t,v 1.2 2007-05-03 22:10:14 jhoblitt Exp $ 6 6 7 7 use strict; 8 8 use warnings FATAL => qw( all ); 9 9 10 use Test::More tests => 5;10 use Test::More tests => 6; 11 11 12 12 use lib qw( ./t ./lib ); … … 37 37 Test::Nebulous->setup; 38 38 39 # destination key exists 40 eval { 41 $neb->create_object('foo'); 42 $neb->create_object('bar'); 43 44 $neb->rename_object('foo', 'bar'); 45 }; 46 like($@, qr/is not valid object key/, "too few params"); 47 48 Test::Nebulous->setup; 49 39 50 eval { 40 51 $neb->rename_object(); … … 42 53 like($@, qr/2 were expected/, "no params"); 43 54 44 Test::Nebulous-> cleanup;55 Test::Nebulous->setup; 45 56 46 57 eval { 58 $neb->create_object("foo"); 59 47 60 $neb->rename_object("foo"); 48 61 }; 49 62 like($@, qr/2 were expected/, "too few params"); 50 63 51 Test::Nebulous-> cleanup;64 Test::Nebulous->setup; 52 65 53 66 eval { 67 $neb->create_object("foo"); 68 54 69 $neb->rename_object("foo", "bar", "baz"); 55 70 }; -
trunk/Nebulous/t/14_server_xattr.t
r13087 r13203 3 3 # Copryight (C) 2007 Joshua Hoblitt 4 4 # 5 # $Id: 14_server_xattr.t,v 1. 1 2007-05-01 02:00:07jhoblitt Exp $5 # $Id: 14_server_xattr.t,v 1.2 2007-05-03 22:10:14 jhoblitt Exp $ 6 6 7 7 use strict; … … 114 114 115 115 eval { 116 $neb->create_object('foo'); 117 116 118 $neb->setxattr_object('foo', 'bar'); 117 119 }; … … 121 123 122 124 eval { 125 $neb->create_object('foo'); 126 123 127 $neb->setxattr_object('foo', 'bar', 'baz'); 124 128 }; … … 128 132 129 133 eval { 134 $neb->create_object('foo'); 135 130 136 $neb->setxattr_object('foo', 'bar', 'baz', 'create', 'quix'); 131 137 }; … … 137 143 138 144 eval { 145 $neb->create_object('foo'); 146 139 147 $neb->listxattr_object(); 140 148 }; … … 144 152 145 153 eval { 154 $neb->create_object('foo'); 155 146 156 $neb->listxattr_object('foo', 'bar'); 147 157 }; … … 160 170 161 171 eval { 172 $neb->create_object('foo'); 173 162 174 $neb->getxattr_object('foo'); 163 175 }; … … 167 179 168 180 eval { 181 $neb->create_object('foo'); 182 169 183 $neb->getxattr_object('foo', 'bar', 'baz'); 170 184 }; -
trunk/Nebulous/t/63_client_stat.t
r13092 r13203 3 3 # Copryight (C) 2004-2005 Joshua Hoblitt 4 4 # 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 $ 6 6 7 7 use strict; … … 10 10 use Apache::Test qw( -withtestmore ); 11 11 12 plan tests => 1 1;12 plan tests => 12; 13 13 14 14 use lib qw( ./t ./lib ); … … 30 30 my $info = $neb->stat( "foo" ); 31 31 32 is( scalar @$info, 6, "number of columns" );32 is( scalar @$info, 7, "number of columns" ); 33 33 } 34 34 … … 43 43 my $info = $neb->stat( "foo" ); 44 44 45 is( scalar @$info, 6, "number of columns" );45 is( scalar @$info, 7, "number of columns" ); 46 46 is( @$info[0], 1, "so_id" ); 47 47 is( @$info[1], "foo", "ext_id" ); … … 50 50 like( @$info[4], qr/....-..-.. ..:..:../, "epoch" ); 51 51 like( @$info[5], qr/....-..-.. ..:..:../, "mtime" ); 52 is( @$info[6], 1, "instances" ); 52 53 } 53 54
Note:
See TracChangeset
for help on using the changeset viewer.
