вот такой простой код для теста:
```
local t = require('luatest')
local g = t.group()
local server = t.Server:new({
command = 'init.lua',
env = {
TARANTOOL_WORKDIR = '/opt/tarantool/app'
},
workdir = '/opt/tarantool/app',
net_box_port = 3301,
})
g.before_all(function()
server:start()
t.helpers.retrying({}, function()
server:connect_net_box()
end)
end)
```
Но тест все время падает с ошибкой:
tnt_1 | Started on Thu Jul 1 09:24:24 2021
tnt_1 | example.test_example_1 ... (0.007s) error
tnt_1 | /opt/tarantool/.rocks/share/tarantool/luatest/server.lua:157: Address not available
tnt_1 | =========================================================
tnt_1 |
tnt_1 | Tests with errors:
tnt_1 | ------------------
tnt_1 |
tnt_1 | 1) example.test_example_1
tnt_1 | /opt/tarantool/.rocks/share/tarantool/luatest/server.lua:157: Address not available
tnt_1 | stack traceback:
tnt_1 | /opt/tarantool/.rocks/share/tarantool/luatest/server.lua:157: in function 'connect_net_box'
tnt_1 | /opt/tarantool/app/test/example_test.lua:17: in function 'retrying'
tnt_1 | /opt/tarantool/app/test/example_test.lua:16: in function 'fn'
tnt_1 | /opt/tarantool/.rocks/share/tarantool/luatest/hooks.lua:16: in function 'example.run_before_all_hooks'
tnt_1 | /opt/tarantool/.rocks/share/tarantool/luatest/runner.lua:339: in function </opt/tarantool/.rocks/share/tarantool/luatest/runner.lua:338>
tnt_1 | [C]: in function 'xpcall'
tnt_1 | /opt/tarantool/.rocks/share/tarantool/luatest/runner.lua:338: in function 'super'
tnt_1 | /opt/tarantool/.rocks/share/tarantool/luatest/capturing.lua:106: in function 'protected_call'
tnt_1 | /opt/tarantool/.rocks/share/tarantool/luatest/hooks.lua:42: in function 'run_group_hooks'
tnt_1 | ...
tnt_1 | [C]: in function 'xpcall'
tnt_1 | /opt/tarantool/.rocks/share/tarantool/luatest/utils.lua:37: in function 'run_tests'
tnt_1 | /opt/tarantool/.rocks/share/tarantool/luatest/runner.lua:257: in function </opt/tarantool/.rocks/share/tarantool/luatest/runner.lua:253>
tnt_1 | [C]: in function 'xpcall'
tnt_1 | /opt/tarantool/.rocks/share/tarantool/luatest/capturing.lua:74: in function </opt/tarantool/.rocks/share/tarantool/luatest/capturing.lua:72>
tnt_1 | [C]: in function 'xpcall'
tnt_1 | /opt/tarantool/.rocks/share/tarantool/luatest/runner.lua:49: in function 'fn'
tnt_1 | ...tool/.rocks/share/tarantool/luatest/sandboxed_runner.lua:14: in function 'run'
tnt_1 | ...antool/.rocks/share/tarantool/luatest/cli_entrypoint.lua:4: in function <...antool/.rocks/share/tarantool/luatest/cli_entrypoint.lua:3>
tnt_1 | ...l/.rocks/share/tarantool/rocks/luatest/scm-1/bin/luatest:3: in main chunk
tnt_1 |
tnt_1 | Captured stderr:
tnt_1 | execve failed (init.lua): Permission denied
tnt_1 |
tnt_1 |
tnt_1 | Ran 1 tests in 5.031 seconds, 0 successes, 1 error
Основная ошибка execve failed (init.lua): Permission denied
Есть у кого-то идеи, что не так делаю ?
init.lua сделать executable
Спасибо! 🤝
Обсуждают сегодня