soulbird commented on code in PR #9291:
URL: https://github.com/apache/apisix/pull/9291#discussion_r1165036843
##########
t/plugin/limit-count4.t:
##########
@@ -171,3 +171,57 @@ passed
}
--- response_body
["1","0","0"]
+
+
+
+=== TEST 5: modified limit-count.incoming, cost == 2
+--- config
+ location = /t {
+ content_by_lua_block {
+ local limit_count_local = require
"apisix.plugins.limit-count.limit-count-local"
+ local lim = limit_count_local.new("plugin-limit-count", 10, 60)
+ local uri = ngx.var.uri
+ for i = 1, 7 do
+ local delay, err = lim.limit_count:handle_incoming(uri, 2,
true)
Review Comment:
Please add test cases to test the incoming function separately,
limit_count.handle_incoming is not a module function of apisix.
--
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]