tzssangglass commented on a change in pull request #2886:
URL: https://github.com/apache/apisix/pull/2886#discussion_r543493373



##########
File path: t/admin/plugins.t
##########
@@ -162,3 +162,65 @@ plugins:
     }
 --- no_error_log
 [error]
+
+
+
+=== TEST 8: get all the attributes of all plugins
+--- config
+    location /t {
+        content_by_lua_block {
+            local json = require("toolkit.json")
+            local t = require("lib.test_admin").test
+
+            local code, message, res = t('/apisix/admin/plugins/?all=true',
+                ngx.HTTP_GET
+            )
+
+            if code >= 300 then
+                ngx.status = code
+                ngx.say(message)
+                return
+            end
+
+            res = json.decode(res)
+            ngx.say(json.encode(res))
+        }
+    }
+--- response_body eval
+qr/\{"name":"example-plugin","priority":0,"schema":\{"properties":\{"i":\{"minimum":0,"type":"number"\},"ip":\{"type":"string"\},"port":\{"type":"integer"\},"s":\{"type":"string"\},"t":\{"minItems":1,"type":"array"\}\},"required":\["i"\],"type":"object"\},"type":"other","version":0.1\}/
+--- no_error_log
+[error]
+
+
+
+=== TEST 9: confirm the plugin of auth type

Review comment:
       add a test case for `consumer_schema`.
   update the title of test case no.8 in `t/admin/plugins.t`, the `name`, 
`priority`, `schema`,`type` and `version` of plugin has covered by test case 
no.8.




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to