soulbird commented on code in PR #9291:
URL: https://github.com/apache/apisix/pull/9291#discussion_r1165043440
##########
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:
I know, we hook it in a very hacky way. But essentially it doesn't belong to
apisix, if you only test it, some logic in the incoming function will be missed
--
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]