Skip to content

v2: ability to mock Connector.Do()/Future/Response in tests #237

Closed
@oleg-jukovec

Description

@oleg-jukovec

At now it is required to write integration tests with Tarantool to test the code written using go-tarantool. I saw this problem while writing tests for tt. I couldn't mock the workflow:

ret := some_code_to_test(mockConnectorObject) {
    // some code to test
    future := mockConnectorObject.Do(someRequest)
    mock_response, mock_err := future.Get()
    // more code to test
}
if ret != expected {
    t.Errorf("test failed")
}

It would be great to have that ability.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions