# HG changeset patch # User Sergey Kandaurov # Date 1434497255 -10800 # Node ID 9310443c0bd3e23a03b385d0a084c94daf72b8c9 # Parent ef1c363dd6486173c669181f31a5cd8a242bd033 Tests: reverted 530a3152753b with test for multiple http blocks. Such configuration is considered a bad practice, and it was explicitly forbidden in 78c06e5e1d76 (1.9.3). diff --git a/http_block.t b/http_block.t deleted file mode 100644 --- a/http_block.t +++ /dev/null @@ -1,70 +0,0 @@ -#!/usr/bin/perl - -# (C) Sergey Kandaurov -# (C) Nginx, Inc. - -# Tests for http proxy module with multiple http configuration blocks. - -############################################################################### - -use warnings; -use strict; - -use Test::More; - -BEGIN { use FindBin; chdir($FindBin::Bin); } - -use lib 'lib'; -use Test::Nginx; - -############################################################################### - -select STDERR; $| = 1; -select STDOUT; $| = 1; - -my $t = Test::Nginx->new()->has(qw/http proxy/)->plan(1); - -$t->write_file_expand('nginx.conf', <<'EOF'); - -%%TEST_GLOBALS%% - -daemon off; - -events { -} - -http { - %%TEST_GLOBALS_HTTP%% - - server { - listen 127.0.0.1:8080; - server_name localhost; - - location / { - proxy_pass http://127.0.0.1:8081; - proxy_read_timeout 1s; - } - } -} - -http { - %%TEST_GLOBALS_HTTP%% - - server { - listen 127.0.0.1:8081; - server_name localhost; - - location / {} - } -} - -EOF - -$t->write_file('t', 'SEE-THIS'); -$t->run(); - -############################################################################### - -like(http_get('/t'), qr/SEE-THIS/, 'proxy request'); - -###############################################################################