From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp58.i.mail.ru (smtp58.i.mail.ru [217.69.128.38]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id AC83842F4C7 for ; Thu, 14 Nov 2019 01:24:50 +0300 (MSK) From: Vladislav Shpilevoy References: Message-ID: <67983fad-c959-75a5-ac6a-d17fde354539@tarantool.org> Date: Wed, 13 Nov 2019 23:31:01 +0100 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Tarantool-patches] [PATCH 1/1] iproto: show real port in logs and box.info.listen List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: tarantool-patches@dev.tarantool.org, kostja.osipov@gmail.com, alexander.turenko@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)