Skip to content
Snippets Groups Projects
Commit 2ecabd56 authored by Alexander Turenko's avatar Alexander Turenko Committed by Alexander Turenko
Browse files

test: accept env in interactive_tarantool.new()

It is needed to fix a problem in the
`config-luatest/credentials_applier` test. See the next commit.

NO_DOC=It is a testing helper improvement.
NO_CHANGELOG=see NO_DOC
NO_TEST=see NO_DOC

(cherry picked from commit 130335e4)
parent 8f5242b8
No related branches found
No related tags found
No related merge requests found
...@@ -294,6 +294,7 @@ end ...@@ -294,6 +294,7 @@ end
function M._new_internal(opts) function M._new_internal(opts)
local opts = opts or {} local opts = opts or {}
local args = opts.args or {} local args = opts.args or {}
local env = opts.env or {}
local prompt = opts.prompt local prompt = opts.prompt
local tarantool_exe = arg[-1] local tarantool_exe = arg[-1]
...@@ -301,7 +302,7 @@ function M._new_internal(opts) ...@@ -301,7 +302,7 @@ function M._new_internal(opts)
stdin = popen.opts.PIPE, stdin = popen.opts.PIPE,
stdout = popen.opts.PIPE, stdout = popen.opts.PIPE,
stderr = popen.opts.PIPE, stderr = popen.opts.PIPE,
env = { env = fun.chain({
-- Don't know why, but without defined TERM environment -- Don't know why, but without defined TERM environment
-- variable readline doesn't accept INPUTRC environment -- variable readline doesn't accept INPUTRC environment
-- variable. -- variable.
...@@ -313,7 +314,7 @@ function M._new_internal(opts) ...@@ -313,7 +314,7 @@ function M._new_internal(opts)
-- (because the command in the echo output will be -- (because the command in the echo output will be
-- trimmed). -- trimmed).
INPUTRC = '/dev/null', INPUTRC = '/dev/null',
}, }, env):tomap(),
}) })
local res = setmetatable({ local res = setmetatable({
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment