Imported Upstream version 1.4.16+git20130919

This commit is contained in:
Jan Wagner 2013-11-27 00:00:57 +01:00
parent 01ca3b324f
commit 57371046fd
50 changed files with 3885 additions and 500 deletions

View file

@ -59,6 +59,8 @@ if ($opt_V) {
if ($opt_h) {print_help(); exit $ERRORS{'OK'};}
my $smbclient = $utils::PATH_TO_SMBCLIENT;
$smbclient || usage("check requires smbclient, smbclient not set\n");
-x $smbclient || usage("check requires smbclient, $smbclient: $!\n");
# Options checking

View file

@ -31,7 +31,7 @@ SKIP: {
"An access denying SMB share name the host provides",
"private");
my $host_nonresponsive = getTestParameter( "NP_HOST_NONRESPONSIVE",
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",
@ -46,7 +46,7 @@ SKIP: {
$res = NPTest->testCmd( "./$plugin" );
is( $res->return_code, 3, "No arguments" );
$res = NPTest->testCmd( "./$plugin -H fakehostname" );
is( $res->return_code, 3, "No share specified" );
@ -54,7 +54,7 @@ SKIP: {
is( $res->return_code, 3, "warn is less than critical" );
SKIP: {
skip "no smb host defined", 6 if ( ! $host );
skip "no smb host defined", 10 if ( ! $host );
SKIP: {
skip "no share name defined", 2 if ( ! $smb_share );
@ -90,7 +90,7 @@ SKIP: {
SKIP: {
skip "no non responsive host defined", 1 if ( ! $host_nonresponsive );
$res = NPTest->testCmd( "./$plugin -H $host_nonresponsive -s np_foobar ");
cmp_ok( $res->return_code, '==', 3, "Exit UNKNOWN with non responsive host" );
}
cmp_ok( $res->return_code, '==', 3, "Exit UNKNOWN with non responsive host" );
}
}