IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 12644


Ignore:
Timestamp:
Mar 28, 2007, 11:53:20 AM (19 years ago)
Author:
jhoblitt
Message:

ws

Location:
trunk
Files:
4 edited

Legend:

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

    r10546 r12644  
    33# Copryight (C) 2004-2005  Joshua Hoblitt
    44#
    5 # $Id: 08_server_delete_instance.t,v 1.6 2006-12-08 03:29:19 jhoblitt Exp $
     5# $Id: 08_server_delete_instance.t,v 1.7 2007-03-28 21:50:26 jhoblitt Exp $
    66
    77use strict;
     
    2525
    2626{
    27     my $uri = $neb->create_object( "foo" );
     27    my $uri = $neb->create_object("foo");
    2828
    29     ok( $neb->delete_instance( $uri ), "delete instance" );
     29    ok($neb->delete_instance($uri), "delete instance");
    3030}
    3131
     
    3333
    3434{
    35     my $uri1 = $neb->create_object( "foo" );
    36     my $uri2 = $neb->replicate_object( "foo" );
     35    my $uri1 = $neb->create_object("foo");
     36    my $uri2 = $neb->replicate_object("foo");
    3737
    38     ok( $neb->delete_instance( $uri1 ), "delete instance" );
     38    ok($neb->delete_instance($uri1), "delete instance");
    3939
    40     my $locations = $neb->find_instances( "foo" );
     40    my $locations = $neb->find_instances("foo");
    4141
    42     is( $locations->[0], $uri2, "instance remains" );
     42    is($locations->[0], $uri2, "instance remains");
    4343
    44     ok( $neb->delete_instance( $uri2 ), "delete instance" );
     44    ok($neb->delete_instance( $uri2 ), "delete instance");
    4545
    4646    eval {
    47         $neb->find_instances( "foo" );
     47        $neb->find_instances("foo");
    4848    };
    49     like( $@, qr/no instances found/, "storage object was deleted" );
     49    like($@, qr/no instances found/, "storage object was deleted");
    5050}
    5151
     
    5353
    5454eval {
    55     $neb->delete_instance( "file:/foo" );
     55    $neb->delete_instance("file:/foo");
    5656};
    57 like( $@, qr/no instance is associated with uri/, "uri does not exist" );
     57like($@, qr/no instance is associated with uri/, "uri does not exist");
    5858
    5959Test::Nebulous->setup;
     
    6262    $neb->delete_instance();
    6363};
    64 like( $@, qr/1 was expected/, "no params" );
     64like($@, qr/1 was expected/, "no params");
    6565
    6666Test::Nebulous->setup;
    6767
    6868eval {
    69     $neb->delete_instance( "foo", 2 );
     69    $neb->delete_instance("foo", 2);
    7070};
    71 like( $@, qr/1 was expected/, "too many params" );
     71like($@, qr/1 was expected/, "too many params");
    7272
    7373Test::Nebulous->cleanup;
  • trunk/Nebulous-Server/t/09_server_is_valid_class_id.t

    r10546 r12644  
    33# Copryight (C) 2004-2005  Joshua Hoblitt
    44#
    5 # $Id: 09_server_is_valid_class_id.t,v 1.2 2006-12-08 03:29:19 jhoblitt Exp $
     5# $Id: 09_server_is_valid_class_id.t,v 1.3 2007-03-28 21:53:20 jhoblitt Exp $
    66
    77use strict;
     
    2525
    2626# 0 is the default and is guarenteed to exist
    27 ok( $neb->_is_valid_class_id( 0 ), "default class id");
     27ok($neb->_is_valid_class_id(0), "default class id");
    2828
    2929Test::Nebulous->setup;
    3030
    3131# the test setup adds class id 1
    32 ok( $neb->_is_valid_class_id( 1 ), "custom class id");
     32ok($neb->_is_valid_class_id(1), "custom class id");
    3333
    3434Test::Nebulous->setup;
    3535
    36 is( $neb->_is_valid_class_id( 99 ), undef, "invalid class id");
     36is($neb->_is_valid_class_id(99), undef, "invalid class id");
    3737
    3838Test::Nebulous->cleanup;
  • trunk/Nebulous/t/08_server_delete_instance.t

    r10546 r12644  
    33# Copryight (C) 2004-2005  Joshua Hoblitt
    44#
    5 # $Id: 08_server_delete_instance.t,v 1.6 2006-12-08 03:29:19 jhoblitt Exp $
     5# $Id: 08_server_delete_instance.t,v 1.7 2007-03-28 21:50:26 jhoblitt Exp $
    66
    77use strict;
     
    2525
    2626{
    27     my $uri = $neb->create_object( "foo" );
     27    my $uri = $neb->create_object("foo");
    2828
    29     ok( $neb->delete_instance( $uri ), "delete instance" );
     29    ok($neb->delete_instance($uri), "delete instance");
    3030}
    3131
     
    3333
    3434{
    35     my $uri1 = $neb->create_object( "foo" );
    36     my $uri2 = $neb->replicate_object( "foo" );
     35    my $uri1 = $neb->create_object("foo");
     36    my $uri2 = $neb->replicate_object("foo");
    3737
    38     ok( $neb->delete_instance( $uri1 ), "delete instance" );
     38    ok($neb->delete_instance($uri1), "delete instance");
    3939
    40     my $locations = $neb->find_instances( "foo" );
     40    my $locations = $neb->find_instances("foo");
    4141
    42     is( $locations->[0], $uri2, "instance remains" );
     42    is($locations->[0], $uri2, "instance remains");
    4343
    44     ok( $neb->delete_instance( $uri2 ), "delete instance" );
     44    ok($neb->delete_instance( $uri2 ), "delete instance");
    4545
    4646    eval {
    47         $neb->find_instances( "foo" );
     47        $neb->find_instances("foo");
    4848    };
    49     like( $@, qr/no instances found/, "storage object was deleted" );
     49    like($@, qr/no instances found/, "storage object was deleted");
    5050}
    5151
     
    5353
    5454eval {
    55     $neb->delete_instance( "file:/foo" );
     55    $neb->delete_instance("file:/foo");
    5656};
    57 like( $@, qr/no instance is associated with uri/, "uri does not exist" );
     57like($@, qr/no instance is associated with uri/, "uri does not exist");
    5858
    5959Test::Nebulous->setup;
     
    6262    $neb->delete_instance();
    6363};
    64 like( $@, qr/1 was expected/, "no params" );
     64like($@, qr/1 was expected/, "no params");
    6565
    6666Test::Nebulous->setup;
    6767
    6868eval {
    69     $neb->delete_instance( "foo", 2 );
     69    $neb->delete_instance("foo", 2);
    7070};
    71 like( $@, qr/1 was expected/, "too many params" );
     71like($@, qr/1 was expected/, "too many params");
    7272
    7373Test::Nebulous->cleanup;
  • trunk/Nebulous/t/09_server_is_valid_class_id.t

    r10546 r12644  
    33# Copryight (C) 2004-2005  Joshua Hoblitt
    44#
    5 # $Id: 09_server_is_valid_class_id.t,v 1.2 2006-12-08 03:29:19 jhoblitt Exp $
     5# $Id: 09_server_is_valid_class_id.t,v 1.3 2007-03-28 21:53:20 jhoblitt Exp $
    66
    77use strict;
     
    2525
    2626# 0 is the default and is guarenteed to exist
    27 ok( $neb->_is_valid_class_id( 0 ), "default class id");
     27ok($neb->_is_valid_class_id(0), "default class id");
    2828
    2929Test::Nebulous->setup;
    3030
    3131# the test setup adds class id 1
    32 ok( $neb->_is_valid_class_id( 1 ), "custom class id");
     32ok($neb->_is_valid_class_id(1), "custom class id");
    3333
    3434Test::Nebulous->setup;
    3535
    36 is( $neb->_is_valid_class_id( 99 ), undef, "invalid class id");
     36is($neb->_is_valid_class_id(99), undef, "invalid class id");
    3737
    3838Test::Nebulous->cleanup;
Note: See TracChangeset for help on using the changeset viewer.