Skip to content
Snippets Groups Projects
Commit e0a4425c authored by Alexander Turenko's avatar Alexander Turenko Committed by Igor Munkin
Browse files

test: add a simple tarantool runner/output catcher

Sometimes it is necessary to run tarantool with particular arguments and
verify its output. `luatest.server` provides a supervisor like
interface: an instance is started, calls box.cfg() and we can
communicate with it using net.box. Another helper,
`test.interactive_tarantool`, aims to solve all the problems around
readline console and also provides ability to communicate with the
instance interactively.

However, there is nothing like 'just run tarantool with given args and
give me its output'.

This commit adds a helper for running tarantool executable with given
parameters (cwd, env, args), catch its output and parse the output as
JSON lines.

It is used in preload_test.lua and I want to use it in a future
overload_test.lua.

The code is just moved. The comment for the function is a bit expanded.

Part of #7774

NO_CHANGELOG=a testing helper is added
NO_DOC=see NO_CHANGELOG
parent 7a05fd52
No related branches found
No related tags found
No related merge requests found
Loading
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