Version v1.10 of the documentation is no longer actively maintained. The site that you are currently viewing is an archived snapshot. For up-to-date documentation, see the latest version.
On all PRs, a suite of static and cluster tests is run against your changes in a CI environment. These tests can also be run locally, which is discussed below.
Static tests consist of unit, formatting, and doc link tests.
Cluster tests consist of several test types:
- End-to-end (e2e): simulate the “happy path” usage of the
operator-sdkbinary and resulting operator project.
- Integration: test components of the
operator-sdkbinary and features of scaffolded projects that are bound to external projects, such as OLM.
- Subcommand: ensure individual subcommands function as intended with a variety of input options.
Before submitting a PR
Always run tests before submitting a PR to reduce the number of needless CI errors.
Local Test Environment
If running tests locally, access to a Kubernetes cluster of a compatible version is required.
These tests require
KUBECONFIG be set or kubeconfig file be present in a default location like
You will also need to set up an
envtest environment for cluster tests. Follow this doc
for setup instructions.
A local kind cluster is used for running tests.
All the tests are run through the
make help for a full list of available tests.