Skip to content

Commit 19616fa

Browse files
committed
test: refactor hooks for luatest API change
Luatest now forbids direct hook assignment, so tests using `g.before_all = fn`, `g.after_all = fn`, etc. must be rewritten to the call-style API. This patch updates them accordingly. Follow-up tarantool/tarantool#8187 Follow-up luatest/luatest#390
1 parent aaba736 commit 19616fa

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/test-luatest/smoke_check_test.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@ local server = require('test.luatest_helpers.server')
44

55
local g = t.group()
66

7-
g.before_all = function()
7+
g.before_all(function()
88
g.server = server:new({
99
alias = 'my_server',
1010
env = {MY_ENV_VAR = 'test_value'},
1111
box_cfg = {memtx_memory = 100 * 1024 ^ 2},
1212
})
1313
g.server:start()
14-
end
14+
end)
1515

16-
g.after_all = function()
16+
g.after_all(function()
1717
g.server:stop()
18-
end
18+
end)
1919

2020
g.test_server_is_started_and_operable = function()
2121
local res = g.server:eval('return 42')

0 commit comments

Comments
 (0)