spacewander commented on a change in pull request #5126:
URL: https://github.com/apache/apisix/pull/5126#discussion_r715250580
##########
File path: t/control/schema.t
##########
@@ -98,3 +98,48 @@ __DATA__
}
--- response_body
passed
+
+
+
+=== TEST 2: confirm the scope of plugin
+--- yaml_config
+apisix:
+ node_listen: 1984
+ admin_key: null
+plugins:
+ - batch-requests
+ - error-log-logger
+ - server-info
+ - example-plugin
+ - node-status
+--- config
+ location /t {
+ content_by_lua_block {
+ local json = require("toolkit.json")
+ local t = require("lib.test_admin").test
+
+ local code, message, res = t('/v1/schema',
+ ngx.HTTP_GET
+ )
+
+ if code >= 300 then
+ ngx.status = code
+ ngx.say(message)
+ return
+ end
+
+ res = json.decode(res)
+ local global_plugins = {}
+ local plugins = res["plugins"]
+ for k, v in pairs(plugins) do
+ if v.scope == "global" then
+ global_plugins[k] = v.scope
+ end
+ end
+ ngx.say(json.encode(global_plugins))
+ }
+ }
+--- response_body
+{"batch-requests":"global","error-log-logger":"global","node-status":"global","server-info":"global"}
+--- no_error_log
Review comment:
The no_error_log is already set in the file level
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]