diff --git a/t/bug.t b/t/bug.t index c30ad2b..d494cbe 100644 --- a/t/bug.t +++ b/t/bug.t @@ -32,7 +32,6 @@ our $HttpConfig = qq{ lua_package_cpath "/usr/local/openresty-debug/lualib/?.so;/usr/local/openresty/lualib/?.so;;"; }; -$ENV{TEST_NGINX_RESOLVER} = '8.8.8.8'; $ENV{TEST_NGINX_HTML_DIR} = $HtmlDir; no_long_string(); diff --git a/t/flush.t b/t/flush.t index 9da3f48..e120253 100644 --- a/t/flush.t +++ b/t/flush.t @@ -15,7 +15,6 @@ our $HttpConfig = qq{ lua_package_cpath "/usr/local/openresty-debug/lualib/?.so;/usr/local/openresty/lualib/?.so;;"; }; -$ENV{TEST_NGINX_RESOLVER} = '8.8.8.8'; $ENV{TEST_NGINX_HTML_DIR} = $HtmlDir; no_long_string(); diff --git a/t/proto.t b/t/proto.t index 8bbd29a..c86db03 100644 --- a/t/proto.t +++ b/t/proto.t @@ -15,7 +15,6 @@ our $HttpConfig = qq{ lua_package_cpath "/usr/local/openresty-debug/lualib/?.so;/usr/local/openresty/lualib/?.so;;"; }; -$ENV{TEST_NGINX_RESOLVER} = '8.8.8.8'; $ENV{TEST_NGINX_HTML_DIR} = $HtmlDir; no_long_string(); diff --git a/t/sanity.t b/t/sanity.t index 20d8f9d..6b31a4c 100644 --- a/t/sanity.t +++ b/t/sanity.t @@ -15,7 +15,6 @@ our $HttpConfig = qq{ lua_package_cpath "/usr/local/openresty-debug/lualib/?.so;/usr/local/openresty/lualib/?.so;;"; }; -$ENV{TEST_NGINX_RESOLVER} = '8.8.8.8'; $ENV{TEST_NGINX_HTML_DIR} = $HtmlDir; no_long_string(); diff --git a/t/timeout.t b/t/timeout.t index 6a7c328..426610a 100644 --- a/t/timeout.t +++ b/t/timeout.t @@ -41,7 +41,7 @@ our $HttpConfig = qq{ lua_package_cpath "/usr/local/openresty-debug/lualib/?.so;/usr/local/openresty/lualib/?.so;;"; }; -$ENV{TEST_NGINX_RESOLVER} = '8.8.8.8'; +$ENV{TEST_NGINX_RESOLVER} ||= '8.8.8.8'; $ENV{TEST_NGINX_HTML_DIR} = $HtmlDir; no_long_string(); @@ -55,7 +55,7 @@ __DATA__ === TEST 1: connect timeout --- http_config eval: $::HttpConfig --- config - resolver 8.8.8.8; + resolver $TEST_NGINX_RESOLVER; location /t { content_by_lua ' -- visit agentzh.org first to get DNS resolve done, then the @@ -172,7 +172,7 @@ foo === TEST 4: return previous log error --- http_config eval: $::HttpConfig --- config - resolver 8.8.8.8; + resolver $TEST_NGINX_RESOLVER; log_subrequest on; location /main { content_by_lua ' @@ -237,7 +237,7 @@ foo === TEST 5: flush race condition --- http_config eval: $::HttpConfig --- config - resolver 8.8.8.8; + resolver $TEST_NGINX_RESOLVER; location /t { content_by_lua ' -- visit agentzh.org first to get DNS resolve done, then the