You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2020/08/26 00:50:57 UTC

[GitHub] [apisix] membphis commented on a change in pull request #2120: [key-auth]fix: skip consumer when config has no key

membphis commented on a change in pull request #2120:
URL: https://github.com/apache/apisix/pull/2120#discussion_r476926154



##########
File path: t/plugin/key-auth.t
##########
@@ -215,3 +215,56 @@ apikey: auth-13
 ["passed\n", "hello world\n"]
 --- no_error_log
 [error]
+
+
+
+=== TEST 9: add consumer with empty key
+--- config
+    location /t {
+        content_by_lua_block {
+            local t = require("lib.test_admin").test
+            local code, body = t('/apisix/admin/consumers',
+                ngx.HTTP_PUT,
+                [[{
+                    "username": "error",
+                    "plugins": {
+                        "key-auth": {
+                        }

Review comment:
       > add consumer with empty key
   
   should throw an error message if there is no argument when create a new consumer.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org