summaryrefslogtreecommitdiffstats
path: root/plugins/tests/check_snmp.t
diff options
context:
space:
mode:
authorLorenz Kästle <lorenz.kaestle@netways.de>2023-04-28 09:00:05 (GMT)
committerLorenz Kästle <lorenz.kaestle@netways.de>2023-04-28 09:00:05 (GMT)
commit34c4d13edd8ece1e928c578974218c10d25600c4 (patch)
tree96eaf64dc46c8b785d437250d42471180597a699 /plugins/tests/check_snmp.t
parente4ddeb7bb722b50613108da1cb51a48e84068701 (diff)
parent7cb82e6486e662fa4d2530523787d3eced266545 (diff)
downloadmonitoring-plugins-34c4d13.tar.gz
Merge branch 'master' into RincewindsHat-patch-1
Diffstat (limited to 'plugins/tests/check_snmp.t')
-rwxr-xr-xplugins/tests/check_snmp.t4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/tests/check_snmp.t b/plugins/tests/check_snmp.t
index bc03ec6..bfe42e1 100755
--- a/plugins/tests/check_snmp.t
+++ b/plugins/tests/check_snmp.t
@@ -53,7 +53,7 @@ if ($pid) {
53 #print "child\n"; 53 #print "child\n";
54 54
55 print "Please contact SNMP at: $port_snmp\n"; 55 print "Please contact SNMP at: $port_snmp\n";
56 close(STDERR); # Coment out to debug snmpd problems (most errors sent there are OK) 56 close(STDERR); # Comment out to debug snmpd problems (most errors sent there are OK)
57 exec("snmpd -c tests/conf/snmpd.conf -C -f -r udp:$port_snmp"); 57 exec("snmpd -c tests/conf/snmpd.conf -C -f -r udp:$port_snmp");
58} 58}
59 59
@@ -227,7 +227,7 @@ is($res->output, 'SNMP OK - "555\"I said\"" | ', "Check string with a double quo
227 227
228$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.15 -r 'CUSTOM CHECK OK'" ); 228$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.15 -r 'CUSTOM CHECK OK'" );
229is($res->return_code, 0, "String check should check whole string, not a parsed number" ); 229is($res->return_code, 0, "String check should check whole string, not a parsed number" );
230is($res->output, 'SNMP OK - "CUSTOM CHECK OK: foo is 12345" | ', "String check witn numbers returns whole string"); 230is($res->output, 'SNMP OK - "CUSTOM CHECK OK: foo is 12345" | ', "String check with numbers returns whole string");
231 231
232$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.16 -w -2: -c -3:" ); 232$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.16 -w -2: -c -3:" );
233is($res->return_code, 0, "Negative integer check OK" ); 233is($res->return_code, 0, "Negative integer check OK" );