Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding unit test for key auth plugin with valid api key #964

Merged
merged 2 commits into from
Dec 13, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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