Skip to content

Commit 9a07bc1

Browse files
Totktonadaylobankov
authored andcommitted
test: don't fail if luatest is in system paths
`test_exec_when_luatest_not_found` fails if `luatest` is installed into `/usr/share/tarantool`. Zap `LUA_PATH` to ensure that `require('luatest')` reports the 'module not found' error.
1 parent fcabd2a commit 9a07bc1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/autorequire_luatest_test.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,15 @@ g.test_exec_with_upvalue_and_local_variable = function()
7575
end
7676

7777
g.before_test('test_exec_when_luatest_not_found', function()
78-
-- Setup custom server without LUA_PATH variable
78+
-- Setup custom server without luatest in LUA_PATH.
7979
g.bad_env_server = Server:new({
8080
command = command,
8181
workdir = fio.tempdir(),
8282
http_port = 8183,
8383
net_box_port = 3134,
84+
env = {
85+
LUA_PATH = '',
86+
},
8487
})
8588

8689
fio.mktree(g.bad_env_server.workdir)

0 commit comments

Comments
 (0)