Changeset 4440 for trunk/Nebulous-Server/t/apache_03_server_create_object.x
- Timestamp:
- Jun 29, 2005, 4:35:06 PM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Nebulous-Server/t/apache_03_server_create_object.x
r2785 r4440 11 11 12 12 use Apache::TestUtil; 13 use PS::IPP::IData::Util qw( :standard );13 use Nebulous::Util qw( :standard ); 14 14 use SOAP::Lite; 15 use Test:: IData;15 use Test::Nebulous; 16 16 17 17 my $hostport = Apache::Test::config()->{ 'hostport' }; 18 my $ idata= SOAP::Lite->new(19 proxy => "http://$hostport/ idata",20 uri => "http://pan-starrs.ifa.hawaii.edu/PS/IPP/ IData/Server",18 my $neb = SOAP::Lite->new( 19 proxy => "http://$hostport/nebulous", 20 uri => "http://pan-starrs.ifa.hawaii.edu/PS/IPP/Nebulous/Server", 21 21 ); 22 22 23 Test:: IData->setup;23 Test::Nebulous->setup; 24 24 25 25 { 26 26 # key 27 my $uri = $ idata->create_object( "foo" )->result;27 my $uri = $neb->create_object( "foo" )->result; 28 28 29 29 ok( -e _get_file_path( $uri ), "file exists" ); … … 32 32 } 33 33 34 Test:: IData->setup;34 Test::Nebulous->setup; 35 35 36 36 { 37 37 # key, class 38 my $uri = $ idata->create_object( "foo", 0 )->result;39 $ idata->delete_instance( $uri );38 my $uri = $neb->create_object( "foo", 0 )->result; 39 $neb->delete_instance( $uri ); 40 40 41 41 ok( -e _get_file_path( $uri ), "file exists" ); … … 44 44 } 45 45 46 Test:: IData->setup;46 Test::Nebulous->setup; 47 47 48 48 { 49 49 # key, class, volume 50 my $uri = $ idata->create_object( "foo", 0, "node01" )->result;51 $ idata->delete_instance( $uri );50 my $uri = $neb->create_object( "foo", 0, "node01" )->result; 51 $neb->delete_instance( $uri ); 52 52 53 53 ok( -e _get_file_path( $uri ), "file exists" ); … … 56 56 } 57 57 58 Test:: IData->setup;58 Test::Nebulous->setup; 59 59 60 60 { 61 61 # key, class, volume, comment 62 my $uri = $ idata->create_object( "foo", 0, "node01", "this is foo" )->result;63 $ idata->delete_instance( $uri );62 my $uri = $neb->create_object( "foo", 0, "node01", "this is foo" )->result; 63 $neb->delete_instance( $uri ); 64 64 65 65 ok( -e _get_file_path( $uri ), "file exists" ); … … 68 68 } 69 69 70 Test:: IData->setup;70 Test::Nebulous->setup; 71 71 72 72 { 73 $ idata->create_object( "foo" );74 my $response = $ idata->create_object( "foo" );73 $neb->create_object( "foo" ); 74 my $response = $neb->create_object( "foo" ); 75 75 76 76 like( $response->faultstring, qr/Duplicate entry/, "object already exists" ); 77 77 } 78 78 79 Test:: IData->setup;79 Test::Nebulous->setup; 80 80 81 81 { 82 my $response = $ idata->create_object();82 my $response = $neb->create_object(); 83 83 84 84 like( $response->faultstring, qr/2 - 4 were expected/, "no params" ); 85 85 } 86 86 87 Test:: IData->setup;87 Test::Nebulous->setup; 88 88 89 89 { 90 my $response = $ idata->create_object( 1, 2, 3, 4, 5 );90 my $response = $neb->create_object( 1, 2, 3, 4, 5 ); 91 91 92 92 like( $response->faultstring, qr/2 - 4 were expected/, "too many params" ); 93 93 } 94 94 95 Test:: IData->cleanup;95 Test::Nebulous->cleanup;
Note:
See TracChangeset
for help on using the changeset viewer.
