Changeset 10546 for trunk/Nebulous/t
- Timestamp:
- Dec 7, 2006, 5:29:19 PM (20 years ago)
- Location:
- trunk/Nebulous/t
- Files:
-
- 11 edited
-
02_server_setup.t (modified) (3 diffs)
-
03_server_create_object.t (modified) (2 diffs)
-
04_server_replicate_object.t (modified) (2 diffs)
-
05_server_lock_object.t (modified) (2 diffs)
-
06_server_unlock_object.t (modified) (2 diffs)
-
07_server_find_instances.t (modified) (2 diffs)
-
08_server_delete_instance.t (modified) (2 diffs)
-
09_server_is_valid_class_id.t (modified) (3 diffs)
-
09_server_stat_object.t (modified) (2 diffs)
-
10_server_is_valid_volume_name.t (modified) (3 diffs)
-
11_server_is_valid_class_id.t (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Nebulous/t/02_server_setup.t
r4873 r10546 3 3 # Copryight (C) 2004-2005 Joshua Hoblitt 4 4 # 5 # $Id: 02_server_setup.t,v 1. 4 2005-08-25 01:40:04jhoblitt Exp $5 # $Id: 02_server_setup.t,v 1.5 2006-12-08 03:29:19 jhoblitt Exp $ 6 6 7 7 use strict; … … 17 17 Test::Nebulous->setup; 18 18 19 ok(20 Nebulous::Server-> init(19 isa_ok( 20 Nebulous::Server->new( 21 21 dsn => "DBI:mysql:database=test:host=localhost", 22 22 dbuser => "test", 23 23 dbpasswd => "", 24 24 ), 25 " connect",25 "Nebulous::Server" 26 26 ); 27 27 … … 29 29 30 30 eval { 31 Nebulous::Server-> init(31 Nebulous::Server->new( 32 32 dsn => "DBI:mysql:database=foobar:host=localhost", 33 33 dbuser => "baz", -
trunk/Nebulous/t/03_server_create_object.t
r5504 r10546 3 3 # Copryight (C) 2004-2005 Joshua Hoblitt 4 4 # 5 # $Id: 03_server_create_object.t,v 1.1 0 2005-11-10 22:07:53jhoblitt Exp $5 # $Id: 03_server_create_object.t,v 1.11 2006-12-08 03:29:19 jhoblitt Exp $ 6 6 7 7 use strict; … … 16 16 use Test::Nebulous; 17 17 18 my $neb = "Nebulous::Server"; 19 20 $neb->init( 18 my $neb = Nebulous::Server->new( 21 19 dsn => "DBI:mysql:database=test:host=localhost", 22 20 dbuser => "test", -
trunk/Nebulous/t/04_server_replicate_object.t
r4873 r10546 3 3 # Copryight (C) 2004-2005 Joshua Hoblitt 4 4 # 5 # $Id: 04_server_replicate_object.t,v 1. 5 2005-08-25 01:40:04jhoblitt Exp $5 # $Id: 04_server_replicate_object.t,v 1.6 2006-12-08 03:29:19 jhoblitt Exp $ 6 6 7 7 use strict; … … 16 16 use Test::Nebulous; 17 17 18 my $neb = "Nebulous::Server"; 19 20 $neb->init( 18 my $neb = Nebulous::Server->new( 21 19 dsn => "DBI:mysql:database=test:host=localhost", 22 20 dbuser => "test", -
trunk/Nebulous/t/05_server_lock_object.t
r4873 r10546 3 3 # Copryight (C) 2004-2005 Joshua Hoblitt 4 4 # 5 # $Id: 05_server_lock_object.t,v 1. 5 2005-08-25 01:40:04jhoblitt Exp $5 # $Id: 05_server_lock_object.t,v 1.6 2006-12-08 03:29:19 jhoblitt Exp $ 6 6 7 7 use strict; … … 16 16 use Test::Nebulous; 17 17 18 my $neb = "Nebulous::Server"; 19 20 $neb->init( 18 my $neb = Nebulous::Server->new( 21 19 dsn => "DBI:mysql:database=test:host=localhost", 22 20 dbuser => "test", -
trunk/Nebulous/t/06_server_unlock_object.t
r4873 r10546 3 3 # Copryight (C) 2004-2005 Joshua Hoblitt 4 4 # 5 # $Id: 06_server_unlock_object.t,v 1. 5 2005-08-25 01:40:04jhoblitt Exp $5 # $Id: 06_server_unlock_object.t,v 1.6 2006-12-08 03:29:19 jhoblitt Exp $ 6 6 7 7 use strict; … … 16 16 use Test::Nebulous; 17 17 18 my $neb = "Nebulous::Server"; 19 20 $neb->init( 18 my $neb = Nebulous::Server->new( 21 19 dsn => "DBI:mysql:database=test:host=localhost", 22 20 dbuser => "test", -
trunk/Nebulous/t/07_server_find_instances.t
r4873 r10546 3 3 # Copryight (C) 2004-2005 Joshua Hoblitt 4 4 # 5 # $Id: 07_server_find_instances.t,v 1. 5 2005-08-25 01:40:04jhoblitt Exp $5 # $Id: 07_server_find_instances.t,v 1.6 2006-12-08 03:29:19 jhoblitt Exp $ 6 6 7 7 use strict; … … 16 16 use Test::Nebulous; 17 17 18 my $neb = "Nebulous::Server"; 19 20 $neb->init( 18 my $neb = Nebulous::Server->new( 21 19 dsn => "DBI:mysql:database=test:host=localhost", 22 20 dbuser => "test", -
trunk/Nebulous/t/08_server_delete_instance.t
r4873 r10546 3 3 # Copryight (C) 2004-2005 Joshua Hoblitt 4 4 # 5 # $Id: 08_server_delete_instance.t,v 1. 5 2005-08-25 01:40:04jhoblitt Exp $5 # $Id: 08_server_delete_instance.t,v 1.6 2006-12-08 03:29:19 jhoblitt Exp $ 6 6 7 7 use strict; … … 16 16 use Test::Nebulous; 17 17 18 my $neb = "Nebulous::Server"; 19 20 $neb->init( 18 my $neb = Nebulous::Server->new( 21 19 dsn => "DBI:mysql:database=test:host=localhost", 22 20 dbuser => "test", -
trunk/Nebulous/t/09_server_is_valid_class_id.t
r5498 r10546 3 3 # Copryight (C) 2004-2005 Joshua Hoblitt 4 4 # 5 # $Id: 09_server_is_valid_class_id.t,v 1. 1 2005-11-10 21:31:26jhoblitt Exp $5 # $Id: 09_server_is_valid_class_id.t,v 1.2 2006-12-08 03:29:19 jhoblitt Exp $ 6 6 7 7 use strict; … … 16 16 use Test::Nebulous; 17 17 18 my $neb = "Nebulous::Server"; 19 20 $neb->init( 18 my $neb = Nebulous::Server->new( 21 19 dsn => "DBI:mysql:database=test:host=localhost", 22 20 dbuser => "test", … … 24 22 ); 25 23 26 *_is_valid_class_id = \&Nebulous::Server::_is_valid_class_id;27 28 24 Test::Nebulous->setup; 29 25 30 26 # 0 is the default and is guarenteed to exist 31 ok( _is_valid_class_id( 0 ), "default class id");27 ok( $neb->_is_valid_class_id( 0 ), "default class id"); 32 28 33 29 Test::Nebulous->setup; 34 30 35 31 # the test setup adds class id 1 36 ok( _is_valid_class_id( 1 ), "custom class id");32 ok( $neb->_is_valid_class_id( 1 ), "custom class id"); 37 33 38 34 Test::Nebulous->setup; 39 35 40 is( _is_valid_class_id( 99 ), undef, "invalid class id");36 is( $neb->_is_valid_class_id( 99 ), undef, "invalid class id"); 41 37 42 38 Test::Nebulous->cleanup; -
trunk/Nebulous/t/09_server_stat_object.t
r5492 r10546 3 3 # Copryight (C) 2004-2005 Joshua Hoblitt 4 4 # 5 # $Id: 09_server_stat_object.t,v 1. 7 2005-11-09 01:35:59 jhoblitt Exp $5 # $Id: 09_server_stat_object.t,v 1.8 2006-12-08 03:29:19 jhoblitt Exp $ 6 6 7 7 use strict; … … 16 16 use Test::Nebulous; 17 17 18 my $neb = "Nebulous::Server"; 19 20 $neb->init( 18 my $neb = Nebulous::Server->new( 21 19 dsn => "DBI:mysql:database=test:host=localhost", 22 20 dbuser => "test", -
trunk/Nebulous/t/10_server_is_valid_volume_name.t
r5667 r10546 3 3 # Copryight (C) 2004-2005 Joshua Hoblitt 4 4 # 5 # $Id: 10_server_is_valid_volume_name.t,v 1. 1 2005-12-03 02:52:31jhoblitt Exp $5 # $Id: 10_server_is_valid_volume_name.t,v 1.2 2006-12-08 03:29:19 jhoblitt Exp $ 6 6 7 7 use strict; … … 16 16 use Test::Nebulous; 17 17 18 my $neb = "Nebulous::Server"; 19 20 $neb->init( 18 my $neb = Nebulous::Server->new( 21 19 dsn => "DBI:mysql:database=test:host=localhost", 22 20 dbuser => "test", … … 24 22 ); 25 23 26 *_is_valid_volume_name = \&Nebulous::Server::_is_valid_volume_name; 24 Test::Nebulous->setup; 25 26 ok( $neb->_is_valid_volume_name( 'node01' ), "valid volume name" ); 27 27 28 28 Test::Nebulous->setup; 29 29 30 ok( _is_valid_volume_name( 'node01' ), "valid volume name" );30 ok( $neb->_is_valid_volume_name( 'node02' ), "valid volume name" ); 31 31 32 32 Test::Nebulous->setup; 33 33 34 ok( _is_valid_volume_name( 'node02' ), "valid volume name" ); 35 36 Test::Nebulous->setup; 37 38 is( _is_valid_volume_name( 'node99' ), undef, "invalid volume name" ); 34 is( $neb->_is_valid_volume_name( 'node99' ), undef, "invalid volume name" ); 39 35 40 36 Test::Nebulous->cleanup; -
trunk/Nebulous/t/11_server_is_valid_class_id.t
r5667 r10546 3 3 # Copryight (C) 2004-2005 Joshua Hoblitt 4 4 # 5 # $Id: 11_server_is_valid_class_id.t,v 1. 1 2005-12-03 02:52:31jhoblitt Exp $5 # $Id: 11_server_is_valid_class_id.t,v 1.2 2006-12-08 03:29:19 jhoblitt Exp $ 6 6 7 7 use strict; … … 16 16 use Test::Nebulous; 17 17 18 my $neb = "Nebulous::Server"; 19 20 $neb->init( 18 my $neb = Nebulous::Server->new( 21 19 dsn => "DBI:mysql:database=test:host=localhost", 22 20 dbuser => "test", … … 24 22 ); 25 23 26 *_is_valid_class_id = \&Nebulous::Server::_is_valid_class_id;27 28 24 Test::Nebulous->setup; 29 25 30 26 # 0 is the default and is guarenteed to exist 31 ok( _is_valid_class_id( 0 ), "default class id");27 ok( $neb->_is_valid_class_id( 0 ), "default class id"); 32 28 33 29 Test::Nebulous->setup; 34 30 35 31 # the test setup adds class id 1 36 ok( _is_valid_class_id( 1 ), "custom class id");32 ok( $neb->_is_valid_class_id( 1 ), "custom class id"); 37 33 38 34 Test::Nebulous->setup; 39 35 40 is( _is_valid_class_id( 99 ), undef, "invalid class id");36 is( $neb->_is_valid_class_id( 99 ), undef, "invalid class id"); 41 37 42 38 Test::Nebulous->cleanup;
Note:
See TracChangeset
for help on using the changeset viewer.
