From 05b801284c714e2e39a4fffc69d11d9cb78fe5ef Mon Sep 17 00:00:00 2001 From: Matthias Eble Date: Sat, 13 Jun 2009 11:10:32 +0200 Subject: 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. --- plugins-scripts/t/check_ifstatus.t | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'plugins-scripts/t/check_ifstatus.t') 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"; SKIP: { skip "$plugin is not created", $tests if ( ! -x $plugin ); - my $host_snmp = getTestParameter( "host_snmp", "NP_HOST_SNMP", "localhost", - "A host providing an SNMP Service"); + my $host_snmp = getTestParameter( "NP_HOST_SNMP", "A host providing an SNMP Service", "localhost"); - my $snmp_community = getTestParameter( "snmp_community", "NP_SNMP_COMMUNITY", "public", - "The SNMP Community string for SNMP Testing (assumes snmp v1)" ); + my $snmp_community = getTestParameter( "NP_SNMP_COMMUNITY", + "The SNMP Community string for SNMP Testing (pick default rather than 'none' when no snmp host is available)", + "public"); - my $host_nonresponsive = getTestParameter( "host_nonresponsive", "NP_HOST_NONRESPONSIVE", "10.0.0.1", - "The hostname of system not responsive to network requests" ); + my $host_nonresponsive = getTestParameter( "NP_HOST_NONRESPONSIVE", + "The hostname of system not responsive to network requests", "10.0.0.1" ); + + my $hostname_invalid = getTestParameter( "NP_HOSTNAME_INVALID", + "An invalid (not known to DNS) hostname", + "nosuchhost" ); - my $hostname_invalid = getTestParameter( "hostname_invalid", "NP_HOSTNAME_INVALID", "nosuchhost", - "An invalid (not known to DNS) hostname" ); $res = NPTest->testCmd( "./$plugin" ); is( $res->return_code, 3, "No arguments" ); -- cgit v1.2.3