diff options
| author | Sven Nierlein <sven@consol.de> | 2013-09-14 19:36:20 +0200 |
|---|---|---|
| committer | Sven Nierlein <sven@consol.de> | 2013-09-14 19:36:20 +0200 |
| commit | 7b122f13dbb0bd714b47e1181ba36bfbb3bd7658 (patch) | |
| tree | e204afb0058a14c248dc9bcca1199b525cd2c706 /plugins/t/check_tcp.t | |
| parent | 32ec6265a4161790bc3a548b0d2c1237e30b0d1a (diff) | |
| download | monitoring-plugins-7b122f13dbb0bd714b47e1181ba36bfbb3bd7658.tar.gz | |
tests: move ipv6 detection into NPTest module
Diffstat (limited to 'plugins/t/check_tcp.t')
| -rw-r--r-- | plugins/t/check_tcp.t | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/plugins/t/check_tcp.t b/plugins/t/check_tcp.t index 0e6a9641..abb16aec 100644 --- a/plugins/t/check_tcp.t +++ b/plugins/t/check_tcp.t | |||
| @@ -6,19 +6,13 @@ | |||
| 6 | 6 | ||
| 7 | use strict; | 7 | use strict; |
| 8 | use Test; | 8 | use Test; |
| 9 | use NPTest; | ||
| 10 | 9 | ||
| 11 | use vars qw($tests); | 10 | use vars qw($tests $has_ipv6); |
| 12 | my $has_ipv6; | ||
| 13 | BEGIN { | 11 | BEGIN { |
| 14 | $tests = 11; | 12 | use NPTest; |
| 15 | # do we have ipv6 | 13 | $has_ipv6 = NPTest::has_ipv6(); |
| 16 | `ping6 -c 1 2a02:2e0:3fe:100::7 2>&1`; | 14 | $tests = $has_ipv6 ? 14 : 11; |
| 17 | if($? == 0) { | 15 | plan tests => $tests; |
| 18 | $has_ipv6 = 1; | ||
| 19 | $tests += 3; | ||
| 20 | } | ||
| 21 | plan tests => $tests; | ||
| 22 | } | 16 | } |
| 23 | 17 | ||
| 24 | 18 | ||
