changeset 1904:c04134b0290b

Tests: removed deprecated "ssl" directive tests. In preparation for the directive removal.
author Sergey Kandaurov <pluknet@nginx.com>
date Mon, 05 Jun 2023 18:55:36 +0400
parents 4b41550ebdb3
children f35824e75b66
files mail_ssl.t ssl_reject_handshake.t
diffstat 2 files changed, 3 insertions(+), 29 deletions(-) [+]
line wrap: on
line diff
--- a/mail_ssl.t
+++ b/mail_ssl.t
@@ -54,13 +54,9 @@ mail {
     }
 
     server {
-        listen             127.0.0.1:8148;
+        listen             127.0.0.1:8148 ssl;
         protocol           imap;
 
-        # Special case for enabled "ssl" directive.
-
-        ssl on;
-
         ssl_certificate_key inherits.key;
         ssl_certificate inherits.crt;
     }
@@ -133,10 +129,7 @@ foreach my $name ('localhost', 'inherits
 }
 
 $t->write_file('password', 'localhost');
-
-open OLDERR, ">&", \*STDERR; close STDERR;
 $t->run();
-open STDERR, ">&", \*OLDERR;
 
 ###############################################################################
 
--- a/ssl_reject_handshake.t
+++ b/ssl_reject_handshake.t
@@ -23,7 +23,7 @@ select STDERR; $| = 1;
 select STDOUT; $| = 1;
 
 my $t = Test::Nginx->new()->has(qw/http http_ssl sni socket_ssl/)
-	->has_daemon('openssl');
+	->has_daemon('openssl')->plan(7);
 
 $t->write_file_expand('nginx.conf', <<'EOF');
 
@@ -47,16 +47,7 @@ http {
     }
 
     server {
-        listen       127.0.0.1:8081;
-        server_name  ssl;
-
-        ssl on;
-        ssl_reject_handshake on;
-    }
-
-    server {
         listen       127.0.0.1:8080;
-        listen       127.0.0.1:8081;
         server_name  virtual;
 
         ssl_certificate localhost.crt;
@@ -105,12 +96,7 @@ foreach my $name ('localhost') {
 }
 
 $t->write_file('index.html', '');
-
-# suppress deprecation warning
-
-open OLDERR, ">&", \*STDERR; close STDERR;
-$t->run()->plan(9);
-open STDERR, ">&", \*OLDERR;
+$t->run();
 
 ###############################################################################
 
@@ -120,11 +106,6 @@ like(get('default', 8080), qr/unrecogniz
 like(get(undef, 8080), qr/unrecognized name/, 'absent sni rejected');
 like(get('virtual', 8080), qr/virtual/, 'virtual accepted');
 
-# default virtual server rejected - ssl on
-
-like(get('default', 8081), qr/unrecognized name/, 'default rejected - ssl on');
-like(get('virtual', 8081), qr/virtual/, 'virtual accepted - ssl on');
-
 # non-default server "virtual2" rejected
 
 like(get('default', 8082), qr/default/, 'default accepted');