Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix CPAN testers report of MSWin32 failure

  • Loading branch information...
commit 3165e4f0c503d9bd2d3d04659d45920463b7ee00 1 parent 3c029e7
@cosimo authored
View
5 Changes
@@ -1,5 +1,10 @@
Revision history for Net::Prober
+0.11 - Mon Jan 8 09:35:00 Europe/Oslo 2014
+
+ Fixed t/tcp.t and t/port-names.t test failures on Windows platform:
+ http://www.cpantesters.org/cpan/report/bfda167b-6d80-1014-b726-584155012b15
+
0.10 - Mon Jan 7 17:05:00 Europe/Oslo 2014
Added arbitrary HTTP method probing, with POST requests support,
View
2  dist.ini
@@ -4,7 +4,7 @@ license = Perl_5
copyright_holder = Cosimo Streppone
copyright_year = 2014
-version = 0.10
+version = 0.11
[@Basic]
[PkgVersion]
View
16 lib/Net/Prober.pm
@@ -13,14 +13,14 @@ Net::Prober - Probes network hosts for downtime, latency, etc...
use Net::Prober;
my $result = Net::Prober::probe({
- class => 'tcp',
- port => 'ssh',
- host => 'localhost',
- timeout => 0.5,
+ class => 'tcp',
+ port => 'ssh',
+ host => 'localhost',
+ timeout => 3.5,
});
# $result = {
- # ok => 1,
+ # ok => 1,
# time => 0.0002345,
# host => '127.0.0.1',
# port => 22,
@@ -30,9 +30,9 @@ Net::Prober - Probes network hosts for downtime, latency, etc...
my $result = Net::Prober::probe({
protocol => 'http',
- host => 'www.opera.com',
- url => '/browser',
- match => 'Faster',
+ host => 'www.opera.com',
+ url => '/browser',
+ match => 'Faster',
});
=head1 DESCRIPTION
View
18 t/port-names.t
@@ -13,16 +13,22 @@ Check that port names are resolved to numbers
use strict;
use warnings;
-use Test::More tests => 5;
+use Test::More tests => 6;
use Net::Prober;
-is(Net::Prober::port_name_to_num(undef) => undef);
-is(Net::Prober::port_name_to_num(23) => 23);
-is(Net::Prober::port_name_to_num("ftp") => 21);
-is(Net::Prober::port_name_to_num("ssh") => 22);
+is Net::Prober::port_name_to_num(undef) => undef;
+is Net::Prober::port_name_to_num(23) => 23;
+is Net::Prober::port_name_to_num("ftp") => 21;
+is Net::Prober::port_name_to_num("echo") => 7;
+
+SKIP: {
+ skip("'ssh' port can be undefined on Windows systems", 1)
+ if "MSWin32" eq $^O;
+ is Net::Prober::port_name_to_num("ssh") => 22;
+}
SKIP: {
skip("'http' port name apparently not defined on Solaris", 1)
if "solaris" eq $^O;
- is(Net::Prober::port_name_to_num("http") => 80);
+ is Net::Prober::port_name_to_num("http") => 80;
}
View
13 t/tcp.t
@@ -19,9 +19,9 @@ use Test::More tests => 6;
use Net::Prober;
my $result = Net::Prober::probe_tcp({
- proto => 'tcp',
- port => 'ssh',
- host => 'localhost',
+ proto => 'tcp',
+ port => '22',
+ host => 'localhost',
timeout => 0.5,
});
@@ -37,9 +37,9 @@ ok(exists $result->{time}
);
$result = Net::Prober::probe_tcp({
- proto => 'udp',
- port => 'echo',
- host => 'localhost',
+ proto => 'udp',
+ port => 'echo',
+ host => 'localhost',
timeout => 0.5,
});
@@ -53,4 +53,3 @@ ok(exists $result->{time}
&& $result->{time} <= 1.0,
"Got an elapsed time too ($result->{time}s)",
);
-
Please sign in to comment.
Something went wrong with that request. Please try again.