okaybase commented on a change in pull request #4808:
URL: https://github.com/apache/apisix/pull/4808#discussion_r687404189



##########
File path: t/plugin/limit-count-redis-cluster.t
##########
@@ -434,3 +434,70 @@ passed
 GET /hello
 --- response_body
 hello world
+
+
+
+=== TEST 12: set route, with rejected_msg
+--- config
+    location /t {
+        content_by_lua_block {
+            local t = require("lib.test_admin").test
+            local code, body = t('/apisix/admin/routes/1',
+                ngx.HTTP_PUT,
+                [[{
+                    "uri": "/hello",
+                    "plugins": {
+                        "limit-count": {
+                            "count": 1,
+                            "time_window": 600,
+                            "key": "http_x_real_ip",
+                            "rejected_msg": "Requests are too frequent, please 
try again later.",
+                            "policy": "redis-cluster",
+                            "redis_cluster_nodes": [
+                                "127.0.0.1:8001",
+                                "127.0.0.1:8002",
+                                "127.0.0.1:8003",
+                                "127.0.0.1:8004"
+                            ],
+                            "redis_cluster_name": "redis-cluster-1"
+                        }
+                    },
+                    "upstream": {
+                        "nodes": {
+                            "127.0.0.1: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 13: rejected_msg for TEST 12, request normal

Review comment:
       okay, thanks~




-- 
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]


Reply via email to