Skip to content

Commit

Permalink
Fix integration test
Browse files Browse the repository at this point in the history
Signed-off-by: Eloy Coto <[email protected]>
  • Loading branch information
eloycoto committed May 19, 2021
1 parent 4cfb6ad commit c6a2b58
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions t/apicast-async-reporting.t
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)
}
}
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit c6a2b58

Please sign in to comment.