Start the server without a pre-installed `box.cfg` configuration
When we start the server as follows:
local s = Server:new()
s:start()
The instance is already configured with some parameters:
local function default_cfg()
return {
work_dir = os.getenv('TARANTOOL_WORKDIR'),
listen = os.getenv('TARANTOOL_LISTEN'),
log = fio.pathjoin(
os.getenv('TARANTOOL_WORKDIR'),
os.getenv('TARANTOOL_ALIAS') .. '.log'
),
}
end
This can be inconvenient if you need to test the startup process.
The ability to test an unconfigured node is getting more important since we are moving towards disallowing box.cfg calls on the default test runner (tarantool/tarantool#8709).
For example, some of the replication tests need an unconfigured instance to check failing box.cfg{} calls for non-dynamic options:
https://github.com/tarantool/tarantool/blob/606e50c4d56bb76714dc41339102b32230fd751e/test/replication-luatest/linearizable_test.lua#L295-L298
or
https://github.com/tarantool/tarantool/blob/606e50c4d56bb76714dc41339102b32230fd751e/test/replication-luatest/bootstrap_strategy_test.lua#L443-L448
Currently it's really hard to rework such tests by reusing existing server instance. Just look at commit tarantool/tarantool@9b2bee3447fc6a1f1a47a7f5a00c99e8f0bdb145
Another example where we rely on an unconfigured instance (testing what box.ctl.promote() call produces on an unconfigured box):
https://github.com/tarantool/tarantool/blob/606e50c4d56bb76714dc41339102b32230fd751e/test/replication-luatest/gh_6033_box_promote_demote_test.lua#L121-L130