-
Notifications
You must be signed in to change notification settings - Fork 23
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
Implement an OCI image for osde2e testing #318
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rhmdnd 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 |
config, err = rest.InClusterConfig() | ||
Expect(err).NotTo(HaveOccurred(), "unable to load in cluster config") | ||
|
||
// Install the Compliance Operator and wait for it to become available. |
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.
Installing Add-Ons should be done here, right?
This technically runs before both tests, which probably isn't necessary since we're not cleaning up the operator after each spec.
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.
You don't need to implement addon installation, osde2e will do that. you will need to provide "ADDON_IDS" environment variable to the osde2e executable. Refer to this section to try it locally (same as the one I commented above) https://github.com/openshift/osde2e-example-test-harness#locally-running-your-test-harness
@@ -413,6 +414,14 @@ images: image bundle-image ## Build operator and bundle images. | |||
.PHONY: images-extra | |||
images-extra: openscap-image e2e-content-images ## Build the openscap and test content images. | |||
|
|||
.PHONY: build-osde2e-test-binary | |||
build-osde2e-test-binary: | |||
$(GO) test ./tests/e2e/rosa -c -v -o rosa.test |
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.
This should build the test binary. At this point we can build the container image and give it a shot in a ROSA environment using the osde2e tools.
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.
Great! The doc you linked here is the basic execution of osde2e but this sop will be additionally helpful since it's specific for locally running test harness https://github.com/openshift/osde2e-example-test-harness#locally-running-your-test-harness
I added the workflow here: |
To test the Compliance Operator on different platforms, like Red Hat OpenShift on AWS (ROSA), we can use the openshift/osde2e framework. To do this, we need to write tests in a specific format, and build them into a container image that can be invoke on a managed platform. This commit introduces a rough idea of what that could look like.
@rhmdnd: The following tests failed, say
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-sigs/prow repository. I understand the commands that are listed here. |
We were able to accomplish e2e testing without this approach. We can close this for the time being and rely on the |
To test the Compliance Operator on different platforms, like Red Hat
OpenShift on AWS (ROSA), we can use the openshift/osde2e framework.
To do this, we need to write tests in a specific format, and build them
into a container image that can be invoke on a managed platform.
This commit introduces a rough idea of what that could look like.