/[cwmp]/google/trunk/t/30-server.t
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /google/trunk/t/30-server.t

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 162 by dpavlin, Fri Oct 26 11:42:39 2007 UTC revision 163 by dpavlin, Sat Oct 27 22:55:55 2007 UTC
# Line 25  eval { Line 25  eval {
25  ok(my $abs_path = abs_path($0), "abs_path");  ok(my $abs_path = abs_path($0), "abs_path");
26  $abs_path =~ s!/[^/]*$!/!;      #!fix-vim  $abs_path =~ s!/[^/]*$!/!;      #!fix-vim
27    
28  my $store_path = "$abs_path/var/state.db";  my $store_path = "$abs_path/var/";
29  unlink $store_path if -e $store_path;  #my $store_module = 'DBMDeep';
30    my $store_module = 'YAML';
31    
32  ok( my $server = CWMP::Server->new({  ok( my $server = CWMP::Server->new({
33          debug => $debug,          debug => $debug,
34          port => $port,          port => $port,
35          store_path => $store_path,          store => {
36                    module => $store_module,
37                    path => $store_path,
38                    clean => 1,
39            },
40  }), 'new' );  }), 'new' );
41  isa_ok( $server, 'CWMP::Server' );  isa_ok( $server, 'CWMP::Server' );
42    
# Line 152  ok( $s->write_chunk_eof, 'write_chunk_eo Line 157  ok( $s->write_chunk_eof, 'write_chunk_eo
157    
158  sleep 1;  sleep 1;
159    
160  ok( my $store = CWMP::Store->new({ path => $store_path, debug => $debug }), 'another store' );  ok( my $store = CWMP::Store->new({ module => $store_module, path => $store_path, debug => $debug }), 'another store' );
161    
162  my $state = {  my $state = {
163    CurrentTime    => "1970-01-01T00:04:33Z",    CurrentTime    => "1970-01-01T00:04:33Z",
# Line 184  my $state = { Line 189  my $state = {
189    _dispatch      => "InformResponse",    _dispatch      => "InformResponse",
190  };  };
191    
192  is_deeply( $store->state( ID => '1_THOM_TR69_ID' ), $state, 'new store->state' );  is_deeply( $store->get_state( ID => '1_THOM_TR69_ID' ), $state, 'new store->get_state' );
193    
194  ok( kill(9,$pid), 'kill ' . $pid );  ok( kill(9,$pid), 'kill ' . $pid );
195    

Legend:
Removed from v.162  
changed lines
  Added in v.163

  ViewVC Help
Powered by ViewVC 1.1.26