[Nagiosplug-devel] check_http.t / tinderbox inclusion
Matthias Eble
matthias.eble at mailing.kaufland-informationssysteme.com
Tue Mar 20 13:41:23 CET 2007
Hi list,
I'm currently working to get as many testcases as possible to work on my
local Ubuntu box to get it included in the tinderbox service. The only
problem remaining is the fact that check_http.t wants direct connection
to the internet for some tests and I can't get direct access to the
system(s).
What do you think about a skipping these cases (like in the diff-output
below) if no direct connection is available?
Thanks
Matthias
(diff -w)
--- check_http.t 2006-12-20 23:33:29.000000000 +0100
+++ check_http2.t 2007-03-20 13:14:06.000000000 +0100
@@ -27,6 +27,10 @@
"An invalid (not known to DNS) hostname",
"nosuchhost");
+my $internet_access = getTestParameter( "NP_INTERNET_ACCESS",
+ "Is this system directly connected to the internet?",
+ "yes");
+
$res = NPTest->testCmd(
"./check_http $host_tcp_http -wt 300 -ct 600"
);
@@ -58,6 +62,9 @@
# Is also possible to get a socket timeout if DNS is not responding
fast enough
like( $res->output, "/Unable to open TCP socket|Socket timeout
after/", "Output OK");
+SKIP: {
+ skip "No internet access", 18 unless $internet_access eq "yes";
+
$res = NPTest->testCmd(
"./check_http --ssl www.verisign.com"
);
@@ -106,4 +113,4 @@
$res = NPTest->testCmd( "./check_http -H www.mozilla.com -u /firefox
-f follow" );
is( $res->return_code, 0, "Redirection based on location is okay");
-
+}
More information about the Devel
mailing list