Mercurial > hg > nginx-tests
comparison grpc_ssl.t @ 1860:58951cf933e1
Tests: added has_feature() test for SSL libraries.
This makes it possible to further simplify various SSL tests. It also
avoids direct testing of the $t->{_configure_args} internal field, and
implements proper comparison of version numbers.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Thu, 18 May 2023 18:07:06 +0300 |
parents | b27bcded6449 |
children | 236d038dc04a |
comparison
equal
deleted
inserted
replaced
1859:5f46af4707e7 | 1860:58951cf933e1 |
---|---|
22 | 22 |
23 select STDERR; $| = 1; | 23 select STDERR; $| = 1; |
24 select STDOUT; $| = 1; | 24 select STDOUT; $| = 1; |
25 | 25 |
26 my $t = Test::Nginx->new()->has(qw/http rewrite http_v2 grpc/) | 26 my $t = Test::Nginx->new()->has(qw/http rewrite http_v2 grpc/) |
27 ->has(qw/upstream_keepalive http_ssl/)->has_daemon('openssl'); | 27 ->has(qw/upstream_keepalive http_ssl openssl:1.0.2/) |
28 | 28 ->has_daemon('openssl') |
29 $t->{_configure_args} =~ /OpenSSL ([\d\.]+)/; | 29 ->write_file_expand('nginx.conf', <<'EOF')->plan(38); |
30 plan(skip_all => 'OpenSSL too old') unless defined $1 and $1 ge '1.0.2'; | |
31 | |
32 $t->write_file_expand('nginx.conf', <<'EOF')->plan(38); | |
33 | 30 |
34 %%TEST_GLOBALS%% | 31 %%TEST_GLOBALS%% |
35 | 32 |
36 daemon off; | 33 daemon off; |
37 | 34 |