Tests: added TEST_GLOBALS_STREAM variable support.
diff --git a/README b/README
index c18f544..f43c586 100644
--- a/README
+++ b/README
@@ -48,4 +48,8 @@
Sets additional directives in http context.
+TEST_NGINX_GLOBALS_STREAM
+
+ Sets additional directives in stream context.
+
Happy testing!
diff --git a/lib/Test/Nginx.pm b/lib/Test/Nginx.pm
index 494de74..92ed0f7 100644
--- a/lib/Test/Nginx.pm
+++ b/lib/Test/Nginx.pm
@@ -548,6 +548,7 @@
$content =~ s/%%TEST_GLOBALS%%/$self->test_globals()/gmse;
$content =~ s/%%TEST_GLOBALS_HTTP%%/$self->test_globals_http()/gmse;
+ $content =~ s/%%TEST_GLOBALS_STREAM%%/$self->test_globals_stream()/gmse;
$content =~ s/%%TESTDIR%%/$self->{_testdir}/gms;
$content =~ s/127\.0\.0\.1:(8\d\d\d)/'127.0.0.1:' . port($1)/gmse;
@@ -689,6 +690,20 @@
$self->{_test_globals_http} = $s;
}
+sub test_globals_stream() {
+ my ($self) = @_;
+
+ return $self->{_test_globals_stream}
+ if defined $self->{_test_globals_stream};
+
+ my $s = '';
+
+ $s .= $ENV{TEST_NGINX_GLOBALS_STREAM}
+ if $ENV{TEST_NGINX_GLOBALS_STREAM};
+
+ $self->{_test_globals_stream} = $s;
+}
+
###############################################################################
sub log_core {
diff --git a/proxy_protocol_ipv6.t b/proxy_protocol_ipv6.t
index da126a1..ee63479 100644
--- a/proxy_protocol_ipv6.t
+++ b/proxy_protocol_ipv6.t
@@ -53,6 +53,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
server {
listen 127.0.0.1:8080;
proxy_pass [::1]:%%PORT_8080%%;
diff --git a/stream_access.t b/stream_access.t
index 2ffba82..1a5a420 100644
--- a/stream_access.t
+++ b/stream_access.t
@@ -35,6 +35,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
server {
listen 127.0.0.1:8082;
proxy_pass [::1]:%%PORT_8080%%;
diff --git a/stream_access_log.t b/stream_access_log.t
index e6e683e..6fd4c12 100644
--- a/stream_access_log.t
+++ b/stream_access_log.t
@@ -37,6 +37,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
log_format test $server_addr;
log_format vars $connection:$nginx_version:$hostname:$pid;
log_format addr $binary_remote_addr:$remote_addr:$remote_port:
diff --git a/stream_access_log_escape.t b/stream_access_log_escape.t
index 40d63e4..3a5adc7 100644
--- a/stream_access_log_escape.t
+++ b/stream_access_log_escape.t
@@ -33,6 +33,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
map $pid $a {
default '" \ "';
}
diff --git a/stream_access_log_none.t b/stream_access_log_none.t
index 5cd4ca0..75db734 100644
--- a/stream_access_log_none.t
+++ b/stream_access_log_none.t
@@ -33,6 +33,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
map $pid $a {
default '" \ "';
}
diff --git a/stream_error_log.t b/stream_error_log.t
index 4d3d9f0..c757881 100644
--- a/stream_error_log.t
+++ b/stream_error_log.t
@@ -44,6 +44,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
upstream u {
server 127.0.0.1:%%PORT_8983_UDP%% down;
}
diff --git a/stream_geo.t b/stream_geo.t
index d263ec9..02531ab 100644
--- a/stream_geo.t
+++ b/stream_geo.t
@@ -37,6 +37,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
geo $geo {
127.0.0.0/8 loopback;
192.0.2.0/24 test;
diff --git a/stream_geo_binary.t b/stream_geo_binary.t
index 4dfc532..cb2f594 100644
--- a/stream_geo_binary.t
+++ b/stream_geo_binary.t
@@ -37,6 +37,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
geo $geo_base_create {
ranges;
include base.conf;
diff --git a/stream_geo_ipv6.t b/stream_geo_ipv6.t
index 2b150a4..bd69819 100644
--- a/stream_geo_ipv6.t
+++ b/stream_geo_ipv6.t
@@ -34,6 +34,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
geo $geo {
::1/128 loopback;
2001:0db8::/32 test;
diff --git a/stream_geo_unix.t b/stream_geo_unix.t
index 139eff4..2f3e7a7 100644
--- a/stream_geo_unix.t
+++ b/stream_geo_unix.t
@@ -36,6 +36,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
geo $geo {
default default;
255.255.255.255 none;
diff --git a/stream_geoip.t b/stream_geoip.t
index bef3840..88f9f11 100644
--- a/stream_geoip.t
+++ b/stream_geoip.t
@@ -38,6 +38,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
set_real_ip_from 127.0.0.1/32;
geoip_country %%TESTDIR%%/country.dat;
diff --git a/stream_js.t b/stream_js.t
index 0fa3715..ba642fb 100644
--- a/stream_js.t
+++ b/stream_js.t
@@ -59,6 +59,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
js_set $js_addr js_addr;
js_set $js_var js_var;
js_set $js_log js_log;
diff --git a/stream_js_import.t b/stream_js_import.t
index 509aa88..7000060 100644
--- a/stream_js_import.t
+++ b/stream_js_import.t
@@ -34,6 +34,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
js_set $test foo.bar.p;
js_import lib.js;
diff --git a/stream_js_object.t b/stream_js_object.t
index b3cb129..cf23c57 100644
--- a/stream_js_object.t
+++ b/stream_js_object.t
@@ -49,6 +49,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
js_set $test test;
js_include test.js;
diff --git a/stream_js_variables.t b/stream_js_variables.t
index 1697948..dd18255 100644
--- a/stream_js_variables.t
+++ b/stream_js_variables.t
@@ -49,6 +49,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
js_set $test_var test_var;
js_set $test_not_found test_not_found;
diff --git a/stream_limit_conn.t b/stream_limit_conn.t
index 68edda2..890f27f 100644
--- a/stream_limit_conn.t
+++ b/stream_limit_conn.t
@@ -33,6 +33,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
limit_conn_zone $binary_remote_addr zone=zone:1m;
limit_conn_zone $binary_remote_addr zone=zone2:1m;
diff --git a/stream_limit_conn_complex.t b/stream_limit_conn_complex.t
index 1147ce1..edbef3d 100644
--- a/stream_limit_conn_complex.t
+++ b/stream_limit_conn_complex.t
@@ -33,6 +33,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
limit_conn_zone $binary_remote_addr$server_port zone=zone:1m;
server {
diff --git a/stream_limit_conn_dry_run.t b/stream_limit_conn_dry_run.t
index 2a2d691..c86522f 100644
--- a/stream_limit_conn_dry_run.t
+++ b/stream_limit_conn_dry_run.t
@@ -35,6 +35,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
limit_conn_zone $binary_remote_addr zone=zone:1m;
log_format test $server_port:$limit_conn_status;
diff --git a/stream_limit_rate.t b/stream_limit_rate.t
index ccb5bd0..86d6487 100644
--- a/stream_limit_rate.t
+++ b/stream_limit_rate.t
@@ -36,6 +36,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
# download and upload rates are set equal to the maximum
# number of bytes transmitted
diff --git a/stream_limit_rate2.t b/stream_limit_rate2.t
index cfc4455..663c798 100644
--- a/stream_limit_rate2.t
+++ b/stream_limit_rate2.t
@@ -36,6 +36,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
# download and upload rates are set equal to the maximum
# number of bytes transmitted
diff --git a/stream_map.t b/stream_map.t
index 35a46c9..3b157cb 100644
--- a/stream_map.t
+++ b/stream_map.t
@@ -36,6 +36,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
map $server_port $x {
%%PORT_8080%% literal;
default default;
diff --git a/stream_proxy.t b/stream_proxy.t
index ebf1237..da32490 100644
--- a/stream_proxy.t
+++ b/stream_proxy.t
@@ -36,6 +36,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
server {
listen 127.0.0.1:8080;
proxy_pass 127.0.0.1:8081;
diff --git a/stream_proxy_bind.t b/stream_proxy_bind.t
index 0a71123..7404b85 100644
--- a/stream_proxy_bind.t
+++ b/stream_proxy_bind.t
@@ -37,6 +37,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
server {
listen 127.0.0.1:8081;
proxy_bind 127.0.0.2;
diff --git a/stream_proxy_complex.t b/stream_proxy_complex.t
index 9bc1f1a..5d25a4b 100644
--- a/stream_proxy_complex.t
+++ b/stream_proxy_complex.t
@@ -34,6 +34,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
upstream %%PORT_8081%% {
server 127.0.0.1:8091;
}
diff --git a/stream_proxy_next_upstream.t b/stream_proxy_next_upstream.t
index beca885..3323527 100644
--- a/stream_proxy_next_upstream.t
+++ b/stream_proxy_next_upstream.t
@@ -35,6 +35,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
upstream u {
server 127.0.0.1:8083 max_fails=0;
server 127.0.0.1:8084 max_fails=0;
diff --git a/stream_proxy_protocol.t b/stream_proxy_protocol.t
index 2045ddc..74da547 100644
--- a/stream_proxy_protocol.t
+++ b/stream_proxy_protocol.t
@@ -37,6 +37,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
proxy_protocol on;
server {
diff --git a/stream_proxy_protocol_ipv6.t b/stream_proxy_protocol_ipv6.t
index 1c83cd6..13620a2 100644
--- a/stream_proxy_protocol_ipv6.t
+++ b/stream_proxy_protocol_ipv6.t
@@ -37,6 +37,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
server {
listen 127.0.0.1:8080;
proxy_pass [::1]:%%PORT_8080%%;
diff --git a/stream_proxy_protocol_ssl.t b/stream_proxy_protocol_ssl.t
index 141f181..24ee5dd 100644
--- a/stream_proxy_protocol_ssl.t
+++ b/stream_proxy_protocol_ssl.t
@@ -40,6 +40,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
proxy_ssl on;
proxy_protocol on;
diff --git a/stream_proxy_ssl.t b/stream_proxy_ssl.t
index cc6b6c7..86fcd3a 100644
--- a/stream_proxy_ssl.t
+++ b/stream_proxy_ssl.t
@@ -37,6 +37,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
proxy_ssl on;
proxy_ssl_session_reuse on;
proxy_connect_timeout 2s;
diff --git a/stream_proxy_ssl_certificate.t b/stream_proxy_ssl_certificate.t
index ee2e0d5..973f08a 100644
--- a/stream_proxy_ssl_certificate.t
+++ b/stream_proxy_ssl_certificate.t
@@ -36,6 +36,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
proxy_ssl on;
proxy_ssl_session_reuse off;
diff --git a/stream_proxy_ssl_conf_command.t b/stream_proxy_ssl_conf_command.t
index 3f45116..db7aaad 100644
--- a/stream_proxy_ssl_conf_command.t
+++ b/stream_proxy_ssl_conf_command.t
@@ -36,6 +36,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
server {
listen 127.0.0.1:8080;
proxy_pass 127.0.0.1:8081;
diff --git a/stream_proxy_ssl_name.t b/stream_proxy_ssl_name.t
index 304a578..0993c47 100644
--- a/stream_proxy_ssl_name.t
+++ b/stream_proxy_ssl_name.t
@@ -36,6 +36,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
proxy_ssl on;
proxy_ssl_session_reuse off;
diff --git a/stream_proxy_ssl_name_complex.t b/stream_proxy_ssl_name_complex.t
index 47b317f..748d6bd 100644
--- a/stream_proxy_ssl_name_complex.t
+++ b/stream_proxy_ssl_name_complex.t
@@ -37,6 +37,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
proxy_ssl on;
proxy_ssl_session_reuse off;
diff --git a/stream_proxy_ssl_verify.t b/stream_proxy_ssl_verify.t
index e9d5f28..697e058 100644
--- a/stream_proxy_ssl_verify.t
+++ b/stream_proxy_ssl_verify.t
@@ -36,6 +36,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
proxy_ssl on;
proxy_ssl_verify on;
diff --git a/stream_realip.t b/stream_realip.t
index 759a8a7..2a21c63 100644
--- a/stream_realip.t
+++ b/stream_realip.t
@@ -37,6 +37,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
server {
listen 127.0.0.1:8083 proxy_protocol;
listen 127.0.0.1:8084;
diff --git a/stream_realip_hostname.t b/stream_realip_hostname.t
index a867ba3..e2b5bfc 100644
--- a/stream_realip_hostname.t
+++ b/stream_realip_hostname.t
@@ -36,6 +36,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
server {
listen unix:%%TESTDIR%%/unix.sock proxy_protocol;
listen 127.0.0.1:8080;
diff --git a/stream_resolver.t b/stream_resolver.t
index 3613521..4a10c86 100644
--- a/stream_resolver.t
+++ b/stream_resolver.t
@@ -34,6 +34,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
map $server_port $upstream {
%%PORT_8081%% a.example.com:%%PORT_8090%%;
%%PORT_8082%% a.example.com;
diff --git a/stream_set.t b/stream_set.t
index 6c08bb0..a5b9b84 100644
--- a/stream_set.t
+++ b/stream_set.t
@@ -35,6 +35,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
map 0 $map_var {
default "original";
diff --git a/stream_split_clients.t b/stream_split_clients.t
index 862863d..8b26c16 100644
--- a/stream_split_clients.t
+++ b/stream_split_clients.t
@@ -35,6 +35,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
split_clients $connection $variant {
51.2% "first";
10% "second";
diff --git a/stream_ssl.t b/stream_ssl.t
index 641d123..ca79d4f 100644
--- a/stream_ssl.t
+++ b/stream_ssl.t
@@ -47,6 +47,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
ssl_certificate_key localhost.key;
ssl_certificate localhost.crt;
ssl_session_tickets off;
diff --git a/stream_ssl_certificate.t b/stream_ssl_certificate.t
index 099db33..a4388e8 100644
--- a/stream_ssl_certificate.t
+++ b/stream_ssl_certificate.t
@@ -55,6 +55,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
geo $one {
default one;
}
diff --git a/stream_ssl_conf_command.t b/stream_ssl_conf_command.t
index d0b0ff0..a1bf492 100644
--- a/stream_ssl_conf_command.t
+++ b/stream_ssl_conf_command.t
@@ -43,6 +43,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
server {
listen 127.0.0.1:8443 ssl;
return OK;
diff --git a/stream_ssl_preread.t b/stream_ssl_preread.t
index 6991902..787cabe 100644
--- a/stream_ssl_preread.t
+++ b/stream_ssl_preread.t
@@ -35,6 +35,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
log_format status $status;
map $ssl_preread_server_name $name {
diff --git a/stream_ssl_preread_alpn.t b/stream_ssl_preread_alpn.t
index eb61e34..49771bb 100644
--- a/stream_ssl_preread_alpn.t
+++ b/stream_ssl_preread_alpn.t
@@ -35,6 +35,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
map $ssl_preread_alpn_protocols $name {
"" 127.0.0.1:8093;
default $ssl_preread_alpn_protocols;
diff --git a/stream_ssl_preread_protocol.t b/stream_ssl_preread_protocol.t
index 1faf38d..8950577 100644
--- a/stream_ssl_preread_protocol.t
+++ b/stream_ssl_preread_protocol.t
@@ -33,6 +33,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
server {
listen 127.0.0.1:8080;
ssl_preread on;
diff --git a/stream_ssl_realip.t b/stream_ssl_realip.t
index 7de6625..004e379 100644
--- a/stream_ssl_realip.t
+++ b/stream_ssl_realip.t
@@ -41,6 +41,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
ssl_certificate_key localhost.key;
ssl_certificate localhost.crt;
diff --git a/stream_ssl_variables.t b/stream_ssl_variables.t
index c86f78b..b177d7c 100644
--- a/stream_ssl_variables.t
+++ b/stream_ssl_variables.t
@@ -53,6 +53,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
ssl_certificate_key localhost.key;
ssl_certificate localhost.crt;
ssl_session_cache builtin;
diff --git a/stream_ssl_verify_client.t b/stream_ssl_verify_client.t
index 988fdc3..92a85f5 100644
--- a/stream_ssl_verify_client.t
+++ b/stream_ssl_verify_client.t
@@ -47,6 +47,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
log_format status $status;
ssl_certificate_key 1.example.com.key;
diff --git a/stream_status_variable.t b/stream_status_variable.t
index 10e3648..288f1ea 100644
--- a/stream_status_variable.t
+++ b/stream_status_variable.t
@@ -36,6 +36,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
log_format status $status;
limit_conn_zone $binary_remote_addr zone=zone:1m;
diff --git a/stream_tcp_nodelay.t b/stream_tcp_nodelay.t
index 3b1dc23..3545c60 100644
--- a/stream_tcp_nodelay.t
+++ b/stream_tcp_nodelay.t
@@ -38,6 +38,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
proxy_buffer_size 1;
tcp_nodelay off;
diff --git a/stream_udp_limit_conn.t b/stream_udp_limit_conn.t
index 977fb4e..b5ef4ce 100644
--- a/stream_udp_limit_conn.t
+++ b/stream_udp_limit_conn.t
@@ -34,6 +34,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
limit_conn_zone $binary_remote_addr zone=zone:1m;
limit_conn_zone $binary_remote_addr zone=zone2:1m;
diff --git a/stream_udp_limit_rate.t b/stream_udp_limit_rate.t
index fc848c5..b9befdc 100644
--- a/stream_udp_limit_rate.t
+++ b/stream_udp_limit_rate.t
@@ -34,6 +34,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
proxy_requests 2;
proxy_responses 1;
proxy_timeout 3s;
diff --git a/stream_udp_proxy.t b/stream_udp_proxy.t
index 2cd8303..9ceae74 100644
--- a/stream_udp_proxy.t
+++ b/stream_udp_proxy.t
@@ -33,6 +33,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
proxy_timeout 1s;
server {
diff --git a/stream_udp_proxy_requests.t b/stream_udp_proxy_requests.t
index 315ae5b..adfb2f3 100644
--- a/stream_udp_proxy_requests.t
+++ b/stream_udp_proxy_requests.t
@@ -34,6 +34,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
proxy_timeout 2100ms;
log_format status $status;
diff --git a/stream_udp_stream.t b/stream_udp_stream.t
index 5721081..6880e49 100644
--- a/stream_udp_stream.t
+++ b/stream_udp_stream.t
@@ -33,6 +33,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
proxy_timeout 1s;
server {
diff --git a/stream_udp_upstream.t b/stream_udp_upstream.t
index 6fe81b4..f7e0940 100644
--- a/stream_udp_upstream.t
+++ b/stream_udp_upstream.t
@@ -34,6 +34,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
proxy_responses 1;
proxy_timeout 1s;
diff --git a/stream_udp_upstream_hash.t b/stream_udp_upstream_hash.t
index 9b47021..91bcd5e 100644
--- a/stream_udp_upstream_hash.t
+++ b/stream_udp_upstream_hash.t
@@ -35,6 +35,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
proxy_responses 1;
proxy_timeout 1s;
diff --git a/stream_udp_upstream_least_conn.t b/stream_udp_upstream_least_conn.t
index 87acabe..6be9476 100644
--- a/stream_udp_upstream_least_conn.t
+++ b/stream_udp_upstream_least_conn.t
@@ -34,6 +34,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
proxy_responses 1;
proxy_timeout 1s;
diff --git a/stream_udp_wildcard.t b/stream_udp_wildcard.t
index 202d9d8..5ea4f40 100644
--- a/stream_udp_wildcard.t
+++ b/stream_udp_wildcard.t
@@ -40,6 +40,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
server {
listen %%PORT_8999_UDP%% udp;
return $server_addr;
diff --git a/stream_unix.t b/stream_unix.t
index 500e039..4bacc3f 100644
--- a/stream_unix.t
+++ b/stream_unix.t
@@ -38,6 +38,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
upstream u {
server unix:%%TESTDIR%%/unix.sock;
}
diff --git a/stream_upstream.t b/stream_upstream.t
index 37c95b0..eb1e642 100644
--- a/stream_upstream.t
+++ b/stream_upstream.t
@@ -36,6 +36,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
log_format bytes $upstream_addr!
$upstream_bytes_sent!$upstream_bytes_received;
diff --git a/stream_upstream_hash.t b/stream_upstream_hash.t
index e28925e..db231cf 100644
--- a/stream_upstream_hash.t
+++ b/stream_upstream_hash.t
@@ -37,6 +37,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
upstream hash {
hash $remote_addr;
server 127.0.0.1:8082;
diff --git a/stream_upstream_least_conn.t b/stream_upstream_least_conn.t
index 929dfd1..bba6f45 100644
--- a/stream_upstream_least_conn.t
+++ b/stream_upstream_least_conn.t
@@ -36,6 +36,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
upstream u {
least_conn;
server 127.0.0.1:8081;
diff --git a/stream_upstream_max_conns.t b/stream_upstream_max_conns.t
index 173dfec..79da91b 100644
--- a/stream_upstream_max_conns.t
+++ b/stream_upstream_max_conns.t
@@ -37,6 +37,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
upstream u_unlim {
server 127.0.0.1:8081 max_conns=0;
server 127.0.0.1:8082;
diff --git a/stream_upstream_random.t b/stream_upstream_random.t
index ea87e4e..ac59a96 100644
--- a/stream_upstream_random.t
+++ b/stream_upstream_random.t
@@ -35,6 +35,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
upstream u {
zone z 1m;
random;
diff --git a/stream_upstream_zone.t b/stream_upstream_zone.t
index edb4096..03a88fd 100644
--- a/stream_upstream_zone.t
+++ b/stream_upstream_zone.t
@@ -34,6 +34,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
log_format test $upstream_addr;
upstream u {
diff --git a/stream_upstream_zone_ssl.t b/stream_upstream_zone_ssl.t
index f17d5ef..3af8373 100644
--- a/stream_upstream_zone_ssl.t
+++ b/stream_upstream_zone_ssl.t
@@ -36,6 +36,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
proxy_ssl on;
proxy_ssl_session_reuse on;
diff --git a/stream_variables.t b/stream_variables.t
index 322df9f..11e1466 100644
--- a/stream_variables.t
+++ b/stream_variables.t
@@ -37,6 +37,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
server {
listen 127.0.0.1:8080;
return $connection:$nginx_version:$hostname:$pid:$bytes_sent;
diff --git a/worker_shutdown_timeout_stream.t b/worker_shutdown_timeout_stream.t
index b7d1951..14308ae 100644
--- a/worker_shutdown_timeout_stream.t
+++ b/worker_shutdown_timeout_stream.t
@@ -37,6 +37,8 @@
}
stream {
+ %%TEST_GLOBALS_STREAM%%
+
server {
listen 127.0.0.1:8025;
proxy_pass 127.0.0.1:8026;