more fixes in the tests regarding the resolver.

This commit is contained in:
Yichun Zhang (agentzh) 2014-10-12 22:36:53 -07:00
Родитель bba7058e76
Коммит 2fe0d8dda2
2 изменённых файлов: 16 добавлений и 5 удалений

Просмотреть файл

@ -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 {