xuruidong commented on code in PR #12267:
URL: https://github.com/apache/apisix/pull/12267#discussion_r2238167125
##########
t/core/utils.t:
##########
@@ -393,3 +393,43 @@ res:nil
res:5
res:12
res:7
+
+
+
+=== TEST 13: gethostname
+--- config
+ location /t {
+ content_by_lua_block {
+ local core = require("apisix.core")
+ local hostname = core.utils.gethostname()
+ ngx.say("hostname: ", hostname)
+ local hostname2 = core.utils.gethostname()
+ ngx.say("hostname cached: ", hostname == hostname2)
+ ngx.say("hostname valid: ", hostname ~= "" and (hostname ~=
"unknown" or true))
Review Comment:
@Baoyuantop ,please review this. Thank you.
--
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]