Revolyssup commented on code in PR #9506:
URL: https://github.com/apache/apisix/pull/9506#discussion_r1201680463
##########
t/plugin/udp-logger.t:
##########
@@ -431,8 +403,29 @@ the mock backend is hit
ngx.say(body)
return
end
-
+ local code, body = t('/apisix/admin/plugin_metadata/udp-logger',
+ ngx.HTTP_PUT,
+ [[{
+ "log_format": {
+ "host": "$host",
+ "case name": "logger format in plugin",
+ "@timestamp": "$time_iso8601",
+ "client_ip": "$remote_addr"
+ }
+ }]]
+ )
+ if code >= 300 then
+ ngx.status = code
+ ngx.say(body)
+ return
+ end
ngx.say(body)
+ local code, _, _ = t("/hello", "GET")
+ if code >= 300 then
+ ngx.status = code
+ ngx.say("fail")
+ return
+ end
Review Comment:
done
##########
t/plugin/udp-logger.t:
##########
@@ -347,6 +348,12 @@ GET /t
return
end
ngx.say(body)
+ local code, _, _ = t("/hello", "GET")
+ if code >= 300 then
+ ngx.status = code
+ ngx.say("fail")
+ return
+ end
Review Comment:
renamed the tests appropriately.
--
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]