xiaoxuanzi commented on code in PR #8604:
URL: https://github.com/apache/apisix/pull/8604#discussion_r1089675336
##########
t/plugin/elasticsearch-logger.t:
##########
@@ -515,3 +515,39 @@ apisix:
--- response_body
123456
PTQvJEaPcNOXcOHeErC0XQ==
+
+
+
+=== TEST 13: add plugin on routes using multi elasticsearch-logger
+--- 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",
+ upstream = {
+ type = "roundrobin",
+ nodes = {
+ ["127.0.0.1:1980"] = 1
+ }
+ },
+ plugins = {
+ ["elasticsearch-logger"] = {
+ endpoint_addr = {"http://127.0.0.1:9200",
"http://127.0.0.1:9201"},
+ field = {
+ index = "services"
+ },
+ batch_max_size = 1,
+ inactive_timeout = 1
+ }
+ }
+ })
+
+ if code >= 300 then
+ ngx.status = code
+ end
+ ngx.say(body)
+ }
+ }
+--- response_body
+passed
Review Comment:
I agree with you, but I don't know how.
Can you give an example?
I take PR #7517 as reference.
[=== TEST 5: add plugin on routes using multi
clickhouse-logger](https://github.com/apache/apisix/blob/9c899b87648039e2c6c73b087d627aea2df90f55/t/plugin/clickhouse-logger.t#L175)
--
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]