-
Notifications
You must be signed in to change notification settings - Fork 30
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
chore: Refactor pkg/testutils package #2173
chore: Refactor pkg/testutils package #2173
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it looks good to me, but I am uncertain about the left follow-ups. #2174 is about specific helpers for that test, fair enough.
But what do we do with the rest remaining in pkg/testutils
? If closing the origin ticket here, I think we still need to lay out a plan for how to continue with that. At least, we should put it to another location, e.g. tests/commontestutils
fair point. Personally I think that solving #2174 will tell us more about desired structures of packages for all the tests, not just this one. I chose
These two observations come mostly from the fact that current package structure results in the huge, unstructured "bags" of test code and this violates some well established software engineering practices: Like "Law of Demeter", "information hiding", "high cohesion" just to name the few. Bottom line: I think the splitting |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, sounds like a good proposal to me. It is just be important to me that we can include explicitly in the PoC ticket that this should also include a proposal on the way forward with the pkg/testutils
package.
New changes are detected. LGTM label has been removed. |
I've updated the #2174 . Now it's quite a big PoC :) |
Description
Splitting the
pkg/testutils
package: first stepsI focused to move the test functions "closer" to the tests that make use of them.
I tried to not modify any code - it's just moving of files and necessary package imports changes.
Now instead of one big package that is imported by many different tests, we have three packages: the top one
pkg/testutils
and two "local" ones:tests/e2e/commontestutils
andtests/integration/commontestutils
.Note for reviewer: There's much more we can do there. However I still think the #1085 issue is not specific enough - considering how low it was estimated.
I'd vote for closing it, and proceed with smaller, more focused tasks: #2174
Changes proposed in this pull request:
tests/e2e/commontestutils
tests/integration/commontestutils
Related issue(s)
See also: #1085