Skip to content

Commit

Permalink
test case: Adding unit test for key auth plugin with valid api key (#964
Browse files Browse the repository at this point in the history
)
  • Loading branch information
sshniro authored and moonming committed Dec 13, 2019
1 parent f2bfc13 commit 8958c6c
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions t/plugin/key-auth.t
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,19 @@ passed



=== TEST 5: invalid consumer
=== TEST 5: valid consumer
--- request
GET /hello
--- more_headers
apikey: auth-one
--- response_body
hello world
--- no_error_log
[error]



=== TEST 6: invalid consumer
--- request
GET /hello
--- more_headers
Expand All @@ -160,7 +172,7 @@ apikey: 123



=== TEST 6: not found apikey header
=== TEST 7: not found apikey header
--- request
GET /hello
--- error_code: 401
Expand All @@ -171,7 +183,7 @@ GET /hello



=== TEST 7: valid consumer
=== TEST 8: valid consumer
--- config
location /add_more_consumer {
content_by_lua_block {
Expand Down

0 comments on commit 8958c6c

Please sign in to comment.