diff options
Diffstat (limited to 'plugins/t')
-rw-r--r-- | plugins/t/check_snmp.t | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/t/check_snmp.t b/plugins/t/check_snmp.t index e0138e6..2ce0858 100644 --- a/plugins/t/check_snmp.t +++ b/plugins/t/check_snmp.t | |||
@@ -8,7 +8,7 @@ use strict; | |||
8 | use Test::More; | 8 | use Test::More; |
9 | use NPTest; | 9 | use NPTest; |
10 | 10 | ||
11 | my $tests = 44; | 11 | my $tests = 46; |
12 | plan tests => $tests; | 12 | plan tests => $tests; |
13 | my $res; | 13 | my $res; |
14 | 14 | ||
@@ -54,6 +54,10 @@ SKIP: { | |||
54 | cmp_ok( $value, ">", 0, "Got a time value" ); | 54 | cmp_ok( $value, ">", 0, "Got a time value" ); |
55 | like($res->perf_output, "/sysUpTime.*$1/", "Got perfdata with value '$1' in it"); | 55 | like($res->perf_output, "/sysUpTime.*$1/", "Got perfdata with value '$1' in it"); |
56 | 56 | ||
57 | $res = NPTest->testCmd( "./check_snmp -H $host_snmp -C $snmp_community -o .1.3.6.1.2.1.1.3.0 -w 1: -c 1:"); | ||
58 | cmp_ok( $res->return_code, '==', 0, "Test with numeric OID (no mibs loaded)" ); | ||
59 | like($res->output, '/^SNMP OK - \d+/', "String contains SNMP OK"); | ||
60 | |||
57 | $res = NPTest->testCmd( "./check_snmp -H $host_snmp -C $snmp_community -o system.sysDescr.0"); | 61 | $res = NPTest->testCmd( "./check_snmp -H $host_snmp -C $snmp_community -o system.sysDescr.0"); |
58 | cmp_ok( $res->return_code, '==', 0, "Exit OK when querying sysDescr" ); | 62 | cmp_ok( $res->return_code, '==', 0, "Exit OK when querying sysDescr" ); |
59 | unlike($res->perf_output, '/sysDescr/', "Perfdata doesn't contain string values"); | 63 | unlike($res->perf_output, '/sysDescr/', "Perfdata doesn't contain string values"); |