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

Implement an OCI image for osde2e testing #318

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rhmdnd
Copy link

@rhmdnd rhmdnd commented May 10, 2023

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.

@openshift-ci openshift-ci bot requested review from jhrozek and xiaojiey May 10, 2023 20:54
@openshift-ci
Copy link

openshift-ci bot commented May 10, 2023

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

tests/e2e/rosa/Dockerfile Outdated Show resolved Hide resolved
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.
Copy link
Author

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.

Copy link

@ritmun ritmun May 10, 2023

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
Copy link
Author

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.

https://github.com/openshift/osde2e/tree/main#tests

Copy link

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

@Vincent056
Copy link

I added the workflow here:
#322

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.
Copy link

openshift-ci bot commented May 10, 2024

@rhmdnd: 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-aws-parallel ba9428a link true /test e2e-aws-parallel
ci/prow/e2e-aws-serial ba9428a link true /test e2e-aws-serial
ci/prow/e2e-rosa ba9428a link true /test e2e-rosa

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants