Skip to content

Commit

Permalink
test: don't fail if luatest is in system paths
Browse files Browse the repository at this point in the history
`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.
  • Loading branch information
Totktonada authored and ylobankov committed Jun 17, 2024
1 parent fcabd2a commit 9a07bc1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/autorequire_luatest_test.lua
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,15 @@ g.test_exec_with_upvalue_and_local_variable = function()
end

g.before_test('test_exec_when_luatest_not_found', function()
-- Setup custom server without LUA_PATH variable
-- Setup custom server without luatest in LUA_PATH.
g.bad_env_server = Server:new({
command = command,
workdir = fio.tempdir(),
http_port = 8183,
net_box_port = 3134,
env = {
LUA_PATH = '',
},
})

fio.mktree(g.bad_env_server.workdir)
Expand Down

0 comments on commit 9a07bc1

Please sign in to comment.