Changeset 18452
- Timestamp:
- Jul 9, 2008, 2:20:02 PM (18 years ago)
- Location:
- trunk/Nebulous-Server/t
- Files:
-
- 2 edited
-
03_server_create_object.t (modified) (2 diffs)
-
04_server_replicate_object.t (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Nebulous-Server/t/03_server_create_object.t
r17539 r18452 3 3 # Copryight (C) 2004-2005 Joshua Hoblitt 4 4 # 5 # $Id: 03_server_create_object.t,v 1.2 6 2008-05-06 22:10:58jhoblitt Exp $5 # $Id: 03_server_create_object.t,v 1.27 2008-07-10 00:20:02 jhoblitt Exp $ 6 6 7 7 use strict; 8 8 use warnings FATAL => qw( all ); 9 9 10 use Test::More tests => 70;10 use Test::More tests => 88; 11 11 12 12 use lib qw( ./t ./lib ); … … 264 264 Test::Nebulous->setup; 265 265 266 { 267 # soft volume name request 268 my $uri = $neb->create_object("neb://~node01/foo"); 269 270 my ($scheme, $auth, $path, $query, $frag) = uri_split($uri); 271 ok(-e $path, "file exists"); 272 ok($neb->find_instances("foo"), 'object key exists'); 273 uri_scheme_ok($uri, 'file'); 274 } 275 276 Test::Nebulous->setup; 277 278 { 279 # soft volume name request 280 my $uri = $neb->create_object("neb://node01/foo", "~node02"); 281 282 my ($scheme, $auth, $path, $query, $frag) = uri_split($uri); 283 ok(-e $path, "file exists"); 284 ok($neb->find_instances("foo"), 'object key exists'); 285 uri_scheme_ok($uri, 'file'); 286 } 287 288 Test::Nebulous->setup; 289 290 { 291 # any volume name request 292 my $uri = $neb->create_object("neb://any/foo"); 293 294 my ($scheme, $auth, $path, $query, $frag) = uri_split($uri); 295 ok(-e $path, "file exists"); 296 ok($neb->find_instances("foo"), 'object key exists'); 297 uri_scheme_ok($uri, 'file'); 298 } 299 300 Test::Nebulous->setup; 301 302 { 303 # any volume name request 304 my $uri = $neb->create_object("neb://~any/foo"); 305 306 my ($scheme, $auth, $path, $query, $frag) = uri_split($uri); 307 ok(-e $path, "file exists"); 308 ok($neb->find_instances("foo"), 'object key exists'); 309 uri_scheme_ok($uri, 'file'); 310 } 311 312 Test::Nebulous->setup; 313 314 { 315 # any volume name request 316 my $uri = $neb->create_object("neb://node01/foo", "any"); 317 318 my ($scheme, $auth, $path, $query, $frag) = uri_split($uri); 319 ok(-e $path, "file exists"); 320 ok($neb->find_instances("foo"), 'object key exists'); 321 uri_scheme_ok($uri, 'file'); 322 } 323 324 Test::Nebulous->setup; 325 326 { 327 # any volume name request 328 my $uri = $neb->create_object("neb://node01/foo", "~any"); 329 330 my ($scheme, $auth, $path, $query, $frag) = uri_split($uri); 331 ok(-e $path, "file exists"); 332 ok($neb->find_instances("foo"), 'object key exists'); 333 uri_scheme_ok($uri, 'file'); 334 } 335 336 Test::Nebulous->setup; 337 266 338 eval { 267 339 $neb->create_object("foo"); -
trunk/Nebulous-Server/t/04_server_replicate_object.t
r17539 r18452 3 3 # Copryight (C) 2004-2005 Joshua Hoblitt 4 4 # 5 # $Id: 04_server_replicate_object.t,v 1.1 3 2008-05-06 22:10:58jhoblitt Exp $5 # $Id: 04_server_replicate_object.t,v 1.14 2008-07-10 00:20:02 jhoblitt Exp $ 6 6 7 7 use strict; 8 8 use warnings FATAL => qw( all ); 9 9 10 use Test::More tests => 19;10 use Test::More tests => 25; 11 11 12 12 use lib qw( ./t ./lib ); … … 110 110 Test::Nebulous->setup; 111 111 112 { 113 # key, $volume 114 $neb->create_object("foo"); 115 my $uri1 = $neb->replicate_object("foo", "any"); 116 117 { 118 my ($scheme, $auth, $path, $query, $frag) = uri_split($uri1); 119 ok(-e $path, "file exists"); 120 uri_scheme_ok($uri1, 'file'); 121 122 SKIP: { 123 skip "requires xattr support", 1 unless $test_xattr; 124 is(getfattr($path, 'user.nebulous_key'), 'foo', 'user.nebulous_key xattr'); 125 } 126 } 127 } 128 129 Test::Nebulous->setup; 130 131 { 132 # key, $volume 133 $neb->create_object("foo"); 134 my $uri1 = $neb->replicate_object("foo", "~any"); 135 136 { 137 my ($scheme, $auth, $path, $query, $frag) = uri_split($uri1); 138 ok(-e $path, "file exists"); 139 uri_scheme_ok($uri1, 'file'); 140 141 SKIP: { 142 skip "requires xattr support", 1 unless $test_xattr; 143 is(getfattr($path, 'user.nebulous_key'), 'foo', 'user.nebulous_key xattr'); 144 } 145 } 146 } 147 148 Test::Nebulous->setup; 149 112 150 eval { 113 151 $neb->replicate_object('foo');
Note:
See TracChangeset
for help on using the changeset viewer.
