monkeyDluffy6017 commented on code in PR #10607:
URL: https://github.com/apache/apisix/pull/10607#discussion_r1418271215


##########
t/plugin/limit-count-redis-cluster3.t:
##########
@@ -77,3 +81,55 @@ __DATA__
     }
 --- response_body
 remaining: 1
+
+
+
+=== TEST 2: set route, with redis_cluster_nodes as environment variables and 
redis_cluster_name
+--- 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": 2,
+                            "time_window": 60,
+                            "rejected_code": 503,
+                            "key": "remote_addr",
+                            "policy": "redis-cluster",
+                            "redis_timeout": 1001,
+                            "redis_cluster_nodes": [
+                                "$ENV://REDIS_NODE_0",
+                                "$ENV://REDIS_NODE_1"

Review Comment:
   I think you are going to encrypt the `redis_password`, am i wrong?



##########
t/plugin/limit-count5.t:
##########
@@ -89,3 +91,49 @@ remaining: 2
 remaining: 0
 rejected
 rejected
+
+
+
+=== TEST 2: set route(id: 1) using environment variable for key
+--- 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,
+                 [[{
+                        "methods": ["GET"],
+                        "plugins": {
+                            "limit-count": {
+                                "count": 2,
+                                "time_window": 60,
+                                "rejected_code": 503,
+                                "key": "$ENV://LIMIT_COUNT_KEY"

Review Comment:
   ditto



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