Mercurial > hg > nginx-tests
changeset 1900:236d038dc04a
Tests: suppress "listen .. http2;" deprecation warnings.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Wed, 31 May 2023 13:29:34 +0400 |
parents | a0ee073760c5 |
children | f9bb84e4c8e2 |
files | grpc.t grpc_next_upstream.t grpc_pass.t grpc_request_buffering.t grpc_ssl.t h2.t h2_absolute_redirect.t h2_auth_request.t h2_error_page.t h2_fastcgi_request_buffering.t h2_headers.t h2_keepalive.t h2_limit_conn.t h2_limit_req.t h2_priority.t h2_proxy_cache.t h2_proxy_max_temp_file_size.t h2_proxy_protocol.t h2_proxy_request_buffering.t h2_proxy_request_buffering_redirect.t h2_proxy_request_buffering_ssl.t h2_proxy_ssl.t h2_request_body.t h2_request_body_extra.t h2_request_body_preread.t h2_server_push.t h2_server_tokens.t h2_trailers.t h2_variables.t h3_server_name.t proxy_ssl_conf_command.t worker_shutdown_timeout_h2.t |
diffstat | 32 files changed, 161 insertions(+), 17 deletions(-) [+] |
line wrap: on
line diff
--- a/grpc.t Wed May 31 13:29:31 2023 +0400 +++ b/grpc.t Wed May 31 13:29:34 2023 +0400 @@ -90,7 +90,11 @@ EOF +# suppress deprecation warning + +open OLDERR, ">&", \*STDERR; close STDERR; $t->run(); +open STDERR, ">&", \*OLDERR; ###############################################################################
--- a/grpc_next_upstream.t Wed May 31 13:29:31 2023 +0400 +++ b/grpc_next_upstream.t Wed May 31 13:29:34 2023 +0400 @@ -106,7 +106,11 @@ EOF +# suppress deprecation warning + +open OLDERR, ">&", \*STDERR; close STDERR; $t->run(); +open STDERR, ">&", \*OLDERR; ###############################################################################
--- a/grpc_pass.t Wed May 31 13:29:31 2023 +0400 +++ b/grpc_pass.t Wed May 31 13:29:34 2023 +0400 @@ -97,7 +97,12 @@ } $t->run_daemon(\&dns_daemon, port(8982), $t); + +# suppress deprecation warning + +open OLDERR, ">&", \*STDERR; close STDERR; $t->run()->plan(5); +open STDERR, ">&", \*OLDERR; $t->waitforfile($t->testdir . '/' . port(8982));
--- a/grpc_request_buffering.t Wed May 31 13:29:31 2023 +0400 +++ b/grpc_request_buffering.t Wed May 31 13:29:34 2023 +0400 @@ -64,7 +64,11 @@ EOF +# suppress deprecation warning + +open OLDERR, ">&", \*STDERR; close STDERR; $t->run(); +open STDERR, ">&", \*OLDERR; ###############################################################################
--- a/grpc_ssl.t Wed May 31 13:29:31 2023 +0400 +++ b/grpc_ssl.t Wed May 31 13:29:34 2023 +0400 @@ -128,7 +128,11 @@ $t->write_file('password', 'client'); +# suppress deprecation warning + +open OLDERR, ">&", \*STDERR; close STDERR; $t->run(); +open STDERR, ">&", \*OLDERR; ###############################################################################
--- a/h2.t Wed May 31 13:29:31 2023 +0400 +++ b/h2.t Wed May 31 13:29:34 2023 +0400 @@ -132,7 +132,11 @@ EOF +# suppress deprecation warning + +open OLDERR, ">&", \*STDERR; close STDERR; $t->run(); +open STDERR, ">&", \*OLDERR; # file size is slightly beyond initial window size: 2**16 + 80 bytes
--- a/h2_absolute_redirect.t Wed May 31 13:29:31 2023 +0400 +++ b/h2_absolute_redirect.t Wed May 31 13:29:34 2023 +0400 @@ -107,7 +107,11 @@ mkdir($t->testdir() . '/dir'); mkdir($t->testdir() . '/dir sp'); +# suppress deprecation warning + +open OLDERR, ">&", \*STDERR; close STDERR; $t->run()->plan(23); +open STDERR, ">&", \*OLDERR; ###############################################################################
--- a/h2_auth_request.t Wed May 31 13:29:31 2023 +0400 +++ b/h2_auth_request.t Wed May 31 13:29:34 2023 +0400 @@ -66,7 +66,11 @@ EOF +# suppress deprecation warning + +open OLDERR, ">&", \*STDERR; close STDERR; $t->run(); +open STDERR, ">&", \*OLDERR; ###############################################################################
--- a/h2_error_page.t Wed May 31 13:29:31 2023 +0400 +++ b/h2_error_page.t Wed May 31 13:29:34 2023 +0400 @@ -54,7 +54,11 @@ EOF +# suppress deprecation warning + +open OLDERR, ">&", \*STDERR; close STDERR; $t->run(); +open STDERR, ">&", \*OLDERR; ###############################################################################
--- a/h2_fastcgi_request_buffering.t Wed May 31 13:29:31 2023 +0400 +++ b/h2_fastcgi_request_buffering.t Wed May 31 13:29:34 2023 +0400 @@ -23,7 +23,7 @@ select STDERR; $| = 1; select STDOUT; $| = 1; -my $t = Test::Nginx->new()->has(qw/http http_v2 fastcgi/); +my $t = Test::Nginx->new()->has(qw/http http_v2 fastcgi/)->plan(48); $t->write_file_expand('nginx.conf', <<'EOF'); @@ -52,8 +52,11 @@ EOF +# suppress deprecation warning + +open OLDERR, ">&", \*STDERR; close STDERR; $t->run(); -$t->plan(48); +open STDERR, ">&", \*OLDERR; ###############################################################################
--- a/h2_headers.t Wed May 31 13:29:31 2023 +0400 +++ b/h2_headers.t Wed May 31 13:29:34 2023 +0400 @@ -122,7 +122,14 @@ EOF $t->run_daemon(\&http_daemon); -$t->run()->waitforsocket('127.0.0.1:' . port(8083)); + +# suppress deprecation warning + +open OLDERR, ">&", \*STDERR; close STDERR; +$t->run(); +open STDERR, ">&", \*OLDERR; + +$t->waitforsocket('127.0.0.1:' . port(8083)); # file size is slightly beyond initial window size: 2**16 + 80 bytes
--- a/h2_keepalive.t Wed May 31 13:29:31 2023 +0400 +++ b/h2_keepalive.t Wed May 31 13:29:34 2023 +0400 @@ -25,7 +25,7 @@ select STDERR; $| = 1; select STDOUT; $| = 1; -my $t = Test::Nginx->new()->has(qw/http http_v2/) +my $t = Test::Nginx->new()->has(qw/http http_v2/)->plan(19) ->write_file_expand('nginx.conf', <<'EOF'); %%TEST_GLOBALS%% @@ -73,7 +73,11 @@ $t->write_file('index.html', 'SEE-THAT' x 50000); $t->write_file('t.html', 'SEE-THAT'); -$t->run()->plan(19); +# suppress deprecation warning + +open OLDERR, ">&", \*STDERR; close STDERR; +$t->run(); +open STDERR, ">&", \*OLDERR; ###############################################################################
--- a/h2_limit_conn.t Wed May 31 13:29:31 2023 +0400 +++ b/h2_limit_conn.t Wed May 31 13:29:34 2023 +0400 @@ -51,7 +51,12 @@ EOF $t->write_file('t.html', 'SEE-THIS'); + +# suppress deprecation warning + +open OLDERR, ">&", \*STDERR; close STDERR; $t->run(); +open STDERR, ">&", \*OLDERR; ###############################################################################
--- a/h2_limit_req.t Wed May 31 13:29:31 2023 +0400 +++ b/h2_limit_req.t Wed May 31 13:29:34 2023 +0400 @@ -64,7 +64,12 @@ $t->write_file('index.html', ''); $t->write_file('t.html', 'SEE-THIS'); + +# suppress deprecation warning + +open OLDERR, ">&", \*STDERR; close STDERR; $t->run(); +open STDERR, ">&", \*OLDERR; ###############################################################################
--- a/h2_priority.t Wed May 31 13:29:31 2023 +0400 +++ b/h2_priority.t Wed May 31 13:29:34 2023 +0400 @@ -44,7 +44,11 @@ EOF +# suppress deprecation warning + +open OLDERR, ">&", \*STDERR; close STDERR; $t->run(); +open STDERR, ">&", \*OLDERR; # file size is slightly beyond initial window size: 2**16 + 80 bytes
--- a/h2_proxy_cache.t Wed May 31 13:29:31 2023 +0400 +++ b/h2_proxy_cache.t Wed May 31 13:29:34 2023 +0400 @@ -68,7 +68,12 @@ $t->write_file('t.html', 'SEE-THIS'); $t->write_file('slow.html', 'SEE-THIS'); + +# suppress deprecation warning + +open OLDERR, ">&", \*STDERR; close STDERR; $t->run(); +open STDERR, ">&", \*OLDERR; ###############################################################################
--- a/h2_proxy_max_temp_file_size.t Wed May 31 13:29:31 2023 +0400 +++ b/h2_proxy_max_temp_file_size.t Wed May 31 13:29:34 2023 +0400 @@ -66,7 +66,12 @@ EOF $t->write_file('1', 'X' x (1024 * 1024)); + +# suppress deprecation warning + +open OLDERR, ">&", \*STDERR; close STDERR; $t->run(); +open STDERR, ">&", \*OLDERR; ###############################################################################
--- a/h2_proxy_protocol.t Wed May 31 13:29:31 2023 +0400 +++ b/h2_proxy_protocol.t Wed May 31 13:29:34 2023 +0400 @@ -54,7 +54,12 @@ EOF $t->write_file('t.html', 'SEE-THIS'); + +# suppress deprecation warning + +open OLDERR, ">&", \*STDERR; close STDERR; $t->run(); +open STDERR, ">&", \*OLDERR; ###############################################################################
--- a/h2_proxy_request_buffering.t Wed May 31 13:29:31 2023 +0400 +++ b/h2_proxy_request_buffering.t Wed May 31 13:29:34 2023 +0400 @@ -25,7 +25,7 @@ select STDERR; $| = 1; select STDOUT; $| = 1; -my $t = Test::Nginx->new()->has(qw/http http_v2 proxy/); +my $t = Test::Nginx->new()->has(qw/http http_v2 proxy/)->plan(49); $t->write_file_expand('nginx.conf', <<'EOF'); @@ -65,8 +65,11 @@ EOF +# suppress deprecation warning + +open OLDERR, ">&", \*STDERR; close STDERR; $t->run(); -$t->plan(49); +open STDERR, ">&", \*OLDERR; ###############################################################################
--- a/h2_proxy_request_buffering_redirect.t Wed May 31 13:29:31 2023 +0400 +++ b/h2_proxy_request_buffering_redirect.t Wed May 31 13:29:34 2023 +0400 @@ -25,7 +25,7 @@ my $t = Test::Nginx->new()->has(qw/http http_v2 proxy rewrite/)->plan(1); -$t->write_file_expand('nginx.conf', <<'EOF')->run(); +$t->write_file_expand('nginx.conf', <<'EOF'); %%TEST_GLOBALS%% @@ -68,6 +68,12 @@ EOF +# suppress deprecation warning + +open OLDERR, ">&", \*STDERR; close STDERR; +$t->run(); +open STDERR, ">&", \*OLDERR; + ############################################################################### # unbuffered request body
--- a/h2_proxy_request_buffering_ssl.t Wed May 31 13:29:31 2023 +0400 +++ b/h2_proxy_request_buffering_ssl.t Wed May 31 13:29:34 2023 +0400 @@ -26,7 +26,7 @@ select STDOUT; $| = 1; my $t = Test::Nginx->new()->has(qw/http http_ssl http_v2 proxy/) - ->has_daemon('openssl'); + ->has_daemon('openssl')->plan(40); $t->write_file_expand('nginx.conf', <<'EOF'); @@ -98,8 +98,11 @@ or die "Can't create certificate for $name: $!\n"; } +# suppress deprecation warning + +open OLDERR, ">&", \*STDERR; close STDERR; $t->run(); -$t->plan(40); +open STDERR, ">&", \*OLDERR; ###############################################################################
--- a/h2_proxy_ssl.t Wed May 31 13:29:31 2023 +0400 +++ b/h2_proxy_ssl.t Wed May 31 13:29:34 2023 +0400 @@ -74,7 +74,12 @@ } $t->write_file('index.html', ''); + +# suppress deprecation warning + +open OLDERR, ">&", \*STDERR; close STDERR; $t->run(); +open STDERR, ">&", \*OLDERR; ###############################################################################
--- a/h2_request_body.t Wed May 31 13:29:31 2023 +0400 +++ b/h2_request_body.t Wed May 31 13:29:34 2023 +0400 @@ -77,7 +77,12 @@ $t->write_file('index.html', ''); $t->write_file('t.html', 'SEE-THIS'); $t->write_file('slow.html', 'SEE-THIS'); + +# suppress deprecation warning + +open OLDERR, ">&", \*STDERR; close STDERR; $t->run(); +open STDERR, ">&", \*OLDERR; ###############################################################################
--- a/h2_request_body_extra.t Wed May 31 13:29:31 2023 +0400 +++ b/h2_request_body_extra.t Wed May 31 13:29:34 2023 +0400 @@ -90,7 +90,11 @@ plan(skip_all => 'not yet') unless $t->has_version('1.21.2'); $t->plan(50); +# suppress deprecation warning + +open OLDERR, ">&", \*STDERR; close STDERR; $t->run(); +open STDERR, ">&", \*OLDERR; ###############################################################################
--- a/h2_request_body_preread.t Wed May 31 13:29:31 2023 +0400 +++ b/h2_request_body_preread.t Wed May 31 13:29:34 2023 +0400 @@ -23,7 +23,7 @@ select STDERR; $| = 1; select STDOUT; $| = 1; -my $t = Test::Nginx->new()->has(qw/http http_v2 proxy limit_req/); +my $t = Test::Nginx->new()->has(qw/http http_v2 proxy limit_req/)->plan(9); $t->write_file_expand('nginx.conf', <<'EOF'); @@ -89,7 +89,12 @@ EOF $t->write_file('t', ''); -$t->run()->plan(9); + +# suppress deprecation warning + +open OLDERR, ">&", \*STDERR; close STDERR; +$t->run(); +open STDERR, ">&", \*OLDERR; ###############################################################################
--- a/h2_server_push.t Wed May 31 13:29:31 2023 +0400 +++ b/h2_server_push.t Wed May 31 13:29:34 2023 +0400 @@ -139,7 +139,11 @@ $t->write_file('t2', 'SEE-THIS'); $t->write_file('explf', join('', map { sprintf "X%06dXXX", $_ } (1 .. 6553))); +# suppress deprecation warning + +open OLDERR, ">&", \*STDERR; close STDERR; $t->run(); +open STDERR, ">&", \*OLDERR; ###############################################################################
--- a/h2_server_tokens.t Wed May 31 13:29:31 2023 +0400 +++ b/h2_server_tokens.t Wed May 31 13:29:34 2023 +0400 @@ -23,7 +23,7 @@ select STDERR; $| = 1; select STDOUT; $| = 1; -my $t = Test::Nginx->new()->has(qw/http http_v2 rewrite/) +my $t = Test::Nginx->new()->has(qw/http http_v2 rewrite/)->plan(12) ->write_file_expand('nginx.conf', <<'EOF'); %%TEST_GLOBALS%% @@ -88,7 +88,11 @@ EOF -$t->run()->plan(12); +# suppress deprecation warning + +open OLDERR, ">&", \*STDERR; close STDERR; +$t->run(); +open STDERR, ">&", \*OLDERR; ###############################################################################
--- a/h2_trailers.t Wed May 31 13:29:31 2023 +0400 +++ b/h2_trailers.t Wed May 31 13:29:34 2023 +0400 @@ -60,7 +60,12 @@ $t->write_file('index.html', 'SEE-THIS'); $t->write_file('empty', ''); $t->write_file('continuation', 'SEE-THIS'); + +# suppress deprecation warning + +open OLDERR, ">&", \*STDERR; close STDERR; $t->run(); +open STDERR, ">&", \*OLDERR; ###############################################################################
--- a/h2_variables.t Wed May 31 13:29:31 2023 +0400 +++ b/h2_variables.t Wed May 31 13:29:34 2023 +0400 @@ -60,7 +60,11 @@ EOF +# suppress deprecation warning + +open OLDERR, ">&", \*STDERR; close STDERR; $t->run(); +open STDERR, ">&", \*OLDERR; ###############################################################################
--- a/h3_server_name.t Wed May 31 13:29:31 2023 +0400 +++ b/h3_server_name.t Wed May 31 13:29:34 2023 +0400 @@ -74,7 +74,11 @@ or die "Can't create certificate for $name: $!\n"; } +# suppress deprecation warning + +open OLDERR, ">&", \*STDERR; close STDERR; $t->run(); +open STDERR, ">&", \*OLDERR; ###############################################################################
--- a/proxy_ssl_conf_command.t Wed May 31 13:29:31 2023 +0400 +++ b/proxy_ssl_conf_command.t Wed May 31 13:29:34 2023 +0400 @@ -28,7 +28,7 @@ plan(skip_all => 'no ssl_conf_command') if $t->has_module('BoringSSL'); -$t->write_file_expand('nginx.conf', <<'EOF'); +$t->write_file_expand('nginx.conf', <<'EOF')->plan(3); %%TEST_GLOBALS%% @@ -106,7 +106,12 @@ } $t->write_file('index.html', ''); -$t->run()->plan(3); + +# suppress deprecation warning + +open OLDERR, ">&", \*STDERR; close STDERR; +$t->run(); +open STDERR, ">&", \*OLDERR; ###############################################################################
--- a/worker_shutdown_timeout_h2.t Wed May 31 13:29:31 2023 +0400 +++ b/worker_shutdown_timeout_h2.t Wed May 31 13:29:34 2023 +0400 @@ -51,7 +51,14 @@ EOF $t->run_daemon(\&http_silent_daemon); -$t->run()->waitforsocket('127.0.0.1:' . port(8081)); + +# suppress deprecation warning + +open OLDERR, ">&", \*STDERR; close STDERR; +$t->run(); +open STDERR, ">&", \*OLDERR; + +$t->waitforsocket('127.0.0.1:' . port(8081)); ###############################################################################