tzssangglass commented on a change in pull request #5501:
URL: https://github.com/apache/apisix/pull/5501#discussion_r749971103
##########
File path: t/plugin/kafka-logger.t
##########
@@ -1114,3 +1114,82 @@ GET /t
--- error_log_like eval
qr/create new kafka producer instance, brokers:
\[\{"port":9092,"host":"127.0.0.127"}]/
qr/failed to send data to Kafka topic: .*, brokers: \{"127.0.0.127":9092}/
+
+
+
+=== TEST 26: set route(id: 1,include_req_body = true,include_req_body_expr =
array)
+--- 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,
+ [[{
Review comment:
```suggestion
[=[{
```
##########
File path: t/plugin/kafka-logger.t
##########
@@ -1114,3 +1114,82 @@ GET /t
--- error_log_like eval
qr/create new kafka producer instance, brokers:
\[\{"port":9092,"host":"127.0.0.127"}]/
qr/failed to send data to Kafka topic: .*, brokers: \{"127.0.0.127":9092}/
+
+
+
+=== TEST 26: set route(id: 1,include_req_body = true,include_req_body_expr =
array)
+--- 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,
+ [[{
+ "plugins": {
+ "kafka-logger": {
+ "broker_list" :
+ {
+ "127.0.0.1":9092
+ },
+ "kafka_topic" : "test2",
+ "key" : "key1",
+ "timeout" : 1,
+ "include_req_body": true,
+ "include_req_body_expr": [
+ [
+ "arg_name",
+ "==",
+ "qwerty"
+ ]
+ ],
+ "batch_max_size": 1
+ }
+ },
+ "upstream": {
+ "nodes": {
+ "127.0.0.1:1980": 1
+ },
+ "type": "roundrobin"
+ },
+ "uri": "/hello"
+ }]]
Review comment:
```suggestion
}]=]
```
--
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]