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

move envtest helpers into framework package for easier reuse #3428

Conversation

cheesesashimi
Copy link
Member

@cheesesashimi cheesesashimi commented Nov 22, 2022

- What I did

I moved the EnvTest setup and environment cleanup code into the test/framework package for easier reuse across the rest of the MCO codebase. Additionally, I refactored the Makefile as well as some of the test scripts to collect JUnit test reports in CI as well as a test coverage report.

- How to verify it

Because test/e2e-bootstrap is the only test suite that uses EnvTest, one can run $ make bootstrap-e2e or run the test target via /test bootstrap-unit. (For some unknown reason, we're not running bootstrap-unit on each PR, though it makes sense to because they're not overly resource intensive and execute quickly.)

For the JUnit and test coverage reports, open the links for the various Prow CI jobs and you should see them enumerated in the Test Results pane as well as a red / green graphic illustrating test coverage.

- Description for the changelog
Move EnvTest helpers into framework package for easier reuse

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 22, 2022
@cheesesashimi cheesesashimi force-pushed the zzlotnik/repackage-envtest-helpers branch from 40685ee to 7fb6532 Compare November 22, 2022 15:16
@cheesesashimi cheesesashimi force-pushed the zzlotnik/repackage-envtest-helpers branch from 7fb6532 to 36ca121 Compare November 22, 2022 15:20
@cheesesashimi cheesesashimi marked this pull request as draft November 28, 2022 15:02
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 28, 2022
@cheesesashimi
Copy link
Member Author

Converting to draft to conserve CI resources while I debug the bootstrap-unit stage.

@cheesesashimi cheesesashimi force-pushed the zzlotnik/repackage-envtest-helpers branch 4 times, most recently from 6ccee50 to 84f3736 Compare November 28, 2022 15:35
@cheesesashimi cheesesashimi force-pushed the zzlotnik/repackage-envtest-helpers branch from 7a46721 to afef4bc Compare November 28, 2022 16:37
@cheesesashimi cheesesashimi marked this pull request as ready for review November 28, 2022 16:46
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 28, 2022
@cheesesashimi
Copy link
Member Author

This is now ready for review!

@cheesesashimi cheesesashimi force-pushed the zzlotnik/repackage-envtest-helpers branch 8 times, most recently from a3105e9 to 1e2d387 Compare November 30, 2022 00:43
@cheesesashimi cheesesashimi force-pushed the zzlotnik/repackage-envtest-helpers branch 4 times, most recently from 037bc77 to 4cfbb8a Compare November 30, 2022 01:36
@cheesesashimi
Copy link
Member Author

/test bootstrap-unit

Copy link
Contributor

@yuqi-zhang yuqi-zhang left a comment

Choose a reason for hiding this comment

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

Generally lgtm! Tested locally as well just to make sure and all the tests seem to run as expected.

Will let others give a look as well before lgtm

Makefile Show resolved Hide resolved
hack/golangci-lint.sh Outdated Show resolved Hide resolved
hack/golangci-lint.sh Outdated Show resolved Hide resolved
- collect golangci-lint output as junit
- conditionally install required tools
@cheesesashimi cheesesashimi force-pushed the zzlotnik/repackage-envtest-helpers branch from 4cfbb8a to d37c3e9 Compare December 13, 2022 20:27
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 13, 2022

@cheesesashimi: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-alibabacloud d37c3e9 link false /test e2e-alibabacloud
ci/prow/e2e-hypershift d37c3e9 link false /test e2e-hypershift

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@yuqi-zhang
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Dec 16, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 16, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cheesesashimi, yuqi-zhang

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:
  • OWNERS [cheesesashimi,yuqi-zhang]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD 5b8bd66 and 2 for PR HEAD d37c3e9 in total

@openshift-merge-robot openshift-merge-robot merged commit fa07cac into openshift:master Dec 16, 2022
@cheesesashimi cheesesashimi deleted the zzlotnik/repackage-envtest-helpers branch March 21, 2024 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants