IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 14, 2008, 12:54:25 PM (17 years ago)
Author:
eugene
Message:

reverting to pre-distributed version code (distrib is on branch)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Nebulous-Server/t/08_server_delete_instance.t

    r20965 r20990  
    33# Copryight (C) 2004-2005  Joshua Hoblitt
    44#
    5 # $Id: 08_server_delete_instance.t,v 1.11 2008-12-12 21:13:41 jhoblitt Exp $
     5# $Id: 08_server_delete_instance.t,v 1.12 2008-12-14 22:54:25 eugene Exp $
    66
    77use strict;
     
    2424
    2525{
    26     my $key = "foo";
    27     my $uri = $neb->create_object($key);
     26    my $uri = $neb->create_object("foo");
    2827
    29     ok($neb->delete_instance($key, $uri), "delete instance");
     28    ok($neb->delete_instance($uri), "delete instance");
    3029}
    3130
     
    3332
    3433{
    35     my $key = "foo";
    36     my $uri1 = $neb->create_object($key);
    37     my $uri2 = $neb->replicate_object($key);
     34    my $uri1 = $neb->create_object("foo");
     35    my $uri2 = $neb->replicate_object("foo");
    3836
    39     ok($neb->delete_instance($key, $uri1), "delete instance");
     37    ok($neb->delete_instance($uri1), "delete instance");
    4038
    41     my $locations = $neb->find_instances($key);
     39    my $locations = $neb->find_instances("foo");
    4240
    4341    is($locations->[0], $uri2, "instance remains");
    4442
    45     ok($neb->delete_instance($key, $uri2), "delete instance");
     43    ok($neb->delete_instance( $uri2 ), "delete instance");
    4644
    4745    eval {
    48         $neb->find_instances($key);
     46        $neb->find_instances("foo");
    4947    };
    5048    like($@, qr/is valid object key/, "storage object was deleted");
     
    5452
    5553eval {
    56     my $key = "foo";
    57     my $uri1 = $neb->create_object($key);
    58 
    59     $neb->delete_instance($key, "file:/foo");
     54    $neb->delete_instance("file:/foo");
    6055};
    6156like($@, qr/no instance is associated with uri/, "uri does not exist");
     
    6661    $neb->delete_instance();
    6762};
    68 like($@, qr/2 were expected/, "no params");
     63like($@, qr/1 was expected/, "no params");
    6964
    7065Test::Nebulous->setup;
    7166
    7267eval {
    73     my $key = "foo";
    74     my $uri1 = $neb->create_object($key);
    75 
    76     $neb->delete_instance("foo", 2, 3);
     68    $neb->delete_instance("foo", 2);
    7769};
    78 like($@, qr/2 were expected/, "too many params");
     70like($@, qr/1 was expected/, "too many params");
    7971
    8072Test::Nebulous->cleanup;
Note: See TracChangeset for help on using the changeset viewer.