File tree 15 files changed +21
-56
lines changed
15 files changed +21
-56
lines changed Original file line number Diff line number Diff line change @@ -23,10 +23,7 @@ use Test::Nginx::HTTP3;
23
23
select STDERR ; $| = 1;
24
24
select STDOUT ; $| = 1;
25
25
26
- eval { require Crypt::Misc; die if $Crypt::Misc::VERSION < 0.067; };
27
- plan(skip_all => ' CryptX version >= 0.067 required' ) if $@ ;
28
-
29
- my $t = Test::Nginx-> new()-> has(qw/ http http_v3 proxy rewrite/ )
26
+ my $t = Test::Nginx-> new()-> has(qw/ http http_v3 proxy rewrite cryptx/ )
30
27
-> has_daemon(' openssl' )-> plan(23);
31
28
32
29
$t -> write_file_expand(' nginx.conf' , <<'EOF' );
Original file line number Diff line number Diff line change @@ -23,10 +23,7 @@ use Test::Nginx::HTTP3;
23
23
select STDERR ; $| = 1;
24
24
select STDOUT ; $| = 1;
25
25
26
- eval { require Crypt::Misc; die if $Crypt::Misc::VERSION < 0.067; };
27
- plan(skip_all => ' CryptX version >= 0.067 required' ) if $@ ;
28
-
29
- my $t = Test::Nginx-> new()-> has(qw/ http http_v3 proxy rewrite/ )
26
+ my $t = Test::Nginx-> new()-> has(qw/ http http_v3 proxy rewrite cryptx/ )
30
27
-> has_daemon(' openssl' )-> plan(68)
31
28
-> write_file_expand(' nginx.conf' , <<'EOF' );
32
29
Original file line number Diff line number Diff line change @@ -23,10 +23,7 @@ use Test::Nginx::HTTP3;
23
23
select STDERR ; $| = 1;
24
24
select STDOUT ; $| = 1;
25
25
26
- eval { require Crypt::Misc; die if $Crypt::Misc::VERSION < 0.067; };
27
- plan(skip_all => ' CryptX version >= 0.067 required' ) if $@ ;
28
-
29
- my $t = Test::Nginx-> new()-> has(qw/ http http_v3/ )
26
+ my $t = Test::Nginx-> new()-> has(qw/ http http_v3 cryptx/ )
30
27
-> has_daemon(' openssl' )-> plan(15)
31
28
-> write_file_expand(' nginx.conf' , <<'EOF' );
32
29
Original file line number Diff line number Diff line change @@ -23,10 +23,7 @@ use Test::Nginx::HTTP3;
23
23
select STDERR ; $| = 1;
24
24
select STDOUT ; $| = 1;
25
25
26
- eval { require Crypt::Misc; die if $Crypt::Misc::VERSION < 0.067; };
27
- plan(skip_all => ' CryptX version >= 0.067 required' ) if $@ ;
28
-
29
- my $t = Test::Nginx-> new()-> has(qw/ http http_v3 limit_conn proxy/ )
26
+ my $t = Test::Nginx-> new()-> has(qw/ http http_v3 limit_conn proxy cryptx/ )
30
27
-> has_daemon(' openssl' )-> plan(2);
31
28
32
29
$t -> write_file_expand(' nginx.conf' , <<'EOF' );
Original file line number Diff line number Diff line change @@ -23,10 +23,7 @@ use Test::Nginx::HTTP3;
23
23
select STDERR ; $| = 1;
24
24
select STDOUT ; $| = 1;
25
25
26
- eval { require Crypt::Misc; die if $Crypt::Misc::VERSION < 0.067; };
27
- plan(skip_all => ' CryptX version >= 0.067 required' ) if $@ ;
28
-
29
- my $t = Test::Nginx-> new()-> has(qw/ http http_v3 proxy limit_req/ )
26
+ my $t = Test::Nginx-> new()-> has(qw/ http http_v3 proxy limit_req cryptx/ )
30
27
-> has_daemon(' openssl' )-> plan(6);
31
28
32
29
$t -> write_file_expand(' nginx.conf' , <<'EOF' );
Original file line number Diff line number Diff line change @@ -23,10 +23,7 @@ use Test::Nginx::HTTP3;
23
23
select STDERR ; $| = 1;
24
24
select STDOUT ; $| = 1;
25
25
26
- eval { require Crypt::Misc; die if $Crypt::Misc::VERSION < 0.067; };
27
- plan(skip_all => ' CryptX version >= 0.067 required' ) if $@ ;
28
-
29
- my $t = Test::Nginx-> new()-> has(qw/ http http_v3 proxy/ )
26
+ my $t = Test::Nginx-> new()-> has(qw/ http http_v3 proxy cryptx/ )
30
27
-> has_daemon(' openssl' )-> plan(3)
31
28
-> write_file_expand(' nginx.conf' , <<'EOF' );
32
29
Original file line number Diff line number Diff line change @@ -23,10 +23,7 @@ use Test::Nginx::HTTP3;
23
23
select STDERR ; $| = 1;
24
24
select STDOUT ; $| = 1;
25
25
26
- eval { require Crypt::Misc; die if $Crypt::Misc::VERSION < 0.067; };
27
- plan(skip_all => ' CryptX version >= 0.067 required' ) if $@ ;
28
-
29
- my $t = Test::Nginx-> new()-> has(qw/ http http_v3 proxy/ )
26
+ my $t = Test::Nginx-> new()-> has(qw/ http http_v3 proxy cryptx/ )
30
27
-> has_daemon(' openssl' )-> plan(4);
31
28
32
29
$t -> write_file_expand(' nginx.conf' , <<'EOF' );
Original file line number Diff line number Diff line change @@ -23,10 +23,7 @@ use Test::Nginx::HTTP3;
23
23
select STDERR ; $| = 1;
24
24
select STDOUT ; $| = 1;
25
25
26
- eval { require Crypt::Misc; die if $Crypt::Misc::VERSION < 0.067; };
27
- plan(skip_all => ' CryptX version >= 0.067 required' ) if $@ ;
28
-
29
- my $t = Test::Nginx-> new()-> has(qw/ http http_v3/ )
26
+ my $t = Test::Nginx-> new()-> has(qw/ http http_v3 cryptx/ )
30
27
-> has_daemon(' openssl' )-> plan(1)
31
28
-> write_file_expand(' nginx.conf' , <<'EOF' );
32
29
Original file line number Diff line number Diff line change @@ -24,11 +24,8 @@ use Test::Nginx::HTTP3;
24
24
select STDERR ; $| = 1;
25
25
select STDOUT ; $| = 1;
26
26
27
- eval { require Crypt::Misc; die if $Crypt::Misc::VERSION < 0.067; };
28
- plan(skip_all => ' CryptX version >= 0.067 required' ) if $@ ;
29
-
30
27
my $t = Test::Nginx-> new()
31
- -> has(qw/ http http_ssl http_v2 http_v3 rewrite socket_ssl_alpn/ )
28
+ -> has(qw/ http http_ssl http_v2 http_v3 rewrite socket_ssl_alpn cryptx / )
32
29
-> has_daemon(' openssl' )-> plan(6);
33
30
34
31
$t -> write_file_expand(' nginx.conf' , <<'EOF' );
Original file line number Diff line number Diff line change @@ -23,10 +23,7 @@ use Test::Nginx::HTTP3;
23
23
select STDERR ; $| = 1;
24
24
select STDOUT ; $| = 1;
25
25
26
- eval { require Crypt::Misc; die if $Crypt::Misc::VERSION < 0.067; };
27
- plan(skip_all => ' CryptX version >= 0.067 required' ) if $@ ;
28
-
29
- my $t = Test::Nginx-> new()-> has(qw/ http http_v3 rewrite/ )
26
+ my $t = Test::Nginx-> new()-> has(qw/ http http_v3 rewrite cryptx/ )
30
27
-> has_daemon(' openssl' )-> plan(12);
31
28
32
29
$t -> write_file_expand(' nginx.conf' , <<'EOF' );
Original file line number Diff line number Diff line change @@ -23,10 +23,7 @@ use Test::Nginx::HTTP3;
23
23
select STDERR ; $| = 1;
24
24
select STDOUT ; $| = 1;
25
25
26
- eval { require Crypt::Misc; die if $Crypt::Misc::VERSION < 0.067; };
27
- plan(skip_all => ' CryptX version >= 0.067 required' ) if $@ ;
28
-
29
- my $t = Test::Nginx-> new()-> has(qw/ http http_v3/ )
26
+ my $t = Test::Nginx-> new()-> has(qw/ http http_v3 cryptx/ )
30
27
-> has_daemon(' openssl' )-> plan(7)
31
28
-> write_file_expand(' nginx.conf' , <<'EOF' );
32
29
Original file line number Diff line number Diff line change @@ -23,10 +23,7 @@ use Test::Nginx::HTTP3;
23
23
select STDERR ; $| = 1;
24
24
select STDOUT ; $| = 1;
25
25
26
- eval { require Crypt::Misc; die if $Crypt::Misc::VERSION < 0.067; };
27
- plan(skip_all => ' CryptX version >= 0.067 required' ) if $@ ;
28
-
29
- my $t = Test::Nginx-> new()-> has(qw/ http http_v3/ )
26
+ my $t = Test::Nginx-> new()-> has(qw/ http http_v3 cryptx/ )
30
27
-> has_daemon(' openssl' )-> plan(8)
31
28
-> write_file_expand(' nginx.conf' , <<'EOF' );
32
29
Original file line number Diff line number Diff line change @@ -23,10 +23,7 @@ use Test::Nginx::HTTP3;
23
23
select STDERR ; $| = 1;
24
24
select STDOUT ; $| = 1;
25
25
26
- eval { require Crypt::Misc; die if $Crypt::Misc::VERSION < 0.067; };
27
- plan(skip_all => ' CryptX version >= 0.067 required' ) if $@ ;
28
-
29
- my $t = Test::Nginx-> new()-> has(qw/ http http_v3/ )
26
+ my $t = Test::Nginx-> new()-> has(qw/ http http_v3 cryptx/ )
30
27
-> has_daemon(' openssl' )-> plan(8);
31
28
32
29
$t -> write_file_expand(' nginx.conf' , <<'EOF' );
Original file line number Diff line number Diff line change @@ -288,6 +288,13 @@ sub has_feature($) {
288
288
return 1;
289
289
}
290
290
291
+ if ($feature eq ' cryptx' ) {
292
+ eval { require Crypt::Misc; };
293
+ return 0 if $@ ;
294
+ eval { die if $Crypt::Misc::VERSION < 0.067; };
295
+ return !$@ ;
296
+ }
297
+
291
298
return 0;
292
299
}
293
300
Original file line number Diff line number Diff line change @@ -23,13 +23,10 @@ use Test::Nginx::HTTP3;
23
23
select STDERR ; $| = 1;
24
24
select STDOUT ; $| = 1;
25
25
26
- eval { require Crypt::Misc; die if $Crypt::Misc::VERSION < 0.067; };
27
- plan(skip_all => ' CryptX version >= 0.067 required' ) if $@ ;
28
-
29
26
plan(skip_all => ' 127.0.0.20 local address required' )
30
27
unless defined IO::Socket::INET-> new( LocalAddr => ' 127.0.0.20' );
31
28
32
- my $t = Test::Nginx-> new()-> has(qw/ http http_v3/ )
29
+ my $t = Test::Nginx-> new()-> has(qw/ http http_v3 cryptx / )
33
30
-> has_daemon(' openssl' )-> plan(2);
34
31
35
32
$t -> write_file_expand(' nginx.conf' , <<'EOF' );
You can’t perform that action at this time.
0 commit comments