summaryrefslogtreecommitdiffstats
path: root/plugins/t/check_smtp.t
diff options
context:
space:
mode:
authorLorenz Kästle <12514511+RincewindsHat@users.noreply.github.com>2025-03-09 11:32:40 +0100
committerGitHub <noreply@github.com>2025-03-09 11:32:40 +0100
commit6dbc84f93595be81aee4de4ac3122b942047c22d (patch)
tree885f684a971bdc9dcc9fb608454660ff343f6704 /plugins/t/check_smtp.t
parent1d55c2279731766a837b4973f3da79b3e3a6bd90 (diff)
parent0426b8947d9e03375219074c3741616599651db4 (diff)
downloadmonitoring-plugins-6dbc84f93595be81aee4de4ac3122b942047c22d.tar.gz
Merge pull request #2071 from RincewindsHat/refactor/check_ssh
Refactor/check ssh
Diffstat (limited to 'plugins/t/check_smtp.t')
-rw-r--r--plugins/t/check_smtp.t3
1 files changed, 1 insertions, 2 deletions
diff --git a/plugins/t/check_smtp.t b/plugins/t/check_smtp.t
index 1a1ebe3e..73b4a1fd 100644
--- a/plugins/t/check_smtp.t
+++ b/plugins/t/check_smtp.t
@@ -24,7 +24,7 @@ my $hostname_invalid = getTestParameter( "NP_HOSTNAME_INVALID",
24 "An invalid (not known to DNS) hostname", "nosuchhost" ); 24 "An invalid (not known to DNS) hostname", "nosuchhost" );
25my $res; 25my $res;
26 26
27plan tests => 16; 27plan tests => 15;
28 28
29SKIP: { 29SKIP: {
30 skip "No SMTP server defined", 4 unless $host_tcp_smtp; 30 skip "No SMTP server defined", 4 unless $host_tcp_smtp;
@@ -73,7 +73,6 @@ SKIP: {
73 my $unused_port = 4465; 73 my $unused_port = 4465;
74 $res = NPTest->testCmd( "./check_smtp -H $host_tcp_smtp_tls -p $unused_port --ssl" ); 74 $res = NPTest->testCmd( "./check_smtp -H $host_tcp_smtp_tls -p $unused_port --ssl" );
75 is ($res->return_code, 2, "Check rc of connecting to $host_tcp_smtp_tls with TLS on unused port $unused_port" ); 75 is ($res->return_code, 2, "Check rc of connecting to $host_tcp_smtp_tls with TLS on unused port $unused_port" );
76 like ($res->output, qr/^connect to address $host_tcp_smtp_tls and port $unused_port: Connection refused/, "Check output of connecting to $host_tcp_smtp_tls with TLS on unused port $unused_port");
77} 76}
78 77
79$res = NPTest->testCmd( "./check_smtp $host_nonresponsive" ); 78$res = NPTest->testCmd( "./check_smtp $host_nonresponsive" );