summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorLorenz Kästle <lorenz.kaestle@netways.de>2023-08-28 09:58:27 +0200
committerLorenz Kästle <lorenz.kaestle@netways.de>2023-08-28 10:31:21 +0200
commitc6abf11e021ded0592bd6697040bde93cf64b022 (patch)
treeb54d9abeac10f702d7e2abe703026e755aba06d0 /plugins
parentc57b7157daa0a170f9ef76776d493afa123a8d32 (diff)
downloadmonitoring-plugins-c6abf11e021ded0592bd6697040bde93cf64b022.tar.gz
Enhance regex in test to be more tolerant to follow up text
Diffstat (limited to 'plugins')
-rw-r--r--plugins/t/check_snmp.t2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/t/check_snmp.t b/plugins/t/check_snmp.t
index 7d5abc21..576cc506 100644
--- a/plugins/t/check_snmp.t
+++ b/plugins/t/check_snmp.t
@@ -172,5 +172,5 @@ SKIP: {
172 skip "no non invalid host defined", 2 if ( ! $hostname_invalid ); 172 skip "no non invalid host defined", 2 if ( ! $hostname_invalid );
173 $res = NPTest->testCmd( "./check_snmp -H $hostname_invalid --ignore-mib-parsing-errors -C np_foobar -o system.sysUpTime.0 -w 1: -c 1:"); 173 $res = NPTest->testCmd( "./check_snmp -H $hostname_invalid --ignore-mib-parsing-errors -C np_foobar -o system.sysUpTime.0 -w 1: -c 1:");
174 cmp_ok( $res->return_code, '==', 3, "Exit UNKNOWN with non responsive host" ); 174 cmp_ok( $res->return_code, '==', 3, "Exit UNKNOWN with non responsive host" );
175 like($res->output, '/External command error: .*(nosuchhost|Name or service not known|Unknown host)/', "String matches invalid host"); 175 like($res->output, '/External command error: .*(nosuchhost|Name or service not known|Unknown host).*/s', "String matches invalid host");
176} 176}