commit - 030aa1808a869baf3f15add22958941f1af43ef7
commit + 8cc0b19cdb1624086a3ee7c55b68c305778f4333
blob - 8b3763dd7c2b918fbd979d05fe9c71110207460d
blob + f2c5448c053594c7b323ee9687743bae676fcb11
--- test/app-luatest/gh_7479_bug_fix_uri_lib_test.lua
+++ test/app-luatest/gh_7479_bug_fix_uri_lib_test.lua
local t = require('luatest')
-local fio = require('fio')
-local popen = require('popen')
local net_box = require('net.box')
local server = require('luatest.server')
g.server:stop()
end)
--- Checks whether it is possible to specify only port for tarantoolctl connect.
-g.test_tarantoolctl_connect = function()
- -- Find tarantoolctl.
- -- Probably test-run knows the path to tarantoolctl.
- local TARANTOOLCTL_PATH = os.getenv('TARANTOOLCTL')
- if TARANTOOLCTL_PATH == nil then
- -- If test-run dose not know the path to tarantoolctl.
- -- Assume that current directory is tarantool's build directory.
- local BUILDDIR = os.getenv('BUILDDIR')
- TARANTOOLCTL_PATH = ('%s/extra/dist/tarantoolctl'):format(BUILDDIR)
- if not fio.path.exists(TARANTOOLCTL_PATH) then
- error("Can't find tarantoolctl")
- end
- end
-
- local cmd_tarantoolctl = {
- TARANTOOLCTL_PATH,
- 'connect',
- -- Indicate only port, without localhost:* before the port value.
- tostring(g.server_port),
- }
-
- -- Connection will be established in a separate process.
- local ph_tarantoolctl = popen.new(cmd_tarantoolctl, {
- stdin = 'devnull',
- stdout = 'devnull',
- stderr = popen.opts.PIPE,
- })
- -- Stderr should contain a message about successful connection.
- local result = ph_tarantoolctl:read({stderr = true}):rstrip()
- ph_tarantoolctl:close()
-
- t.assert_equals(
- result,
- 'connected to localhost:' .. tostring(g.server_port)
- )
-end
-
-- Checks whether it is possible to specify only port for net.box.connect.
g.test_net_box_connect_with_only_port_indication = function()
-- Indicate only port, without localhost:* before the port value.