Skip to content
Snippets Groups Projects
Commit b5e59bd9 authored by Nikolay Shirokovskiy's avatar Nikolay Shirokovskiy Committed by Vladimir Davydov
Browse files

test: fix luatest server to work after chdir

Starting server is failed after chdir(3) for example if we call
box.cfg{} with work_dir set.

NO_DOC=fix testing harness
NO_TEST=fix testing harness
NO_CHANGELOG=fix testing harness
parent 42727489
No related branches found
Tags 1.7.1
No related merge requests found
......@@ -20,6 +20,8 @@ local Server = luatest.Server:inherit({})
local WAIT_TIMEOUT = 60
local WAIT_DELAY = 0.1
local SOURCE_DIR = fio.abspath(os.getenv('SOURCEDIR') or '.')
local DEFAULT_COMMAND = fio.pathjoin(SOURCE_DIR, 'test/instances/default.lua')
-- Differences from luatest.Server:
--
......@@ -52,7 +54,7 @@ function Server:initialize()
self.id = digest.base64_encode(random, {urlsafe = true})
end
if self.command == nil then
self.command = 'test/instances/default.lua'
self.command = DEFAULT_COMMAND
end
if self.workdir == nil then
self.workdir = ('%s/%s-%s'):format(self.vardir, self.alias, self.id)
......
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