diff options
author | Thomas Guyot-Sionnest <dermoth@aei.ca> | 2009-03-18 03:51:16 -0400 |
---|---|---|
committer | Thomas Guyot-Sionnest <dermoth@aei.ca> | 2009-03-18 03:51:16 -0400 |
commit | ead340235ef352674a0033633dc913be5efc292b (patch) | |
tree | 3573e015758fa20ab0549386ee701b57569b376c /plugins/t/check_snmp.t | |
parent | e9f5442bb3ad6f6070c12f48ec5e3c0f43e26d9a (diff) | |
download | monitoring-plugins-ead340235ef352674a0033633dc913be5efc292b.tar.gz |
Add suggested multi-oid test (John A. Barbuto)
Diffstat (limited to 'plugins/t/check_snmp.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 6d3dcb4a..646cfa43 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 = 32; | 11 | my $tests = 34; |
12 | plan tests => $tests; | 12 | plan tests => $tests; |
13 | my $res; | 13 | my $res; |
14 | 14 | ||
@@ -81,6 +81,10 @@ SKIP: { | |||
81 | like($res->output, "/^SNMP CRITICAL - 2 *1*/", "Got two values back" ); | 81 | like($res->output, "/^SNMP CRITICAL - 2 *1*/", "Got two values back" ); |
82 | like( $res->perf_output, "/ifIndex.2=2/", "Got 1st perf data" ); | 82 | like( $res->perf_output, "/ifIndex.2=2/", "Got 1st perf data" ); |
83 | like( $res->perf_output, "/ifIndex.1=1/", "Got 2nd perf data" ); | 83 | like( $res->perf_output, "/ifIndex.1=1/", "Got 2nd perf data" ); |
84 | |||
85 | $res = NPTest->testCmd( "./check_snmp -H $host_snmp -C $snmp_community -o host.hrStorage.hrMemorySize.0,host.hrSystem.hrSystemProcesses.0 -w 1:,1: -c 1:,1:"); | ||
86 | cmp_ok( $res->return_code, '==', 0, "Exit OK when querying hrMemorySize and hrSystemProcesses"); | ||
87 | like($res->output, '/^SNMP OK - \d+ \d+/', "String contains hrMemorySize and hrSystemProcesses"); | ||
84 | } | 88 | } |
85 | 89 | ||
86 | SKIP: { | 90 | SKIP: { |