You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> What's the problem?
When creating the logic for saving artifacts [1] a global variable has
been created as `current_test` in the `runner.lua` module. Luatest has
collected all the tests and runs a simple loop. At the beginning of
each iteration the current test is written to the `current_test'.
Server saved the value of the current test. However at some point the
current test in the global variable and in the server object were
different (the server stored information about the previous test). Also
server does not store information about which test it was used in.
> What is the solution?
Redesign the logic of working with artifacts: now each test knows which
server is linked to it, and each server knows about the test.
For example:
foo = Server:new()
foo:start()
-- only `foo` artifacts
g.test_with_foo = function()
foo:exec(...)
end
-- no server artifacts
g.test_without_servers = function()
...
end
[1] #296
Helped-by: Igor Munkin <[email protected]>
Close#299
0 commit comments