/[cwmp]/google/branches/store-pluggable/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/branches/store-pluggable/t/30-server.t

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

revision 84 by dpavlin, Fri Jun 22 18:25:24 2007 UTC revision 85 by dpavlin, Fri Jun 22 18:36:09 2007 UTC
# Line 4  use warnings; Line 4  use warnings;
4    
5  my $debug = shift @ARGV;  my $debug = shift @ARGV;
6    
7  use Test::More tests => 16;  use Test::More tests => 19;
8  use Data::Dump qw/dump/;  use Data::Dump qw/dump/;
9  use Cwd qw/abs_path/;  use Cwd qw/abs_path/;
10  use blib;  use blib;
# Line 12  use blib; Line 12  use blib;
12  BEGIN {  BEGIN {
13          use_ok('Net::HTTP');          use_ok('Net::HTTP');
14          use_ok('CWMP::Server');          use_ok('CWMP::Server');
15            use_ok('CWMP::Store');
16  }  }
17    
18  my $port = 4242;  my $port = 4242;
# Line 151  ok( $s->write_chunk_eof, 'write_chunk_eo Line 152  ok( $s->write_chunk_eof, 'write_chunk_eo
152    
153  sleep 1;  sleep 1;
154    
155    ok( my $store = CWMP::Store->new({ path => $store_path, debug => $debug }), 'another store' );
156    
157    my $state = {
158      CurrentTime    => "1970-01-01T00:04:33Z",
159      DeviceID       => {
160                          Manufacturer => "THOMSON",
161                          OUI => "00147F",
162                          ProductClass => "SpeedTouch 780",
163                          SerialNumber => "CP0644JTHJ4",
164                        },
165      EventStruct    => ["0 BOOTSTRAP", "1 BOOT", "4 VALUE CHANGE"],
166      ID             => "1_THOM_TR69_ID",
167      MaxEnvelopes   => 2,
168      NoMoreRequests => undef,
169      Parameter      => {
170                          "\nInternetGatewayDevice.DeviceInfo.SpecVersion"                  => "1.1",
171                          ".ExternalIPAddress"                                              => "192.168.1.254",
172                          "InternetGatewayDevice.DeviceInfo.HardwareVersion"                => "BANT-R",
173                          "InternetGatewayDevice.DeviceInfo.ProvisioningCode"               => undef,
174                          "InternetGatewayDevice.DeviceInfo.SoftwareVersion"                => "6.2.15.5",
175                          "InternetGatewayDevice.DeviceInfo.VendorConfigFile.1.Date"        => "0000-00-00T00:00:00",
176                          "InternetGatewayDevice.DeviceInfo.VendorConfigFile.1.Description" => "Factory Defaults",
177                          "InternetGatewayDevice.DeviceInfo.VendorConfigFile.1.Name"        => "Routed PPPoE on 0/35 and 8/35",
178                          "InternetGatewayDevice.DeviceInfo.VendorConfigFile.1.Version"     => undef,
179                          "InternetGatewayDevice.DeviceSummary"                             => "InternetGatewayDevice:1.1[] (Baseline:1, EthernetLAN:1, ADSLWAN:1, Bridging:1, Time:1, WiFiLAN:1)",
180                          "InternetGatewayDevice.ManagementServer.ConnectionRequestURL"     => "http://192.168.1.254:51005/",
181                          "InternetGatewayDevice.ManagementServer.ParameterKey"             => undef,
182                        },
183      RetryCount     => "01",
184      _dispatch      => "InformResponse",
185    };
186    
187    is_deeply( $store->state( '1_THOM_TR69_ID' ), $state, 'new store->state' );
188    
189  ok( kill(9,$pid), 'kill ' . $pid );  ok( kill(9,$pid), 'kill ' . $pid );
190    
191  ok( waitpid($pid,0), 'waitpid' );  ok( waitpid($pid,0), 'waitpid' );

Legend:
Removed from v.84  
changed lines
  Added in v.85

  ViewVC Help
Powered by ViewVC 1.1.26