Changeset 4440 for trunk/Nebulous-Server/t/09_server_stat_object.t
- Timestamp:
- Jun 29, 2005, 4:35:06 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/Nebulous-Server/t/09_server_stat_object.t (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Nebulous-Server/t/09_server_stat_object.t
r3016 r4440 3 3 # Copryight (C) 2004-2005 Joshua Hoblitt 4 4 # 5 # $Id: 09_server_stat_object.t,v 1. 4 2005-01-15 04:02:12jhoblitt Exp $5 # $Id: 09_server_stat_object.t,v 1.5 2005-06-30 02:35:06 jhoblitt Exp $ 6 6 7 7 use strict; … … 12 12 use lib qw( ./t ./lib ); 13 13 14 use PS::IPP::IData::Server;15 use PS::IPP::IData::Util qw( :standard );16 use Test:: IData;14 use Nebulous::Server; 15 use Nebulous::Util qw( :standard ); 16 use Test::Nebulous; 17 17 18 my $ idata = "PS::IPP::IData::Server";18 my $neb = "Nebulous::Server"; 19 19 20 $ idata->setup(20 $neb->setup( 21 21 "DBI:mysql:database=test:host=localhost", 22 22 "test", … … 24 24 ); 25 25 26 Test:: IData->setup;26 Test::Nebulous->setup; 27 27 28 28 { 29 my $uri = $ idata->create_object( "foo" );29 my $uri = $neb->create_object( "foo" ); 30 30 31 my $info = $ idata->stat_object( "foo" );31 my $info = $neb->stat_object( "foo" ); 32 32 33 33 is( scalar @$info, 8, "number of columns" ); 34 34 } 35 35 36 Test:: IData->setup;36 Test::Nebulous->setup; 37 37 38 38 { 39 my $uri = $ idata->create_object( "foo", 9, "node01", "foobar" );39 my $uri = $neb->create_object( "foo", 9, "node01", "foobar" ); 40 40 41 my $info = $ idata->stat_object( "foo" );41 my $info = $neb->stat_object( "foo" ); 42 42 43 43 is( scalar @$info, 8, "number of columns" ); … … 52 52 } 53 53 54 Test:: IData->setup;54 Test::Nebulous->setup; 55 55 56 56 eval { 57 $ idata->stat_object( "foo" );57 $neb->stat_object( "foo" ); 58 58 }; 59 59 like( $@, qr/no storage object found/, "object does not exist" ); 60 60 61 Test:: IData->setup;61 Test::Nebulous->setup; 62 62 63 63 eval { 64 $ idata->stat_object();64 $neb->stat_object(); 65 65 }; 66 66 like( $@, qr/1 was expected/, "no params" ); 67 67 68 Test:: IData->setup;68 Test::Nebulous->setup; 69 69 70 70 eval { 71 $ idata->stat_object( "foo", 2 );71 $neb->stat_object( "foo", 2 ); 72 72 }; 73 73 like( $@, qr/1 was expected/, "too many params" ); 74 74 75 Test:: IData->cleanup;75 Test::Nebulous->cleanup;
Note:
See TracChangeset
for help on using the changeset viewer.
