r248@brr: dpavlin | 2007-11-20 14:08:48 +0100
[perl-cwmp.git] / t / 30-server.t
index 212bbc0..5926000 100755 (executable)
@@ -32,11 +32,14 @@ my $store_module = 'YAML';
 ok( my $server = CWMP::Server->new({
        debug => $debug,
        port => $port,
-       store => {
-               module => $store_module,
-               path => $store_path,
-               clean => 1,
-       },
+       session => {
+               store => {
+                       module => $store_module,
+                       path => $store_path,
+                       clean => 1,
+               },
+               create_dump => 0,
+       }
 }), 'new' );
 isa_ok( $server, 'CWMP::Server' );
 
@@ -170,7 +173,7 @@ my $state = {
   EventStruct    => ["0 BOOTSTRAP", "1 BOOT", "4 VALUE CHANGE"],
   ID             => "1_THOM_TR69_ID",
   MaxEnvelopes   => 2,
-  NoMoreRequests => undef,
+#  NoMoreRequests => undef,
   Parameter      => {
                       "\nInternetGatewayDevice.DeviceInfo.SpecVersion"                  => "1.1",
                       ".ExternalIPAddress"                                              => "192.168.1.254",
@@ -189,8 +192,11 @@ my $state = {
   _dispatch      => "InformResponse",
 };
 
-is_deeply( $store->get_state( ID => '1_THOM_TR69_ID' ), $state, 'new store->get_state' );
+is_deeply( $store->current_store->get_state( 'CP0644JTHJ4' ), $state, 'store->current_store->get_state' );
+
+diag "shutdown server";
 
 ok( kill(9,$pid), 'kill ' . $pid );
 
 ok( waitpid($pid,0), 'waitpid' );
+