-
Notifications
You must be signed in to change notification settings - Fork 253
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
Restructure e2e Tests to Improve Organization #979
Restructure e2e Tests to Improve Organization #979
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.
Why is this needed?
* Better organization as far as helping contributors know where to look for/contribute e2e tests with pull requests
* Make sure tests for one subcommand don't depend on other tests (e.g. currently the task start command relies on helper functions in the pipeline e2e test).
* Help to set up e2e testing standards to help with the process of building out our e2e test suite and make maintaining these tests easier in the future
I do agree 👏
My thought is that each subcommand of the cli should have its own package and that test files can follow the naming pattern
subcommand_actioncommand_e2e_test.go
(e.g.task_start_e2e_test.go
). All e2e tests related totkn task start
can then live under that file.
So, I don't think we need to add e2
in the name, it's already part of the package path.
@@ -12,7 +13,7 @@ | |||
// See the License for the specific language governing permissions and | |||
// limitations under the License. | |||
|
|||
package e2e | |||
package e2epipeline |
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.
Why not naming the package pipeline
(under e2e
) ?
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.
Sure, my original thought was to avoid any confusion with other pipeline package, but I agree and changed it.
@@ -12,27 +13,34 @@ | |||
// See the License for the specific language governing permissions and | |||
// limitations under the License. | |||
|
|||
package e2e | |||
package e2etask |
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.
Same here, task
Appears to fail linting for build tests without |
|
Unfortunately, I keep running into build errors with build tests/integration tests when not using
Adding them back for now. |
@vdemeester Addressed |
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.
/lgtm
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.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: pradeepitm12 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 |
This pull request moves
e2e
tests out of thee2e
package and into separate packages based on the subcommand being tested.Why is this needed?
My thought is that each subcommand of the cli should have its own package and that test files can follow the naming pattern
subcommand_actioncommand_e2e_test.go
(e.g.task_start_e2e_test.go
). All e2e tests related totkn task start
can then live under that file.I will be continuing to make future modifications to the e2e suite this release as this pull request doesn't fully address organization issues around our tests, but I think this is a good first step.
Submitter Checklist
make check
make generated
Release Notes