Mercurial > hg > nginx-tests
comparison proxy_next_upstream_tries.t @ 1237:e4974af3fb12
Tests: adjusted udp ports to match allocated ports range.
author | Andrey Zelenkov <zelenkov@nginx.com> |
---|---|
date | Wed, 13 Sep 2017 19:04:25 +0300 |
parents | 882267679006 |
children |
comparison
equal
deleted
inserted
replaced
1236:93f749c1d5c5 | 1237:e4974af3fb12 |
---|---|
66 proxy_pass http://u2; | 66 proxy_pass http://u2; |
67 proxy_next_upstream_tries 2; | 67 proxy_next_upstream_tries 2; |
68 } | 68 } |
69 | 69 |
70 location /tries/resolver { | 70 location /tries/resolver { |
71 resolver 127.0.0.1:%%PORT_8082_UDP%%; | 71 resolver 127.0.0.1:%%PORT_8982_UDP%%; |
72 | 72 |
73 proxy_pass http://$host:%%PORT_8081%%; | 73 proxy_pass http://$host:%%PORT_8081%%; |
74 proxy_next_upstream_tries 2; | 74 proxy_next_upstream_tries 2; |
75 } | 75 } |
76 | 76 |
88 proxy_pass http://u2/w2; | 88 proxy_pass http://u2/w2; |
89 proxy_next_upstream_timeout 3800ms; | 89 proxy_next_upstream_timeout 3800ms; |
90 } | 90 } |
91 | 91 |
92 location /timeout/resolver { | 92 location /timeout/resolver { |
93 resolver 127.0.0.1:%%PORT_8082_UDP%%; | 93 resolver 127.0.0.1:%%PORT_8982_UDP%%; |
94 | 94 |
95 proxy_pass http://$host:%%PORT_8081%%/w2; | 95 proxy_pass http://$host:%%PORT_8081%%/w2; |
96 proxy_next_upstream_timeout 3800ms; | 96 proxy_next_upstream_timeout 3800ms; |
97 } | 97 } |
98 | 98 |
108 } | 108 } |
109 | 109 |
110 EOF | 110 EOF |
111 | 111 |
112 $t->run_daemon(\&http_daemon, port(8081)); | 112 $t->run_daemon(\&http_daemon, port(8081)); |
113 $t->run_daemon(\&dns_daemon, port(8082), $t); | 113 $t->run_daemon(\&dns_daemon, port(8982), $t); |
114 $t->run(); | 114 $t->run(); |
115 | 115 |
116 $t->waitforsocket('127.0.0.1:' . port(8081)); | 116 $t->waitforsocket('127.0.0.1:' . port(8081)); |
117 $t->waitforfile($t->testdir . '/' . port(8082)); | 117 $t->waitforfile($t->testdir . '/' . port(8982)); |
118 | 118 |
119 ############################################################################### | 119 ############################################################################### |
120 | 120 |
121 like(http_get('/tries'), qr/x404, 404x/, 'tries'); | 121 like(http_get('/tries'), qr/x404, 404x/, 'tries'); |
122 like(http_get('/tries/backup'), qr/x404, 404x/, 'tries backup'); | 122 like(http_get('/tries/backup'), qr/x404, 404x/, 'tries backup'); |