From 4dd32426a13bf3d659d749ccf7f9e379ea0c991d Mon Sep 17 00:00:00 2001 From: Michal Cichra Date: Thu, 19 Oct 2017 11:58:36 +0200 Subject: [PATCH 1/3] [t] add missing upstream definition --- t/003-apicast.t | 2 ++ 1 file changed, 2 insertions(+) diff --git a/t/003-apicast.t b/t/003-apicast.t index 3ff0def73..352bed108 100644 --- a/t/003-apicast.t +++ b/t/003-apicast.t @@ -656,6 +656,7 @@ There are defaults defined for the error message, the content-type, and the status code (429). --- http_config lua_package_path "$TEST_NGINX_LUA_PATH"; + include $TEST_NGINX_UPSTREAM_CONFIG; init_by_lua_block { require('configuration_loader').mock({ services = { @@ -698,6 +699,7 @@ Limits exceeded === TEST 19: configurable limits exceeded error --- http_config lua_package_path "$TEST_NGINX_LUA_PATH"; + include $TEST_NGINX_UPSTREAM_CONFIG; init_by_lua_block { require('configuration_loader').mock({ services = { From 2ad00c53d62b8de55a716304c70a55b4af61e786 Mon Sep 17 00:00:00 2001 From: Michal Cichra Date: Thu, 19 Oct 2017 12:08:23 +0200 Subject: [PATCH 2/3] [t] increase wait timeout --- t/014-apicast-async-reporting.t | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/014-apicast-async-reporting.t b/t/014-apicast-async-reporting.t index b9dc4d4ac..ffc73476a 100644 --- a/t/014-apicast-async-reporting.t +++ b/t/014-apicast-async-reporting.t @@ -156,7 +156,7 @@ api response --- error_code: 200 --- error_log backend client uri: https://127.0.0.1:1953/transactions/authrep.xml?service_token=token-value&service_id=42&usage%5Bhits%5D=1&user_key=foo ok: true status: 200 ---- wait: 1 +--- wait: 3 === TEST 3: uses endpoint host as Host header when connecting to the backend @@ -218,4 +218,4 @@ $::dns->("localhost.example.com", "127.0.0.1") [error] --- error_log backend client uri: http://localhost.example.com:1984/transactions/authrep.xml?service_token=service-token&service_id=42&usage%5Bhits%5D=2&user_key=val ok: true status: 200 ---- wait: 1 +--- wait: 3 From 133b1f5646df9e4768785d849154a55c39a04fd3 Mon Sep 17 00:00:00 2001 From: Michal Cichra Date: Thu, 19 Oct 2017 12:11:02 +0200 Subject: [PATCH 3/3] [t] increase DNS TTL so it does not expire during the test --- t/014-apicast-async-reporting.t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/014-apicast-async-reporting.t b/t/014-apicast-async-reporting.t index ffc73476a..f52527847 100644 --- a/t/014-apicast-async-reporting.t +++ b/t/014-apicast-async-reporting.t @@ -213,7 +213,7 @@ all ok --- error_code: 200 --- udp_listen: 1953 --- udp_reply eval -$::dns->("localhost.example.com", "127.0.0.1") +$::dns->("localhost.example.com", "127.0.0.1", 60) --- no_error_log [error] --- error_log