This runs a series of tests against the Kubernetes API to verify that OLM is functioning properly.
- Helm > 2.7.0
Execute make e2e-local
in the root of the repository, which will:
- optionally update
test/e2e/assets/chart/zz_chart.go
as needed - build local executables used during testing
bin/e2e-local.test
bin/wait
bin/cpb
bin/catalog
bin/olm
bin/package-server
- build docker file
e2e.Dockerfile
which includes the local executables in akind
image archivetest/e2e-local.image.tar
- execute
ginkgo
to run the pre-compiled test packagebin/e2e-local.test
with thekind
image archive. This runs BDD tests defined intest/e2e
- these tests are run in a kind cluster that is started fresh each time the test is executed
Examples:
-
Run all BDD tests (this takes a long time)
make e2e-local
-
Run a specific BDD test using the
TEST
argument to make. Note that this argument uses regular expressions.make e2e-local TEST='API service resource not migrated if not adoptable'
-
If you have previously created the
bin/e2e-local.test
executable and want a quick way to ensure that your TEST regex argument will work, you can bypass the make file and use-dryRun
with-focus
and see if the regex would trigger your specific test(s).GO111MODULE=on go run github.com/onsi/ginkgo/v2/ginkgo -dryRun -focus 'API service resource not migrated if not adoptable' bin/e2e-local.test
-
It is also possible to specify the number of parallel test nodes (i.e. one or more instances of
go test
) to run using theNODES
argument. Defaults to 1 if not specifiedmake e2e-local NODES=2
Note that the make file target e2e-local
is executed by the github workflow .github/workflows/e2e-tests.yml
and uses two parallel go test
processes.