You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "jiangfucheng (via GitHub)" <gi...@apache.org> on 2023/05/18 14:25:14 UTC

[GitHub] [apisix] jiangfucheng commented on a diff in pull request #9506: fix: replace mock tests with real tests in udp-logger

jiangfucheng commented on code in PR #9506:
URL: https://github.com/apache/apisix/pull/9506#discussion_r1197878983


##########
ci/pod/vector/vector.toml:
##########
@@ -46,7 +53,7 @@ address = "0.0.0.0:5150"
 mode = "udp"
 
 [sinks.log-2-console]
-inputs = [ "log-from-tcp",  "log-from-tls", "log-from-syslog-tcp", "log-from-syslog-udp" ]
+inputs = [ "log-from-tcp",  "log-from-tls", "log-from-syslog-tcp", "log-from-syslog-udp" ,"log-from-udp"]

Review Comment:
   ```suggestion
   inputs = [ "log-from-tcp",  "log-from-tls", "log-from-syslog-tcp", "log-from-syslog-udp", "log-from-udp"]
   ```



##########
t/plugin/udp-logger.t:
##########
@@ -267,7 +267,7 @@ passedopentracing
 qr/sending a batch logs to 127.0.0.1:(\d+)/
 --- grep_error_log_out
 sending a batch logs to 127.0.0.1:2000
-sending a batch logs to 127.0.0.1:2001
+sending a batch logs to 127.0.0.1:2002

Review Comment:
   Maybe we also need replace these ports to real log server port?



##########
t/plugin/udp-logger.t:
##########
@@ -410,10 +383,9 @@ the mock backend is hit
                                 "port": 8125,
                                 "tls": false,
                                 "log_format": {
+                                    "case name": "logger format in plugin",
                                     "vip": "$remote_addr"
-                                },
-                                "batch_max_size": 1,

Review Comment:
   We should not remove the `batch_max_size` field



##########
t/plugin/udp-logger.t:
##########
@@ -310,7 +310,7 @@ GET /t
                             "udp-logger": {
                                 "host": "127.0.0.1",
                                 "port": 8125,
-                                "tls": false,
+                                "tls": false

Review Comment:
   ```suggestion
                                   "tls": false,
   ```
   



-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org