summaryrefslogtreecommitdiffstats
path: root/plugins-scripts/t/check_ifstatus.t
diff options
context:
space:
mode:
authorMatthias Eble <psychotrahe@gmx.de>2009-06-13 11:10:32 +0200
committerMatthias Eble <psychotrahe@gmx.de>2009-06-13 11:10:32 +0200
commit05b801284c714e2e39a4fffc69d11d9cb78fe5ef (patch)
treec2060b0f31a6ed53b3fbefb1fbe1f9a625eeb084 /plugins-scripts/t/check_ifstatus.t
parent5a6268f72953d7d0aa0f22f278ac929b1f183686 (diff)
downloadmonitoring-plugins-05b801284c714e2e39a4fffc69d11d9cb78fe5ef.tar.gz
Further test parameters and skip blocks for check_ifoperstatus.t. getTestparam changes for check_ifstatus.t and ifoperstatus.t
Added snmp_interface and snmp_ifxtable test parameters to check_ifoperstatus.t. Also getTestParameter calls for both plugins were converted to use three arguments instead of undocumented >3 arg behaviour which led to redundant data in NPTest.cache.
Diffstat (limited to 'plugins-scripts/t/check_ifstatus.t')
-rw-r--r--plugins-scripts/t/check_ifstatus.t18
1 files changed, 10 insertions, 8 deletions
diff --git a/plugins-scripts/t/check_ifstatus.t b/plugins-scripts/t/check_ifstatus.t
index c5169d90..fc7052a6 100644
--- a/plugins-scripts/t/check_ifstatus.t
+++ b/plugins-scripts/t/check_ifstatus.t
@@ -16,17 +16,19 @@ my $plugin = "check_ifstatus";
16SKIP: { 16SKIP: {
17 skip "$plugin is not created", $tests if ( ! -x $plugin ); 17 skip "$plugin is not created", $tests if ( ! -x $plugin );
18 18
19 my $host_snmp = getTestParameter( "host_snmp", "NP_HOST_SNMP", "localhost", 19 my $host_snmp = getTestParameter( "NP_HOST_SNMP", "A host providing an SNMP Service", "localhost");
20 "A host providing an SNMP Service");
21 20
22 my $snmp_community = getTestParameter( "snmp_community", "NP_SNMP_COMMUNITY", "public", 21 my $snmp_community = getTestParameter( "NP_SNMP_COMMUNITY",
23 "The SNMP Community string for SNMP Testing (assumes snmp v1)" ); 22 "The SNMP Community string for SNMP Testing (pick default rather than 'none' when no snmp host is available)",
23 "public");
24 24
25 my $host_nonresponsive = getTestParameter( "host_nonresponsive", "NP_HOST_NONRESPONSIVE", "10.0.0.1", 25 my $host_nonresponsive = getTestParameter( "NP_HOST_NONRESPONSIVE",
26 "The hostname of system not responsive to network requests" ); 26 "The hostname of system not responsive to network requests", "10.0.0.1" );
27
28 my $hostname_invalid = getTestParameter( "NP_HOSTNAME_INVALID",
29 "An invalid (not known to DNS) hostname",
30 "nosuchhost" );
27 31
28 my $hostname_invalid = getTestParameter( "hostname_invalid", "NP_HOSTNAME_INVALID", "nosuchhost",
29 "An invalid (not known to DNS) hostname" );
30 32
31 $res = NPTest->testCmd( "./$plugin" ); 33 $res = NPTest->testCmd( "./$plugin" );
32 is( $res->return_code, 3, "No arguments" ); 34 is( $res->return_code, 3, "No arguments" );