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

Add a README.md with basic usage for running end-to-end tests #25

Merged
merged 1 commit into from
Jun 29, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Compliance Operator Functional Tests

This repository contains end-to-end tests that exercise the
compliance-operator in Kubernetes deployments.

These tests require that you have a cluster deploy and available. These tests
will change the configuration of your deployment since they scan and remediate
issues in the cluster. Please be aware of the cluster you're running these
tests against as the tests do not restore the cluster or undo remediations
executed as part of the test.

## Parameters

- `PROFILE`: The profile to test. This value must match an existing profile in
[ComplianceAsCode/content](https://github.com/ComplianceAsCode/content/),
typically ending in a `.profile` file extension (required).
- `PRODUCT`: The product to test (default: `rhcos4`).
- `CONTENT_IMAGE`: An image registry and image where the content is located
(default: `quay.io/complianceascode/ocp4:latest`)
- `ROOT_DIR`: File path of the
[ComplianceAsCode/content](https://github.com/ComplianceAsCode/content/). By
default, the tests will clone the repository into a `/tmp` directory.
Providing the file path to the content will reduce the time it takes by not
cloning the repository.
- `TEST_FLAGS`: Optional `go test` flags (default: `-v -timeout 120m`)
- `INSTALL_OPERATOR`: If true, the tests will attempt to install the
compliance-operator in the provided cluster (default: `true`).

## Usage

You can use a dedicate Makefile target for running the tests

```console
$ PROFILE=high make e2e
```