[Tarantool-patches] [PATCH 1/1] iproto: show real port in logs and box.info.listen
Vladislav Shpilevoy
v.shpilevoy at tarantool.org
Thu Nov 14 01:31:01 MSK 2019
Added a test. Now, please, do a review. Especially
Alexander - AFAIU you need this feature.
====================================================================
diff --git a/test/box-tap/cfg.test.lua b/test/box-tap/cfg.test.lua
index d529447bb..569b5f463 100755
--- a/test/box-tap/cfg.test.lua
+++ b/test/box-tap/cfg.test.lua
@@ -6,7 +6,7 @@ local socket = require('socket')
local fio = require('fio')
local uuid = require('uuid')
local msgpack = require('msgpack')
-test:plan(104)
+test:plan(108)
--------------------------------------------------------------------------------
-- Invalid values
@@ -592,6 +592,18 @@ box.cfg{read_only=true}
]]
test:is(run_script(code), PANIC, "panic on bootstrapping a read-only instance as master")
+--
+-- gh-4620: box.info.listen.
+--
+box.cfg{listen = box.NULL}
+test:is(nil, box.info.listen, 'no cfg.listen - no info.listen')
+
+box.cfg{listen = '127.0.0.1:0'}
+test:ok(box.info.listen:match('127.0.0.1'), 'real IP in info.listen')
+test:ok(not box.info.listen:match(':0'), 'real port in info.listen')
+
+box.cfg{listen = box.NULL}
+test:is(nil, box.info.listen, 'cfg.listen reset drops info.listen')
test:check()
os.exit(0)
More information about the Tarantool-patches
mailing list