Mercurial > hg > nginx-tests
changeset 747:50a0001a56f2
Tests: rethought 78b4e12e6efe to fix http_resolver_aaaa.t tests.
Connecting to ::1 on solaris may get enormous time to complete, and instead of
adjusting proxy_connect_timeout to get a connection, test the resolved address.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Tue, 20 Oct 2015 14:07:00 +0300 |
parents | f75bc412e802 |
children | b818ea3a73de |
files | http_resolver_aaaa.t |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/http_resolver_aaaa.t +++ b/http_resolver_aaaa.t @@ -47,8 +47,9 @@ http { proxy_next_upstream http_504 timeout error; proxy_intercept_errors on; - proxy_connect_timeout 100ms; + proxy_connect_timeout 50ms; error_page 504 502 /50x; + add_header X-Host $upstream_addr; } location /two { resolver 127.0.0.1:8081 127.0.0.1:8082; @@ -86,7 +87,7 @@ like(http_host_header('cname.example.net # CNAME + AAAA combined answer # demonstrates the name in answer section different from what is asked -like(http_host_header('cname_a.example.net', '/'), qr/200 OK/, 'CNAME + AAAA'); +like(http_host_header('cname_a.example.net', '/'), qr/\[::1\]/, 'CNAME + AAAA'); # many AAAA records in round robin # nonexisting IPs enumerated with proxy_next_upstream