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

✨ (go/v4) e2e tests: improve e2e tests and make test-e2e target #4106

Merged

Conversation

camilamacedo86
Copy link
Member

@camilamacedo86 camilamacedo86 commented Aug 26, 2024

  • Ensure that kind is installed and running before run the tests. Otherwise it will fail since we need to load the Manager(Operator) image
  • Add logic to skip the installation of CertManager and/or Prometheus via envvars.
  • Ensure that the promethues and certmanager are installed in the suite test instead of beafore each test
  • Ensure that the image is build and load in the suite instead instead for each test
  • Add more comments to clarify the purpose of the tests
  • Add TODO(user) to clarify that is expected action for the users to suplement and/or customize their e2e tests according to their needs

Closes: #4089
c/c @DerekTBrown, @majewsky @TAM360 @defo89

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Aug 26, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: camilamacedo86

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 26, 2024
@k8s-ci-robot k8s-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Aug 26, 2024
@camilamacedo86 camilamacedo86 changed the title WIP e2e tests: improve e2e tests and make test ✨ e2e tests: improve e2e tests and make test-e2e target Aug 26, 2024
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 26, 2024
@kind get clusters | grep -q 'kind' || { \
echo "No Kind cluster is running. Please start a Kind cluster before running the e2e tests."; \
exit 1; \
}
Copy link
Member Author

Choose a reason for hiding this comment

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

Hi @DerekTBrown, @majewsky

The changes on this PR should be enough to sort out the scenarios that you raised.
See that we need to have kind up and running for the e2e-tests
Therefore, if anyone run the integration tests without customize them against an env which is not using kind then the test will fail.

c/c @TAM360

Copy link
Contributor

Choose a reason for hiding this comment

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

@camilamacedo86 I think the documentation should also include the information about newly introduced environment variables, and the purpose behind them.

Copy link
Member Author

@camilamacedo86 camilamacedo86 Aug 27, 2024

Choose a reason for hiding this comment

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

It is documented in the makefile target (see this file)
Also, in the e2e tests scaffolds golang docs.
So, I am not sure what/where more would like to see this info doc.

Please, note that by default the tests will now fails when someone runs in the scenarios where it is executed a cluster that is not kind. So, it will be very unlike someone be able to run make test-e2e against an env without be forced to know what test-e2e does and check its scaffold

Copy link
Contributor

Choose a reason for hiding this comment

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

@camilamacedo86 wouldn't it be better idea to include it in the docs as well?

Copy link
Member Author

Choose a reason for hiding this comment

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

@camilamacedo86 wouldn't it be better idea to include it in the docs as well?

It is not the goal of this PR
but we can add that under reference in a follow up.
I am totally OK with. Could you please raise an issue to track the need?

Copy link
Contributor

Choose a reason for hiding this comment

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

@camilamacedo86 I'll create a new issue, once this PR merges.

@camilamacedo86 camilamacedo86 force-pushed the e2e-test-refine branch 2 times, most recently from 6d6e66e to ed4e17c Compare August 26, 2024 21:32
@camilamacedo86 camilamacedo86 changed the title ✨ e2e tests: improve e2e tests and make test-e2e target ✨ (go/v4) e2e tests: improve e2e tests and make test-e2e target Aug 26, 2024
@k8s-ci-robot
Copy link
Contributor

@Adembc: changing LGTM is restricted to collaborators

In response to this:

/lgtm

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-sigs/prow repository.

- Ensure that kind is installed and running before run the tests. Otherwise it will fail since we need to load the Manager(Operator) image
- Add logic to skip the installation of CertManager and/or Prometheus via envvars.
- Ensure that the promethues and certmanager are installed in the suite test instead of beafore each test
- Ensure that the image is build and load in the suite instead instead for each test
- Add more comments to clarify the purpose of the tests
- Add TODO(user) to clarify that is expected action for the users to suplement and/or customize their e2e tests according to their needs
@camilamacedo86
Copy link
Member Author

Moving forward since we have the LGTM from who asked for it and it was discussed in the slack
Also, because the changes here block we try to fix the e2e tests for deploy image sample

We either can push new changes and further improvements in follow ups.

@camilamacedo86 camilamacedo86 added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 29, 2024
@camilamacedo86 camilamacedo86 merged commit fa8b88f into kubernetes-sigs:master Aug 29, 2024
15 of 19 checks passed
@camilamacedo86 camilamacedo86 deleted the e2e-test-refine branch August 29, 2024 07:26
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enhance E2E Test Scaffold with Optional Prometheus and Cert-Manager Installation
3 participants