Commit b741a38a authored by Dan Reading's avatar Dan Reading

fix bit-rot to match current perl 5.14.2 and current cpan respository. Need to...

fix bit-rot to match current perl 5.14.2 and current cpan respository. Need to pull in more modules for xml-rpc ssl support.
parent 264fc28d
......@@ -25,6 +25,9 @@ package TestBed::XMLRPC::Client;
use SemiModern::Perl;
use Mouse;
use RPC::XML::Client;
use Net::SSL;
use LWP::Protocol::https;
use IO::Socket::SSL qw( SSL_VERIFY_NONE );
use TBConfig;
use Data::Dumper;
use Carp;
......@@ -40,12 +43,22 @@ BEGIN {
use TBConfig;
$ENV{HTTPS_CERT_FILE} = glob($TBConfig::SSL_CLIENT_CERT);
$ENV{HTTPS_KEY_FILE} = glob($TBConfig::SSL_CLIENT_KEY);
$ENV{HTTPS_DEBUG} = 0;
}
#constructs RPC::XML::Client with 10 minute socket timeout
has 'client' => ( isa => 'RPC::XML::Client', is => 'rw', default => sub {
my $HTTP_TIMEOUT = $TBConfig::XMLRPC_SERVER_TIMEOUT;
my $c = RPC::XML::Client->new($TBConfig::XMLRPC_SERVER, 'timeout' => ($HTTP_TIMEOUT));
my $c = RPC::XML::Client->new($TBConfig::XMLRPC_SERVER,
useragent => [
ssl_opts => {
verify_hostname => 0,
SSL_verify_mode => SSL_VERIFY_NONE,
},
],
error_handler => sub { die "Transport error: $_[0]" },
'timeout' => ($HTTP_TIMEOUT),
);
$c->{'__useragent'}->timeout($HTTP_TIMEOUT);
$c; } );
......
......@@ -36,5 +36,6 @@ ok($emuclient, 'Emulab new works');
isa_ok($emuclient, 'TestBed::XMLRPC::Client::Emulab');
my $time = timegm(0,0,0,1,0,2008);
my $resp = $emuclient->news('starting' => time2iso8601($time));
my $utctime => time2iso8601($time); # chop off the Z
my $resp = $emuclient->news('starting' => chop($utctime)); #? chop off the trailing Z
ok($resp, 'Valid Emulab::new response');
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment