Tarantool development patches archive
 help / color / mirror / Atom feed
From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
To: tarantool-patches@dev.tarantool.org, kostja.osipov@gmail.com,
	alexander.turenko@tarantool.org
Subject: Re: [Tarantool-patches] [PATCH 1/1] iproto: show real port in logs and box.info.listen
Date: Wed, 13 Nov 2019 23:31:01 +0100	[thread overview]
Message-ID: <67983fad-c959-75a5-ac6a-d17fde354539@tarantool.org> (raw)
In-Reply-To: <c29d15e81d7df21df6bfa3f04bf58bcb987eee5f.1573596082.git.v.shpilevoy@tarantool.org>

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)

  parent reply	other threads:[~2019-11-13 22:24 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-12 22:03 Vladislav Shpilevoy
2019-11-13  0:32 ` Vladislav Shpilevoy
2019-11-13 22:31 ` Vladislav Shpilevoy [this message]
2020-02-21 19:51 ` Sergey Ostanevich
2020-02-22  8:34   ` Sergey Ostanevich
2020-02-22 14:47     ` Vladislav Shpilevoy
2020-02-22 15:00   ` Vladislav Shpilevoy
2020-03-03 13:26     ` Sergey Ostanevich
2020-02-22 15:00 ` Vladislav Shpilevoy
2020-03-18 18:18 ` Serge Petrenko
2020-03-18 22:38   ` Vladislav Shpilevoy
2020-03-19 10:24     ` Serge Petrenko
2020-03-19 10:45 ` Kirill Yukhin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=67983fad-c959-75a5-ac6a-d17fde354539@tarantool.org \
    --to=v.shpilevoy@tarantool.org \
    --cc=alexander.turenko@tarantool.org \
    --cc=kostja.osipov@gmail.com \
    --cc=tarantool-patches@dev.tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH 1/1] iproto: show real port in logs and box.info.listen' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox