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

Organize test structure, integrate go modules #145

Merged
merged 12 commits into from Dec 12, 2018

Conversation

aacanakin
Copy link
Member

No description provided.

@aacanakin aacanakin self-assigned this Dec 11, 2018
@aacanakin
Copy link
Member Author

Refactor postgres, sqlite and mysql e2e tests as well

Copy link
Contributor

@cdevienne cdevienne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't recommend using testify/suite.
Instead I suggest using subtests: https://golang.org/pkg/testing/#T.Run.
They provide the same advantages (setup/teardown, variables shared by a suite...) but don't require any additional tool, nor strange command line to run a single test.
As long as we don't have to support go < 1.7 I think we should use subtests.

go.mod Outdated Show resolved Hide resolved
@aacanakin
Copy link
Member Author

Hi @cdevienne,

I see your point about using subtests. However, the current status of tests are horrible. They are really flaky. The reason I refactored the tests is because I'm planning a complete redesign. The new design will include your visitor implementation that is split into interfaces, table integration of visitor, package structure done correctly, and go idioms implemented correctly.

So, these tests are here for regressions that may appear on the new design.
Right now, testify's test suite & setup functions are enough for the project's needs. Setup function is called for each test case. I'll create an issue to evaluate & move to subtests.
I'll provide a release tag after this pr. This pr has no breaking change except glide. In your library, you can use the release tag.

@cdevienne
Copy link
Contributor

The refactoring was long-needed, so it's definitely a good thing.
I am ok with postponing the switch to subtests

@aacanakin aacanakin merged commit 06be149 into slicebit:master Dec 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants