IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 30, 2007, 4:52:04 PM (19 years ago)
Author:
jhoblitt
Message:

remove $class_id & $comment params from Nebulous::Server->create() and Nebulous::Client->create*() and all supporting functions and tests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Nebulous-Server/t/03_server_create_object.t

    r12960 r13092  
    33# Copryight (C) 2004-2005  Joshua Hoblitt
    44#
    5 # $Id: 03_server_create_object.t,v 1.12 2007-04-23 20:42:29 jhoblitt Exp $
     5# $Id: 03_server_create_object.t,v 1.13 2007-05-01 02:52:04 jhoblitt Exp $
    66
    77use strict;
    88use warnings FATAL => qw( all );
    99
    10 use Test::More tests => 14;
     10use Test::More tests => 8;
    1111
    1212use lib qw( ./t ./lib );
     
    3838
    3939{
    40     # key, class
    41     my $uri = $neb->create_object("foo", 0);
    42 
    43     my ($scheme, $auth, $path, $query, $frag) = uri_split($uri);
    44     ok(-e $path, "file exists");
    45     uri_scheme_ok($uri, 'file');
    46 }
    47 
    48 Test::Nebulous->setup;
    49 
    50 {
    51     # key, class, volume
    52     my $uri = $neb->create_object("foo", 0, "node01");
    53 
    54     my ($scheme, $auth, $path, $query, $frag) = uri_split($uri);
    55     ok(-e $path, "file exists");
    56     uri_scheme_ok($uri, 'file');
    57 }
    58 
    59 Test::Nebulous->setup;
    60 
    61 {
    62     # key, class, volume, comment
    63     my $uri = $neb->create_object("foo", 0, "node01", "this is foo");
     40    # key, volume
     41    my $uri = $neb->create_object("foo", "node01");
    6442
    6543    my ($scheme, $auth, $path, $query, $frag) = uri_split($uri);
     
    7856Test::Nebulous->setup;
    7957
    80 {
    81     my $uri = $neb->create_object("foo", 1);
    82 
    83     my ($scheme, $auth, $path, $query, $frag) = uri_split($uri);
    84     ok(-e $path, "class exists");
    85 }
    86 
    87 Test::Nebulous->setup;
    88 
    8958eval {
    9059    $neb->create_object("foo", 99);
    9160};
    92 like($@, qr/did not pass the \'is valid class id\'/, "class doesn't exist");
    93 
    94 Test::Nebulous->setup;
    95 
    96 eval {
    97     $neb->create_object(1, 0, 'node01', 'x' x 256);
    98 };
    99 like($@, qr/comment length/, "comment is too long");
     61like($@, qr/did not pass the \'is valid volume name\'/, "volume name doesn't exist");
    10062
    10163Test::Nebulous->setup;
     
    10466    $neb->create_object();
    10567};
    106 like($@, qr/2 - 4 were expected/, "no params");
     68like($@, qr/1 - 2 were expected/, "no params");
    10769
    10870Test::Nebulous->setup;
    10971
    11072eval {
    111     $neb->create_object( 1, 0, 'node01', 1, 1 );
     73    $neb->create_object(1, "node01", 3);
    11274};
    113 like($@, qr/2 - 4 were expected/, "too many params");
     75like($@, qr/1 - 2 were expected/, "too many params");
    11476
    11577Test::Nebulous->cleanup;
Note: See TracChangeset for help on using the changeset viewer.