Subject: | 10-bindaddr.t fails on systems that don't support IPv6. |
I work with systems that do not have IPv6 configured.
10-bindaddr.t fails on them.
Here's a patch that seems to fix the problem, works on both my IPv6-less system and my mac OS X system.
--- foo/Server-Starter-0.22/t/10-bindaddr.t 2015-03-25 00:24:15.000000000 -0700
+++ Server-Starter-0.22/t/10-bindaddr.t 2015-03-29 14:32:33.787616000 -0700
@@ -42,11 +42,24 @@
wait();
}
-subtest "v4" => sub {
- doit("127.0.0.1", "::1");
-};
-subtest "v6" => sub {
- doit("::1", "127.0.0.1");
-};
+SKIP:
+{
+ # this will blow up on systems that don't support IPV6.
+ eval {
+ IO::Socket::IP->new(
+ PeerHost => '::1',
+ PeerPort => emptyport(),
+ Proto => 'tcp'
+ )
+ };
+ skip "IPV6 not supported", 4 if $@;
+
+ subtest "v4" => sub {
+ doit("127.0.0.1", "::1");
+ };
+ subtest "v6" => sub {
+ doit("::1", "127.0.0.1");
+ };
+}
done_testing;