diff options
author | Franz Schwartau <franz@electromail.org> | 2023-08-29 10:58:31 +0200 |
---|---|---|
committer | Franz Schwartau <franz@electromail.org> | 2023-08-30 15:04:32 +0200 |
commit | 8fa9370a0c0d576c5e8cb945e4195541be7f3823 (patch) | |
tree | 813f3c77558bbe32a4a95d072f4d88e1806ebde1 /plugins/t/check_smtp.t | |
parent | 554c1433cf624cd0ed0565e4a8d06ea5e4bdf942 (diff) | |
download | monitoring-plugins-8fa9370.tar.gz |
Rename test variables for upcoming new variables with the same name
Diffstat (limited to 'plugins/t/check_smtp.t')
-rw-r--r-- | plugins/t/check_smtp.t | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/plugins/t/check_smtp.t b/plugins/t/check_smtp.t index aa6dae45..fd09ed22 100644 --- a/plugins/t/check_smtp.t +++ b/plugins/t/check_smtp.t | |||
@@ -8,12 +8,12 @@ use strict; | |||
8 | use Test::More; | 8 | use Test::More; |
9 | use NPTest; | 9 | use NPTest; |
10 | 10 | ||
11 | my $host_tcp_smtp = getTestParameter( "NP_HOST_TCP_SMTP", | 11 | my $host_tcp_smtp = getTestParameter( "NP_HOST_TCP_SMTP", |
12 | "A host providing an SMTP Service (a mail server)", "mailhost"); | 12 | "A host providing an SMTP Service (a mail server)", "mailhost"); |
13 | my $host_tcp_smtp_tls = getTestParameter( "NP_HOST_TCP_SMTP_TLS", | 13 | my $host_tcp_smtp_starttls = getTestParameter( "NP_HOST_TCP_SMTP_STARTTLS", |
14 | "A host providing SMTP with TLS", $host_tcp_smtp); | 14 | "A host providing SMTP with STARTTLS", $host_tcp_smtp); |
15 | my $host_tcp_smtp_notls = getTestParameter( "NP_HOST_TCP_SMTP_NOTLS", | 15 | my $host_tcp_smtp_nostarttls = getTestParameter( "NP_HOST_TCP_SMTP_NOSTARTTLS", |
16 | "A host providing SMTP without TLS", ""); | 16 | "A host providing SMTP without STARTTLS", ""); |
17 | 17 | ||
18 | my $host_nonresponsive = getTestParameter( "NP_HOST_NONRESPONSIVE", | 18 | my $host_nonresponsive = getTestParameter( "NP_HOST_NONRESPONSIVE", |
19 | "The hostname of system not responsive to network requests", "10.0.0.1" ); | 19 | "The hostname of system not responsive to network requests", "10.0.0.1" ); |
@@ -45,16 +45,16 @@ SKIP: { | |||
45 | } | 45 | } |
46 | 46 | ||
47 | SKIP: { | 47 | SKIP: { |
48 | skip "No SMTP server with TLS defined", 1 unless $host_tcp_smtp_tls; | 48 | skip "No SMTP server with STARTTLS defined", 1 unless $host_tcp_smtp_starttls; |
49 | # SSL connection for TLS | 49 | # SSL connection for STARTTLS |
50 | $res = NPTest->testCmd( "./check_smtp -H $host_tcp_smtp_tls -p 25 -S" ); | 50 | $res = NPTest->testCmd( "./check_smtp -H $host_tcp_smtp_starttls -p 25 -S" ); |
51 | is ($res->return_code, 0, "OK, with STARTTLS" ); | 51 | is ($res->return_code, 0, "OK, with STARTTLS" ); |
52 | } | 52 | } |
53 | 53 | ||
54 | SKIP: { | 54 | SKIP: { |
55 | skip "No SMTP server without TLS defined", 2 unless $host_tcp_smtp_notls; | 55 | skip "No SMTP server without STARTTLS defined", 2 unless $host_tcp_smtp_nostarttls; |
56 | $res = NPTest->testCmd( "./check_smtp -H $host_tcp_smtp_notls -p 25 -S" ); | 56 | $res = NPTest->testCmd( "./check_smtp -H $host_tcp_smtp_nostarttls -p 25 -S" ); |
57 | is ($res->return_code, 1, "OK, got warning from server without TLS"); | 57 | is ($res->return_code, 1, "OK, got warning from server without STARTTLS"); |
58 | is ($res->output, "WARNING - TLS not supported by server", "Right error message" ); | 58 | is ($res->output, "WARNING - TLS not supported by server", "Right error message" ); |
59 | } | 59 | } |
60 | 60 | ||