[nginx-tests] Tests: fixed gzip and pcre prerequisites in stream...

Maxim Dounin mdounin at mdounin.ru
Mon Jun 8 14:57:06 UTC 2026


details:   http://freenginx.org/hg/nginx-tests/rev/70244b716f01
branches:  
changeset: 2064:70244b716f01
user:      Maxim Dounin <mdounin at mdounin.ru>
date:      Mon Jun 08 17:56:13 2026 +0300
description:
Tests: fixed gzip and pcre prerequisites in stream tests.

Simply requiring gzip or rewrite is not enough, since these won't be
actually present if http is not compiled in at all.  The fix is to
require http explicitly.

diffstat:

 stream_access_log.t          |  2 +-
 stream_map.t                 |  4 ++--
 stream_proxy_protocol2_tlv.t |  2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diffs (38 lines):

diff --git a/stream_access_log.t b/stream_access_log.t
--- a/stream_access_log.t
+++ b/stream_access_log.t
@@ -25,7 +25,7 @@ use Test::Nginx::Stream qw/ stream /;
 select STDERR; $| = 1;
 select STDOUT; $| = 1;
 
-my $t = Test::Nginx->new()->has(qw/stream stream_map gzip/);
+my $t = Test::Nginx->new()->has(qw/stream stream_map http gzip/);
 
 $t->write_file_expand('nginx.conf', <<'EOF');
 
diff --git a/stream_map.t b/stream_map.t
--- a/stream_map.t
+++ b/stream_map.t
@@ -23,8 +23,8 @@ use Test::Nginx::Stream qw/ stream /;
 select STDERR; $| = 1;
 select STDOUT; $| = 1;
 
-my $t = Test::Nginx->new()->has(qw/stream stream_return stream_map rewrite/)
-	->has(qw/http rewrite/);
+my $t = Test::Nginx->new()
+	->has(qw/stream stream_return stream_map http rewrite/);
 
 $t->write_file_expand('nginx.conf', <<'EOF');
 
diff --git a/stream_proxy_protocol2_tlv.t b/stream_proxy_protocol2_tlv.t
--- a/stream_proxy_protocol2_tlv.t
+++ b/stream_proxy_protocol2_tlv.t
@@ -25,7 +25,7 @@ select STDERR; $| = 1;
 select STDOUT; $| = 1;
 
 my $t = Test::Nginx->new()
-	->has(qw/stream stream_return stream_map rewrite/)->plan(14)
+	->has(qw/stream stream_return stream_map http rewrite/)->plan(14)
 	->write_file_expand('nginx.conf', <<'EOF');
 
 %%TEST_GLOBALS%%


More information about the nginx-devel mailing list