diff --git a/test/ngx_confs/tnt_server_test.conf b/test/ngx_confs/tnt_server_test.conf index bca5fe2..f0f3a2a 100644 --- a/test/ngx_confs/tnt_server_test.conf +++ b/test/ngx_confs/tnt_server_test.conf @@ -218,5 +218,12 @@ http { tnt_method update; tnt_pass tnt; } + + location /unescape { + tnt_http_rest_methods get; + tnt_pass_http_request parse_args unescape; + tnt_method echo_1; + tnt_pass tnt; + } } } diff --git a/test/test.lua b/test/test.lua index 075a689..273c16c 100644 --- a/test/test.lua +++ b/test/test.lua @@ -38,16 +38,6 @@ function rest_api_parse_query_args(http_request_full) return {http_request_full} end -box.cfg { - log_level = 5; - listen = 9999; - wal_mode = 'none'; -} - -box.once('gr', function() - box.schema.user.grant('guest', 'read,write,execute', 'universe') -end) - -- BUG -- https://github.com/tarantool/nginx_upstream_module/issues/37 [[ function read(http_request_full) return { @@ -140,3 +130,14 @@ function test_headers_out(req) end return true end + +-- CFG +box.cfg { + log_level = 5; + listen = 9999; + wal_mode = 'none'; +} + +box.once('gr', function() + box.schema.user.grant('guest', 'read,write,execute', 'universe') +end) diff --git a/test/v24_features.py b/test/v24_features.py index b4c79f4..cc66830 100755 --- a/test/v24_features.py +++ b/test/v24_features.py @@ -37,3 +37,13 @@ print('[+] Headers out') preset_method_location = BASE_URL + '/headers_out' post_success(preset_method_location, {"body": True}, {}) + +# ============ +# +print('[+] Unescape issue') +arg_a = 'some string with spaces' +preset_method_location = BASE_URL + '/unescape?a=' + arg_a +result = get_success(preset_method_location, None, {}) +result = result[0] +assert(result['args']['a'] == arg_a), 'does not expected (args.a)' +