comparison http_resolver_aaaa.t @ 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 78b4e12e6efe
children a6764c2a9f12
comparison
equal deleted inserted replaced
746:f75bc412e802 747:50a0001a56f2
45 resolver 127.0.0.1:8081; 45 resolver 127.0.0.1:8081;
46 proxy_pass http://$host:8080/backend; 46 proxy_pass http://$host:8080/backend;
47 47
48 proxy_next_upstream http_504 timeout error; 48 proxy_next_upstream http_504 timeout error;
49 proxy_intercept_errors on; 49 proxy_intercept_errors on;
50 proxy_connect_timeout 100ms; 50 proxy_connect_timeout 50ms;
51 error_page 504 502 /50x; 51 error_page 504 502 /50x;
52 add_header X-Host $upstream_addr;
52 } 53 }
53 location /two { 54 location /two {
54 resolver 127.0.0.1:8081 127.0.0.1:8082; 55 resolver 127.0.0.1:8081 127.0.0.1:8082;
55 proxy_pass http://$host:8080/backend; 56 proxy_pass http://$host:8080/backend;
56 } 57 }
84 'CNAME cached'); 85 'CNAME cached');
85 86
86 # CNAME + AAAA combined answer 87 # CNAME + AAAA combined answer
87 # demonstrates the name in answer section different from what is asked 88 # demonstrates the name in answer section different from what is asked
88 89
89 like(http_host_header('cname_a.example.net', '/'), qr/200 OK/, 'CNAME + AAAA'); 90 like(http_host_header('cname_a.example.net', '/'), qr/\[::1\]/, 'CNAME + AAAA');
90 91
91 # many AAAA records in round robin 92 # many AAAA records in round robin
92 # nonexisting IPs enumerated with proxy_next_upstream 93 # nonexisting IPs enumerated with proxy_next_upstream
93 94
94 like(http_host_header('many.example.net', '/'), 95 like(http_host_header('many.example.net', '/'),