From b8d3b562f49c0b47f2822278629a7673ac9f714d Mon Sep 17 00:00:00 2001 From: Yuansheng Date: Thu, 18 Jun 2020 15:45:35 +0800 Subject: [PATCH 1/2] change: update `resty-radixtree` to version 1.9 . reformatted test case by `reindex`. --- rockspec/apisix-master-0.rockspec | 2 +- t/plugin/authz-keycloak.t | 4 ++++ t/plugin/consumer-restriction.t | 1 - 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/rockspec/apisix-master-0.rockspec b/rockspec/apisix-master-0.rockspec index f1560cff246d..da953bcf3502 100644 --- a/rockspec/apisix-master-0.rockspec +++ b/rockspec/apisix-master-0.rockspec @@ -41,7 +41,7 @@ dependencies = { "lua-resty-cookie = 0.1.0", "lua-resty-session = 2.24", "opentracing-openresty = 0.1", - "lua-resty-radixtree = 1.8", + "lua-resty-radixtree = 1.9", "lua-protobuf = 0.3.1", "lua-resty-openidc = 1.7.2-1", "luafilesystem = 1.7.0-2", diff --git a/t/plugin/authz-keycloak.t b/t/plugin/authz-keycloak.t index c3361b5063dd..00ebc0ddb270 100644 --- a/t/plugin/authz-keycloak.t +++ b/t/plugin/authz-keycloak.t @@ -48,6 +48,7 @@ done [error] + === TEST 2: full schema check --- config location /t { @@ -74,6 +75,7 @@ done [error] + === TEST 3: token_endpoint missing --- config location /t { @@ -96,6 +98,7 @@ done [error] + === TEST 4: add plugin with view course permissions --- config location /t { @@ -209,6 +212,7 @@ true [error] + === TEST 6: invalid access token --- config location /t { diff --git a/t/plugin/consumer-restriction.t b/t/plugin/consumer-restriction.t index c581c82b230a..57bbed3d58df 100644 --- a/t/plugin/consumer-restriction.t +++ b/t/plugin/consumer-restriction.t @@ -284,7 +284,6 @@ passed - === TEST 10: verify unauthorized --- request GET /hello From c92188dbd493e1ae266db605d35f3c4dda2dc57e Mon Sep 17 00:00:00 2001 From: Yuansheng Wang Date: Thu, 18 Jun 2020 18:06:25 +0800 Subject: [PATCH 2/2] test: updated test cases. --- t/node/vars.t | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/t/node/vars.t b/t/node/vars.t index fdbe22ea66c5..a51af1f6916c 100644 --- a/t/node/vars.t +++ b/t/node/vars.t @@ -34,7 +34,7 @@ __DATA__ ngx.HTTP_PUT, [[{ "uri": "/hello", - "vars": [ ["arg_k", "v"] ], + "vars": [ ["arg_k", "==", "v"] ], "upstream": { "nodes": { "127.0.0.1:1980": 1 @@ -100,7 +100,7 @@ hello world ngx.HTTP_PUT, [=[{ "uri": "/hello", - "vars": [["cookie_k", "v"]], + "vars": [["cookie_k", "==", "v"]], "upstream": { "nodes": { "127.0.0.1:1980": 1 @@ -170,7 +170,7 @@ hello world ngx.HTTP_PUT, [=[{ "uri": "/hello", - "vars": [["http_k", "v"]], + "vars": [["http_k", "==", "v"]], "upstream": { "nodes": { "127.0.0.1:1980": 1 @@ -240,7 +240,7 @@ hello world ngx.HTTP_PUT, [=[{ "uri": "/hello", - "vars": [["http_k", "header"], ["cookie_k", "cookie"], ["arg_k", "uri_arg"]], + "vars": [["http_k", "==", "header"], ["cookie_k", "==", "cookie"], ["arg_k", "==", "uri_arg"]], "upstream": { "nodes": { "127.0.0.1:1980": 1