Mercurial > hg > nginx-tests
comparison proxy_ssl_conf_command.t @ 1900:236d038dc04a
Tests: suppress "listen .. http2;" deprecation warnings.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Wed, 31 May 2023 13:29:34 +0400 |
parents | 58951cf933e1 |
children | 11463d379570 |
comparison
equal
deleted
inserted
replaced
1899:a0ee073760c5 | 1900:236d038dc04a |
---|---|
26 ->has(qw/http http_ssl proxy uwsgi http_v2 grpc openssl:1.0.2/) | 26 ->has(qw/http http_ssl proxy uwsgi http_v2 grpc openssl:1.0.2/) |
27 ->has_daemon('openssl'); | 27 ->has_daemon('openssl'); |
28 | 28 |
29 plan(skip_all => 'no ssl_conf_command') if $t->has_module('BoringSSL'); | 29 plan(skip_all => 'no ssl_conf_command') if $t->has_module('BoringSSL'); |
30 | 30 |
31 $t->write_file_expand('nginx.conf', <<'EOF'); | 31 $t->write_file_expand('nginx.conf', <<'EOF')->plan(3); |
32 | 32 |
33 %%TEST_GLOBALS%% | 33 %%TEST_GLOBALS%% |
34 | 34 |
35 daemon off; | 35 daemon off; |
36 | 36 |
104 . ">>$d/openssl.out 2>&1") == 0 | 104 . ">>$d/openssl.out 2>&1") == 0 |
105 or die "Can't create certificate for $name: $!\n"; | 105 or die "Can't create certificate for $name: $!\n"; |
106 } | 106 } |
107 | 107 |
108 $t->write_file('index.html', ''); | 108 $t->write_file('index.html', ''); |
109 $t->run()->plan(3); | 109 |
110 # suppress deprecation warning | |
111 | |
112 open OLDERR, ">&", \*STDERR; close STDERR; | |
113 $t->run(); | |
114 open STDERR, ">&", \*OLDERR; | |
110 | 115 |
111 ############################################################################### | 116 ############################################################################### |
112 | 117 |
113 like(http_get('/'), qr/CN=override/, 'proxy_ssl_conf_command'); | 118 like(http_get('/'), qr/CN=override/, 'proxy_ssl_conf_command'); |
114 like(http_get('/uwsgi'), qr/CN=override/, 'uwsgi_ssl_conf_command'); | 119 like(http_get('/uwsgi'), qr/CN=override/, 'uwsgi_ssl_conf_command'); |