tests: avoid using hard-coded DNS nameserver address but the TEST_NGINX_RESOLVER environment.
This commit is contained in:
Родитель
d427517315
Коммит
bba7058e76
|
@ -2463,7 +2463,6 @@ capture body filter
|
|||
end
|
||||
";
|
||||
|
||||
resolver 8.8.8.8;
|
||||
proxy_http_version 1.1;
|
||||
proxy_pass $_url;
|
||||
}
|
||||
|
@ -2534,7 +2533,6 @@ qr/Assertion .*? failed/
|
|||
end
|
||||
";
|
||||
|
||||
resolver 8.8.8.8;
|
||||
proxy_http_version 1.1;
|
||||
proxy_pass $_url;
|
||||
}
|
||||
|
|
|
@ -404,7 +404,7 @@ attempt to send data on a closed socket
|
|||
=== TEST 9: resolver error (timeout)
|
||||
--- config
|
||||
server_tokens off;
|
||||
resolver 8.8.8.8;
|
||||
resolver $TEST_NGINX_RESOLVER;
|
||||
resolver_timeout 1ms;
|
||||
location /t {
|
||||
content_by_lua '
|
||||
|
@ -1996,7 +1996,7 @@ close: 1 nil
|
|||
|
||||
=== TEST 33: github issue #215: Handle the posted requests in lua cosocket api (failed to resolve)
|
||||
--- config
|
||||
resolver 8.8.8.8;
|
||||
resolver $TEST_NGINX_RESOLVER;
|
||||
|
||||
location = /sub {
|
||||
content_by_lua '
|
||||
|
@ -2039,7 +2039,7 @@ resolve name done
|
|||
|
||||
=== TEST 34: github issue #215: Handle the posted requests in lua cosocket api (successfully resolved)
|
||||
--- config
|
||||
resolver 8.8.8.8;
|
||||
resolver $TEST_NGINX_RESOLVER;
|
||||
|
||||
location = /sub {
|
||||
content_by_lua '
|
||||
|
@ -3009,7 +3009,7 @@ runtime error: content_by_lua:16: bad request
|
|||
=== TEST 50: cosocket resolving aborted by coroutine yielding failures (require)
|
||||
--- http_config
|
||||
lua_package_path "$prefix/html/?.lua;;";
|
||||
resolver 8.8.8.8;
|
||||
resolver $TEST_NGINX_RESOLVER;
|
||||
|
||||
--- config
|
||||
location = /t {
|
||||
|
@ -3043,7 +3043,7 @@ runtime error: attempt to yield across C-call boundary
|
|||
=== TEST 51: cosocket resolving aborted by coroutine yielding failures (xpcall err)
|
||||
--- http_config
|
||||
lua_package_path "$prefix/html/?.lua;;";
|
||||
resolver 8.8.8.8;
|
||||
resolver $TEST_NGINX_RESOLVER;
|
||||
|
||||
--- config
|
||||
location = /t {
|
||||
|
|
|
@ -558,7 +558,7 @@ lua udp socket read timed out
|
|||
|
||||
udp:settimeout(2000) -- 2 sec
|
||||
|
||||
local ok, err = udp:setpeername("8.8.8.8", 53)
|
||||
local ok, err = udp:setpeername("$TEST_NGINX_RESOLVER", 53)
|
||||
if not ok then
|
||||
ngx.say("failed to connect: ", err)
|
||||
return
|
||||
|
@ -613,7 +613,7 @@ lua udp socket receive buffer size: 8192
|
|||
|
||||
udp:settimeout(2000) -- 2 sec
|
||||
|
||||
local ok, err = udp:setpeername("google-public-dns-a.google.com", 53)
|
||||
local ok, err = udp:setpeername("$TEST_NGINX_RESOLVER", 53)
|
||||
if not ok then
|
||||
ngx.say("failed to connect: ", err)
|
||||
return
|
||||
|
@ -657,7 +657,7 @@ lua udp socket receive buffer size: 8192
|
|||
|
||||
=== TEST 12: github issue #215: Handle the posted requests in lua cosocket api (failed to resolve)
|
||||
--- config
|
||||
resolver 8.8.8.8;
|
||||
resolver $TEST_NGINX_RESOLVER;
|
||||
|
||||
location = /sub {
|
||||
content_by_lua '
|
||||
|
@ -699,7 +699,7 @@ resolve name done
|
|||
|
||||
=== TEST 13: github issue #215: Handle the posted requests in lua cosocket api (successfully resolved)
|
||||
--- config
|
||||
resolver 8.8.8.8;
|
||||
resolver $TEST_NGINX_RESOLVER;
|
||||
resolver_timeout 3s;
|
||||
|
||||
location = /sub {
|
||||
|
|
Загрузка…
Ссылка в новой задаче