Skip to content
Snippets Groups Projects
Unverified Commit 3e4dea42 authored by Alexander Turenko's avatar Alexander Turenko
Browse files

test: tarantoolctl: verify delayed box.cfg()

app-tap.tarantoolctl.test.lua fails after
17df9edf ('tarantoolctl: allow to start
instances with delayed box.cfg{}').

The commit fixes the test case that did check that an error is reported
if box.cfg() was not called in an instance script.

Follows up #4435.
Fixes #4448.

(cherry picked from commit 6c627af3)
parent d66ca2c1
No related branches found
No related tags found
No related merge requests found
......@@ -179,13 +179,18 @@ test:plan(8)
do
local dir = fio.tempdir()
create_script(dir, 'script.lua', [[ box.cfg{memtx_memory = 104857600} ]])
create_script(dir, 'no_box_cfg.lua', [[ print('Hi!') ]])
create_script(dir, 'delayed_box_cfg.lua', [[
local fiber = require('fiber')
fiber.create(function()
fiber.sleep(1)
box.cfg{}
end)
]])
local status, err = pcall(function()
test:test("basic test", function(test_i)
test_i:plan(18)
check_ok(test_i, dir, 'start', 'no_box_cfg', 1, nil, "Starting instance",
"box.cfg() is not called in an instance file")
check_ok(test_i, dir, 'start', 'delayed_box_cfg', 0, nil, "Starting instance")
check_ok(test_i, dir, 'start', 'script', 0, nil, "Starting instance")
tctl_wait_start(dir, 'script')
check_ok(test_i, dir, 'status', 'script', 0, nil, "is running")
......
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