IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 5497


Ignore:
Timestamp:
Nov 10, 2005, 11:30:32 AM (21 years ago)
Author:
jhoblitt
Message:

fix tests to work with Nebulous::Server->create_object() verifying class ids

Location:
trunk
Files:
5 edited

Legend:

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

    r5491 r5497  
    33# Copryight (C) 2004-2005  Joshua Hoblitt
    44#
    5 # $Id: 03_server_create_object.t,v 1.7 2005-11-09 01:33:09 jhoblitt Exp $
     5# $Id: 03_server_create_object.t,v 1.8 2005-11-10 21:30:32 jhoblitt Exp $
    66
    77use strict;
     
    8585    $neb->create_object( "foo", 99 );
    8686};
    87 like( $@, qr/Invalid class/, "class doesn't exist" );
     87like( $@, qr/did not pass the \'is valid class id\'/, "class doesn't exist" );
    8888
    8989Test::Nebulous->setup;
     
    9797
    9898eval {
    99     $neb->create_object( 1, 2, 3, 4, 5 );
     99    $neb->create_object( 1, 1, 1, 1, 1 );
    100100};
    101101like( $@, qr/2 - 4 were expected/, "too many params" );
  • trunk/Nebulous-Server/t/23_client_stat.t

    r4440 r5497  
    33# Copryight (C) 2004-2005  Joshua Hoblitt
    44#
    5 # $Id: 23_client_stat.t,v 1.3 2005-06-30 02:35:06 jhoblitt Exp $
     5# $Id: 23_client_stat.t,v 1.4 2005-11-10 21:30:32 jhoblitt Exp $
    66
    77use strict;
     
    3939        proxy => "http://$hostport/nebulous",
    4040    );
    41     $neb->create( "foo", 9, "node01", "foobar" );
     41    $neb->create( "foo", 0, "node01", "foobar" );
    4242
    4343    my $info = $neb->stat( "foo" );
     
    4646    is( @$info[0], 1,                           "so_id" );
    4747    is( @$info[1], "foo",                       "ext_id" );
    48     is( @$info[2], 9,                           "class_id" );
     48    is( @$info[2], 0,                           "class_id" );
    4949    is( @$info[3], "foobar",                    "comment" );
    5050    is( @$info[4], 0,                           "read lock" );
  • trunk/Nebulous/t/03_server_create_object.t

    r5491 r5497  
    33# Copryight (C) 2004-2005  Joshua Hoblitt
    44#
    5 # $Id: 03_server_create_object.t,v 1.7 2005-11-09 01:33:09 jhoblitt Exp $
     5# $Id: 03_server_create_object.t,v 1.8 2005-11-10 21:30:32 jhoblitt Exp $
    66
    77use strict;
     
    8585    $neb->create_object( "foo", 99 );
    8686};
    87 like( $@, qr/Invalid class/, "class doesn't exist" );
     87like( $@, qr/did not pass the \'is valid class id\'/, "class doesn't exist" );
    8888
    8989Test::Nebulous->setup;
     
    9797
    9898eval {
    99     $neb->create_object( 1, 2, 3, 4, 5 );
     99    $neb->create_object( 1, 1, 1, 1, 1 );
    100100};
    101101like( $@, qr/2 - 4 were expected/, "too many params" );
  • trunk/Nebulous/t/23_client_stat.t

    r4440 r5497  
    33# Copryight (C) 2004-2005  Joshua Hoblitt
    44#
    5 # $Id: 23_client_stat.t,v 1.3 2005-06-30 02:35:06 jhoblitt Exp $
     5# $Id: 23_client_stat.t,v 1.4 2005-11-10 21:30:32 jhoblitt Exp $
    66
    77use strict;
     
    3939        proxy => "http://$hostport/nebulous",
    4040    );
    41     $neb->create( "foo", 9, "node01", "foobar" );
     41    $neb->create( "foo", 0, "node01", "foobar" );
    4242
    4343    my $info = $neb->stat( "foo" );
     
    4646    is( @$info[0], 1,                           "so_id" );
    4747    is( @$info[1], "foo",                       "ext_id" );
    48     is( @$info[2], 9,                           "class_id" );
     48    is( @$info[2], 0,                           "class_id" );
    4949    is( @$info[3], "foobar",                    "comment" );
    5050    is( @$info[4], 0,                           "read lock" );
  • trunk/Nebulous/t/Test/Nebulous.pm

    r5490 r5497  
    11# Copyright (C) 2004  Joshua Hoblitt
    22#
    3 # $Id: Nebulous.pm,v 1.7 2005-11-09 01:31:07 jhoblitt Exp $
     3# $Id: Nebulous.pm,v 1.8 2005-11-10 21:30:32 jhoblitt Exp $
    44
    55package Test::Nebulous;
     
    4040    $dbh->do( qq{ INSERT INTO volume VALUES (2,'node02',?) }, undef, 'file:' . $dir2 );
    4141
    42     $dbh->do( qq{ INSERT INTO class VALUES (1, 0, "regular data") } );
    43     $dbh->do( qq{ INSERT INTO class VALUES (2, 1, "special data") } );
     42    $dbh->do( qq{ INSERT INTO class VALUES (0, 0, "regular data") } );
     43    $dbh->do( qq{ INSERT INTO class VALUES (1, 1, "special data") } );
    4444}
    4545
Note: See TracChangeset for help on using the changeset viewer.