[PATCH] Tests: fixed gzip and pcre prerequisites in stream tests

Maxim Dounin mdounin at mdounin.ru
Wed Jun 3 15:48:22 UTC 2026


# HG changeset patch
# User Maxim Dounin <mdounin at mdounin.ru>
# Date 1780501688 -10800
#      Wed Jun 03 18:48:08 2026 +0300
# Node ID fdb816d8d2ab966cc183e5f97252bd1aea3e6369
# Parent  6e9d814c49fd49893267c316ad191db2c1528c33
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.

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