Baoyuantop commented on code in PR #12267:
URL: https://github.com/apache/apisix/pull/12267#discussion_r2234962251


##########
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:
   Hi @xuruidong, please have a look.



-- 
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-unsubscr...@apisix.apache.org

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

Reply via email to