You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by me...@apache.org on 2020/02/18 04:23:11 UTC
[incubator-apisix] branch master updated: test style: formatted by
reindex tools. (#1130)
This is an automated email from the ASF dual-hosted git repository.
membphis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-apisix.git
The following commit(s) were added to refs/heads/master by this push:
new 8cc3380 test style: formatted by reindex tools. (#1130)
8cc3380 is described below
commit 8cc338025057ee320b7931716e3e51a570f28513
Author: YuanSheng Wang <me...@gmail.com>
AuthorDate: Tue Feb 18 12:23:02 2020 +0800
test style: formatted by reindex tools. (#1130)
---
t/plugin/wolf-rbac.t | 34 ++++++++++++++++++++++++++--------
1 file changed, 26 insertions(+), 8 deletions(-)
diff --git a/t/plugin/wolf-rbac.t b/t/plugin/wolf-rbac.t
index e90e307..52b27ae 100644
--- a/t/plugin/wolf-rbac.t
+++ b/t/plugin/wolf-rbac.t
@@ -49,6 +49,8 @@ qr/{"appid":"unset","server":"http:\\\/\\\/127\.0\.0\.1:10080"}/
--- no_error_log
[error]
+
+
=== TEST 2: wrong type of string
--- config
location /t {
@@ -71,6 +73,7 @@ done
[error]
+
=== TEST 3: add consumer with username and plugins
--- config
location /t {
@@ -115,6 +118,7 @@ passed
[error]
+
=== TEST 4: enable wolf rbac plugin using admin api
--- config
location /t {
@@ -150,6 +154,7 @@ passed
[error]
+
=== TEST 5: login failed, appid is missing
--- request
POST /apisix/plugin/wolf-rbac/login
@@ -163,6 +168,7 @@ qr/appid is missing/
[error]
+
=== TEST 6: login failed, appid not found
--- request
POST /apisix/plugin/wolf-rbac/login
@@ -176,6 +182,7 @@ qr/appid \[not-found\] not found/
[error]
+
=== TEST 7: login failed, username missing
--- request
POST /apisix/plugin/wolf-rbac/login
@@ -187,6 +194,7 @@ Content-Type: application/x-www-form-urlencoded
qr/ERR_USERNAME_MISSING/
+
=== TEST 8: login failed, password missing
--- request
POST /apisix/plugin/wolf-rbac/login
@@ -198,6 +206,7 @@ Content-Type: application/x-www-form-urlencoded
qr/ERR_PASSWORD_MISSING/
+
=== TEST 9: login failed, username not found
--- request
POST /apisix/plugin/wolf-rbac/login
@@ -209,6 +218,7 @@ Content-Type: application/x-www-form-urlencoded
qr/ERR_USER_NOT_FOUND/
+
=== TEST 10: login failed, wrong password
--- request
POST /apisix/plugin/wolf-rbac/login
@@ -220,6 +230,7 @@ Content-Type: application/x-www-form-urlencoded
qr/ERR_PASSWORD_ERROR/
+
=== TEST 11: login successfully
--- request
POST /apisix/plugin/wolf-rbac/login
@@ -234,7 +245,7 @@ qr/{"rbac_token":"V1#wolf-rbac-app#wolf-rbac-token","user_info":{"nickname":"adm
-=== TEST 21: verify, missing token
+=== TEST 12: verify, missing token
--- request
GET /hello
--- error_code: 401
@@ -244,7 +255,8 @@ GET /hello
[error]
-=== TEST 22: verify: invalid rbac token
+
+=== TEST 13: verify: invalid rbac token
--- request
GET /hello
--- error_code: 401
@@ -256,7 +268,8 @@ x-rbac-token: invalid-rbac-token
[error]
-=== TEST 23: verify: invalid appid in rbac token
+
+=== TEST 14: verify: invalid appid in rbac token
--- request
GET /hello
--- error_code: 401
@@ -266,7 +279,8 @@ x-rbac-token: V1#invalid-appid#rbac-token
{"message":"Invalid appid in rbac token"}
-=== TEST 24: verify: failed
+
+=== TEST 15: verify: failed
--- request
GET /hello1
--- error_code: 401
@@ -276,7 +290,8 @@ x-rbac-token: V1#wolf-rbac-app#wolf-rbac-token
{"message":"no permission to access"}
-=== TEST 25: verify (in argument)
+
+=== TEST 16: verify (in argument)
--- request
GET /hello?rbac_token=V1%23wolf-rbac-app%23wolf-rbac-token
--- response_headers
@@ -289,7 +304,8 @@ hello world
[error]
-=== TEST 26: verify (in header Authorization)
+
+=== TEST 17: verify (in header Authorization)
--- request
GET /hello
--- more_headers
@@ -304,7 +320,8 @@ hello world
[error]
-=== TEST 27: verify (in header x-rbac-token)
+
+=== TEST 18: verify (in header x-rbac-token)
--- request
GET /hello
--- more_headers
@@ -319,7 +336,8 @@ hello world
[error]
-=== TEST 28: verify (in cookie)
+
+=== TEST 19: verify (in cookie)
--- request
GET /hello
--- more_headers