Changeset 23727
- Timestamp:
- Apr 7, 2009, 2:03:39 PM (17 years ago)
- Location:
- branches/neb_distrib_20081210/Nebulous-Server
- Files:
-
- 3 edited
-
Changes (modified) (1 diff)
-
lib/Nebulous/Server.pm (modified) (1 diff)
-
t/13_server_rename_object.t (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/neb_distrib_20081210/Nebulous-Server/Changes
r23725 r23727 10 10 - rename Nebulous::Keys class -> Nebulous::Key 11 11 - select neb db to use by hashing only the directory component of the key 12 - disallow Nebulous::Server->rename_object() when it would cause the db 13 hash of a key to change 12 14 13 15 0.16 -
branches/neb_distrib_20081210/Nebulous-Server/lib/Nebulous/Server.pm
r23726 r23727 326 326 $log->debug("entered - @_"); 327 327 328 unless ($self->_db_index_for_key($key) 329 == $self->_db_index_for_key($newkey)) { 330 $log->logdie("can not rename objects across distributed database boundaries"); 331 } 332 328 333 TRANS: while (1) { 329 334 eval { -
branches/neb_distrib_20081210/Nebulous-Server/t/13_server_rename_object.t
r17717 r23727 8 8 use warnings FATAL => qw( all ); 9 9 10 use Test::More tests => 6;10 use Test::More tests => 7; 11 11 12 12 use lib qw( ./t ./lib ); … … 73 73 like($@, qr/2 were expected/, "too many params"); 74 74 75 # test attempting to rename a key in such a way to cause the distributed 76 # storage db to change 77 # this must be the last test as we're messing with the $neb object 78 eval { 79 $neb->config->add_db( 80 dbindex => 1, 81 dsn => $NEB_DB, 82 dbuser => $NEB_USER, 83 dbpasswd => $NEB_PASS, 84 ); 85 86 $neb->create_object("a/foo"); 87 $neb->rename_object("a/foo", "g/bar"); 88 }; 89 like($@, qr/rename objects across distributed database boundaries/, "rename between databases"); 90 75 91 Test::Nebulous->cleanup;
Note:
See TracChangeset
for help on using the changeset viewer.
