Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start the server without a pre-installed box.cfg configuration #309

Open
ochaplashkin opened this issue May 31, 2023 · 1 comment
Open

Comments

@ochaplashkin
Copy link

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.

@sergepetrenko
Copy link
Contributor

sergepetrenko commented Jun 1, 2023

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@9b2bee3

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants