From 843f9540562930391b7db224664adbf951f11275 Mon Sep 17 00:00:00 2001 From: Sven Nierlein Date: Wed, 27 Jun 2012 00:02:09 +0200 Subject: check_snmp: use single quotes for perf data labels --- plugins/tests/check_snmp.t | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'plugins/tests/check_snmp.t') diff --git a/plugins/tests/check_snmp.t b/plugins/tests/check_snmp.t index 7a5a8b3f..1ef0b209 100755 --- a/plugins/tests/check_snmp.t +++ b/plugins/tests/check_snmp.t @@ -8,7 +8,7 @@ use Test::More; use NPTest; use FindBin qw($Bin); -my $tests = 51; +my $tests = 53; # Check that all dependent modules are available eval { require NetSNMP::OID; @@ -165,6 +165,10 @@ $res = NPTest->testCmd( "./check_snmp -H 127.0.0.1 -C public -p $port_snmp -o .1 is($res->return_code, 0, "OK as no thresholds" ); is($res->output, "SNMP OK - 70660 | iso.3.6.1.4.1.8072.3.2.67.10=70660c ", "Check label"); +$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'" ); +is($res->return_code, 0, "OK as no thresholds" ); +is($res->output, "SNMP OK - test test 71326 | 'test test'=71326c ", "Check label"); + $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" ); is($res->return_code, 0, "OK for first call" ); -- cgit v1.2.3