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

Extract common test helpers to own files #336

Merged
merged 2 commits into from
Oct 22, 2021
Merged

Extract common test helpers to own files #336

merged 2 commits into from
Oct 22, 2021

Conversation

miry
Copy link
Contributor

@miry miry commented Oct 22, 2021

Proxy test file is overused of multiple logics.
Make it a bit cleaner, moved WithTCPServer to testhelper.
Tried to move WithTCPProxy, but current structure does not allow it.
If move it under package testhelper, it introduces import packages loop.
For now extract it to separate helper: toxiproxy_test.go.

First steps to remove dependencies to package Tomb.

In future it would nice to move business logic code under folder pkg.

@miry miry self-assigned this Oct 22, 2021
@miry miry added the Toxiproxy label Oct 22, 2021
Proxy test file is overused of multiple logics.
Make it a bit cleaner, moved `WithTCPServer` to testhelper.
Tried to move `WithTCPProxy`, but current structure does not allow it.
If move it under package testhelper, it introduces import packages loop.
For now extract it to separate helper: `toxiproxy_test.go`.

In future it would nice to move business logic code under folder `pkg`.
@miry miry force-pushed the test-restructure branch from 1533de3 to c9920ac Compare October 22, 2021 13:46
Copy link
Contributor

@Strech Strech left a comment

Choose a reason for hiding this comment

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

🥽

@miry miry merged commit 5a3ea8a into master Oct 22, 2021
@miry miry deleted the test-restructure branch October 22, 2021 14:19
@miry miry mentioned this pull request Oct 22, 2021
9 tasks
@miry miry added this to the 2.3.0 milestone Nov 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants