Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix saving artifacts #318

Merged

Commits on Aug 28, 2023

  1. Fix saving artifacts

    > 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] tarantool#296
    
    Helped-by: Igor Munkin <[email protected]>
    
    Close tarantool#299
    Oleg Chaplashkin committed Aug 28, 2023
    Configuration menu
    Copy the full SHA
    a8c57c9 View commit details
    Browse the repository at this point in the history