more fixes in the tests regarding the resolver.
This commit is contained in:
Родитель
bba7058e76
Коммит
2fe0d8dda2
|
@ -603,9 +603,20 @@ lua udp socket receive buffer size: 8192
|
|||
=== TEST 11: access the google DNS server (using domain names)
|
||||
--- config
|
||||
server_tokens off;
|
||||
resolver $TEST_NGINX_RESOLVER;
|
||||
resolver $TEST_NGINX_RESOLVER ipv6=off;
|
||||
location /t {
|
||||
content_by_lua '
|
||||
-- avoid flushing google in "check leak" testing mode:
|
||||
local counter = package.loaded.counter
|
||||
if not counter then
|
||||
counter = 1
|
||||
elseif counter >= 2 then
|
||||
return ngx.exit(503)
|
||||
else
|
||||
counter = counter + 1
|
||||
end
|
||||
package.loaded.counter = counter
|
||||
|
||||
local socket = ngx.socket
|
||||
-- local socket = require "socket"
|
||||
|
||||
|
@ -613,7 +624,7 @@ lua udp socket receive buffer size: 8192
|
|||
|
||||
udp:settimeout(2000) -- 2 sec
|
||||
|
||||
local ok, err = udp:setpeername("$TEST_NGINX_RESOLVER", 53)
|
||||
local ok, err = udp:setpeername("google-public-dns-a.google.com", 53)
|
||||
if not ok then
|
||||
ngx.say("failed to connect: ", err)
|
||||
return
|
||||
|
|
|
@ -40,7 +40,7 @@ __DATA__
|
|||
=== TEST 1: www.google.com
|
||||
--- config
|
||||
server_tokens off;
|
||||
resolver $TEST_NGINX_RESOLVER;
|
||||
resolver $TEST_NGINX_RESOLVER ipv6=off;
|
||||
location /t {
|
||||
#set $port 5000;
|
||||
set $port $TEST_NGINX_MEMCACHED_PORT;
|
||||
|
@ -852,7 +852,7 @@ SSL reused session
|
|||
=== TEST 11: www.google.com (SSL verify passes)
|
||||
--- config
|
||||
server_tokens off;
|
||||
resolver $TEST_NGINX_RESOLVER;
|
||||
resolver $TEST_NGINX_RESOLVER ipv6=off;
|
||||
lua_ssl_trusted_certificate ../html/trusted.crt;
|
||||
lua_ssl_verify_depth 3;
|
||||
location /t {
|
||||
|
@ -945,7 +945,7 @@ SSL reused session
|
|||
=== TEST 12: www.google.com (SSL verify enabled and no corresponding trusted certificates)
|
||||
--- config
|
||||
server_tokens off;
|
||||
resolver $TEST_NGINX_RESOLVER;
|
||||
resolver $TEST_NGINX_RESOLVER ipv6=off;
|
||||
lua_ssl_trusted_certificate ../html/trusted.crt;
|
||||
lua_ssl_verify_depth 3;
|
||||
location /t {
|
||||
|
|
Загрузка…
Ссылка в новой задаче