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

SDK provides a test-framework library to let operators run e2e tests #387

Closed
hasbro17 opened this issue Aug 7, 2018 · 2 comments
Closed
Labels
area/testing Issue related to testing the operator-sdk and subcomponents design

Comments

@hasbro17
Copy link
Contributor

hasbro17 commented Aug 7, 2018

E2e tests are the most common way to test the reconciliation logic of an operator.
e.g: etcd-operator e2e, prometheus-operator e2e.
Currently users have to write their own e2e frameworks from scratch to test their SDK based operators.

The SDK can provide a test-framework library that would abstract out the common functionality needed by all e2e tests e.g setup/teardown (namespace, rbac, operator deployment) along with any other necessary testing utilities.
The SDK could also provide a standard way to run a users e2e tests e.g
operator-sdk test <path-to-e2e-tests> --kubeconfig=<kubeconfig>

Since the goal is to make it easier to write and run e2e tests for SDK based operators we'll need to determine how much value would such a test-framework actually provide.
This can be determined by considering:

  • how much duplication and work can the test-framework abstractions actually reduce vs providing thin wrappers around existing utilities
  • how simple is the workflow of using the test-framework vs writing your own framework from scratch and running go test ...

#377 provides a starting point for what such a framework could look like. We'll use that to iterate on the workflow and abstractions of the test-framework library.

@hasbro17 hasbro17 added area/testing Issue related to testing the operator-sdk and subcomponents design labels Aug 7, 2018
@AlexNPavel
Copy link
Contributor

AlexNPavel commented Aug 9, 2018

Initial framework was implemented and merged with #377. Further work that will be added as separate PRs:

@hasbro17
Copy link
Contributor Author

Closing this. We have the follow up work for packaging the e2e tests with the operator outlined in #435

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/testing Issue related to testing the operator-sdk and subcomponents design
Projects
None yet
Development

No branches or pull requests

2 participants