From c6a2b5858e3fe056df05c37c8d4acb232b018080 Mon Sep 17 00:00:00 2001 From: Eloy Coto Date: Wed, 19 May 2021 15:43:44 +0200 Subject: [PATCH] Fix integration test Signed-off-by: Eloy Coto --- t/apicast-async-reporting.t | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/t/apicast-async-reporting.t b/t/apicast-async-reporting.t index 35ec16def..bc8d0ac74 100644 --- a/t/apicast-async-reporting.t +++ b/t/apicast-async-reporting.t @@ -56,6 +56,7 @@ yay, api backend: 127.0.0.1:$TEST_NGINX_SERVER_PORT === TEST 2: https api backend works with async background reporting +--- ONLY --- ssl random_port --- http_config include $TEST_NGINX_UPSTREAM_CONFIG; @@ -97,6 +98,8 @@ location /api/ { location /transactions/authrep.xml { content_by_lua_block { + local expected = "service_token=token-value&service_id=42&usage%5Bhits%5D=1&user_key=foo&service_token=token-value" + require('luassert').same(ngx.decode_args(expected), ngx.req.get_uri_args(0)) ngx.exit(200) } } @@ -129,13 +132,6 @@ GET /test?user_key=foo --- response_body api response --- error_code: 200 ---- error_log env eval -[ - qr/backend client uri\: https\:\/\/127\.0\.0\.1:$TEST_NGINX_RANDOM_PORT\/transactions\/authrep.xml\?.*?(service_id=42).*? ok\: true status\: 200/, - qr/backend client uri\: https\:\/\/127\.0\.0\.1:$TEST_NGINX_RANDOM_PORT\/transactions\/authrep.xml\?.*?(service_token=token-value).*? ok\: true status\: 200/, - qr/backend client uri\: https\:\/\/127\.0\.0\.1:$TEST_NGINX_RANDOM_PORT\/transactions\/authrep.xml\?.*?(user_key=foo).*? ok\: true status\: 200/, - qr/backend client uri\: https\:\/\/127\.0\.0\.1:$TEST_NGINX_RANDOM_PORT\/transactions\/authrep.xml\?.*?(usage%5Bhits%5D=1).*? ok\: true status\: 200/ -] --- wait: 3 === TEST 3: uses endpoint host as Host header