-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Refactor common util functions for /test #7369
Conversation
5f14d78
to
3314561
Compare
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Yongxuanzhang The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Prior to this commit, the uitl functions for e2e tests are distributed over multiple test files in /test. And we had to tag specific test files for unrelevant test suites that needs such util functions. For example, init_test has the 'conformance' build tag on it, which is not necessarily the case as conformance test suite does not need the inti_test but needs the setup there. This commit cleans up the util functions separated across different test files and put them into /test/util so that we can tag the appropriate test files for build only.
3314561
to
ce9b053
Compare
@@ -0,0 +1,319 @@ | |||
//go:build conformance || e2e || examples |
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.
Do we really need the tag here?
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.
Yep they are used for build tags for e2e/conformance/examples test. If we delete them, they'd all encounter build failure.
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.
And the reason for this refactor is to let all new integration test suite with new tag not to rely on the "e2e" tag where previously those init and setup lived in.
/lgtm |
Changes
Prior to this commit, the uitl functions for e2e tests are distributed over multiple test files in /test. And we had to tag specific test files for unrelevant test suites that needs such util functions. For example, init_test has the 'conformance' build tag on it, which is not necessarily the case as conformance test suite does not need the inti_test but needs the setup there.
This commit cleans up the util functions separated across different test files and put them into /test/util so that we can tag the appropriate test files for build only.
/kind cleanup
Submitter Checklist
As the author of this PR, please check off the items in this checklist:
/kind <type>
. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tepRelease Notes