summaryrefslogtreecommitdiffstats
path: root/plugins/tests
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/tests')
-rwxr-xr-xplugins/tests/check_snmp.t6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/tests/check_snmp.t b/plugins/tests/check_snmp.t
index 7a5a8b3..1ef0b20 100755
--- a/plugins/tests/check_snmp.t
+++ b/plugins/tests/check_snmp.t
@@ -8,7 +8,7 @@ use Test::More;
8use NPTest; 8use NPTest;
9use FindBin qw($Bin); 9use FindBin qw($Bin);
10 10
11my $tests = 51; 11my $tests = 53;
12# Check that all dependent modules are available 12# Check that all dependent modules are available
13eval { 13eval {
14 require NetSNMP::OID; 14 require NetSNMP::OID;
@@ -165,6 +165,10 @@ $res = NPTest->testCmd( "./check_snmp -H 127.0.0.1 -C public -p $port_snmp -o .1
165is($res->return_code, 0, "OK as no thresholds" ); 165is($res->return_code, 0, "OK as no thresholds" );
166is($res->output, "SNMP OK - 70660 | iso.3.6.1.4.1.8072.3.2.67.10=70660c ", "Check label"); 166is($res->output, "SNMP OK - 70660 | iso.3.6.1.4.1.8072.3.2.67.10=70660c ", "Check label");
167 167
168$res = NPTest->testCmd( "./check_snmp -H 127.0.0.1 -C public -p $port_snmp -o .1.3.6.1.4.1.8072.3.2.67.10 -l 'test test'" );
169is($res->return_code, 0, "OK as no thresholds" );
170is($res->output, "SNMP OK - test test 71326 | 'test test'=71326c ", "Check label");
171
168 172
169$res = NPTest->testCmd( "./check_snmp -H 127.0.0.1 -C public -p $port_snmp -o .1.3.6.1.4.1.8072.3.2.67.10 --rate -l inoctets_per_minute --rate-multiplier=60" ); 173$res = NPTest->testCmd( "./check_snmp -H 127.0.0.1 -C public -p $port_snmp -o .1.3.6.1.4.1.8072.3.2.67.10 --rate -l inoctets_per_minute --rate-multiplier=60" );
170is($res->return_code, 0, "OK for first call" ); 174is($res->return_code, 0, "OK for first call" );