Firstsawyou commented on a change in pull request #3140:
URL: https://github.com/apache/apisix/pull/3140#discussion_r549205602
##########
File path: t/plugin/limit-count.t
##########
@@ -1175,3 +1175,95 @@ passed
[200, 200, 503, 503]
--- no_error_log
[error]
+
+
+
+=== TEST 37: the limit-count plugin is bound to the service and upstream is
the domain name
+--- config
+ location /t {
+ content_by_lua_block {
+ local t = require("lib.test_admin").test
+ local code, body = t('/apisix/admin/services/1',
+ ngx.HTTP_PUT,
+ [[{
+ "plugins": {
+ "limit-count": {
+ "count": 3,
+ "time_window": 60,
+ "rejected_code": 503
+ }
+ },
+ "upstream": {
+ "nodes": {
+ "test.com:1980": 1
+ },
+ "type": "roundrobin"
+ }
+ }]]
+ )
+
+ if code >= 300 then
+ ngx.status = code
+ end
+ ngx.say(body)
+ }
+ }
+--- request
+GET /t
+--- response_body
+passed
+--- no_error_log
+[error]
+
+
+
+=== TEST 38: add route and bind service
Review comment:
updated.
----------------------------------------------------------------
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:
[email protected]