Changeset 23932 for trunk/Nebulous-Server/t/08_server_delete_instance.t
- Timestamp:
- Apr 20, 2009, 11:15:20 AM (17 years ago)
- Location:
- trunk/Nebulous-Server
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
t/08_server_delete_instance.t (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Nebulous-Server
-
Property svn:mergeinfo
set to
/branches/neb_distrib_20081210/Nebulous-Server merged eligible /trunk/Nebulous-Server merged eligible
-
Property svn:mergeinfo
set to
-
trunk/Nebulous-Server/t/08_server_delete_instance.t
r20990 r23932 3 3 # Copryight (C) 2004-2005 Joshua Hoblitt 4 4 # 5 # $Id: 08_server_delete_instance.t,v 1.1 2 2008-12-14 22:54:25eugene Exp $5 # $Id: 08_server_delete_instance.t,v 1.10.22.1 2008-12-14 22:52:37 eugene Exp $ 6 6 7 7 use strict; … … 24 24 25 25 { 26 my $uri = $neb->create_object("foo"); 26 my $key = "foo"; 27 my $uri = $neb->create_object($key); 27 28 28 ok($neb->delete_instance($ uri), "delete instance");29 ok($neb->delete_instance($key, $uri), "delete instance"); 29 30 } 30 31 … … 32 33 33 34 { 34 my $uri1 = $neb->create_object("foo"); 35 my $uri2 = $neb->replicate_object("foo"); 35 my $key = "foo"; 36 my $uri1 = $neb->create_object($key); 37 my $uri2 = $neb->replicate_object($key); 36 38 37 ok($neb->delete_instance($ uri1), "delete instance");39 ok($neb->delete_instance($key, $uri1), "delete instance"); 38 40 39 my $locations = $neb->find_instances( "foo");41 my $locations = $neb->find_instances($key); 40 42 41 43 is($locations->[0], $uri2, "instance remains"); 42 44 43 ok($neb->delete_instance( $uri2), "delete instance");45 ok($neb->delete_instance($key, $uri2), "delete instance"); 44 46 45 47 eval { 46 $neb->find_instances( "foo");48 $neb->find_instances($key); 47 49 }; 48 50 like($@, qr/is valid object key/, "storage object was deleted"); … … 52 54 53 55 eval { 54 $neb->delete_instance("file:/foo"); 56 my $key = "foo"; 57 my $uri1 = $neb->create_object($key); 58 59 $neb->delete_instance($key, "file:/foo"); 55 60 }; 56 61 like($@, qr/no instance is associated with uri/, "uri does not exist"); … … 61 66 $neb->delete_instance(); 62 67 }; 63 like($@, qr/ 1 wasexpected/, "no params");68 like($@, qr/2 were expected/, "no params"); 64 69 65 70 Test::Nebulous->setup; 66 71 67 72 eval { 68 $neb->delete_instance("foo", 2); 73 my $key = "foo"; 74 my $uri1 = $neb->create_object($key); 75 76 $neb->delete_instance("foo", 2, 3); 69 77 }; 70 like($@, qr/ 1 wasexpected/, "too many params");78 like($@, qr/2 were expected/, "too many params"); 71 79 72 80 Test::Nebulous->cleanup;
Note:
See TracChangeset
for help on using the changeset viewer.
