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

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

leslie-tsang commented on code in PR #9506:
URL: https://github.com/apache/apisix/pull/9506#discussion_r1198568714


##########
t/plugin/udp-logger.t:
##########
@@ -441,41 +432,9 @@ GET /t
 passed
 
 
+=== TEST 12: log format in plugin_metadata

Review Comment:
   Ditto



##########
t/plugin/udp-logger.t:
##########
@@ -355,45 +362,11 @@ GET /t
 passed
 
 
-
-=== TEST 10: access
---- stream_conf_enable
---- extra_stream_config
-    server {
-        listen 8125 udp;
-        content_by_lua_block {
-            local decode = require("toolkit.json").decode
-            ngx.log(ngx.WARN, "the mock backend is hit")
-
-            local sock, err = ngx.req.socket()
-            if not sock then
-                ngx.log(ngx.ERR, "failed to get the request socket: ", err)
-                return
-            end
-
-            local data, err = sock:receive()
-
-            if not data then
-                if err and err ~= "no more data" then
-                    ngx.log(ngx.ERR, "socket error, returning: ", err)
-                end
-                return
-            end
-
-            data = decode(data)
-            assert(data.client_ip == "127.0.0.1")
-        }
-    }
---- request
-GET /hello
---- response_body
-hello world
---- wait: 2
---- error_log
-the mock backend is hit
---- no_error_log
-[error]
-
+=== TEST 10: log format in plugin_metadata

Review Comment:
   3 blank line in need to make linter happy. :)



-- 
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