Skip to content

Commit 6465e63

Browse files
authored
🌱 Add experimental e2e tests (#2064)
* Add experimental e2e tests This adds `manifests/experimental-e2e.yaml`, and uses it to run the experimental-e2e. The experimental-e2e is run via `make test-experimental-e2e` and a CI job is added to run it. A "no-op" experimental-e2e test has been added. This is part of the feature-gated API functionality. Signed-off-by: Todd Short <[email protected]> * fixup! Add experimental e2e tests Signed-off-by: Todd Short <[email protected]> * fixup! Add experimental e2e tests Signed-off-by: Todd Short <[email protected]> --------- Signed-off-by: Todd Short <[email protected]>
1 parent f050355 commit 6465e63

File tree

6 files changed

+2075
-2
lines changed

6 files changed

+2075
-2
lines changed

.github/workflows/e2e.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,33 @@ jobs:
4848
flags: e2e
4949
token: ${{ secrets.CODECOV_TOKEN }}
5050

51+
experimental-e2e:
52+
runs-on: ubuntu-latest
53+
steps:
54+
- uses: actions/checkout@v4
55+
with:
56+
fetch-depth: 0
57+
58+
- uses: actions/setup-go@v5
59+
with:
60+
go-version-file: go.mod
61+
62+
- name: Run e2e tests
63+
run: ARTIFACT_PATH=/tmp/artifacts make test-experimental-e2e
64+
65+
- uses: actions/upload-artifact@v4
66+
if: failure()
67+
with:
68+
name: experimental-e2e-artifacts
69+
path: /tmp/artifacts/
70+
71+
- uses: codecov/[email protected]
72+
with:
73+
disable_search: true
74+
files: coverage/e2e.out
75+
flags: experimental-e2e
76+
token: ${{ secrets.CODECOV_TOKEN }}
77+
5178
upgrade-e2e:
5279
runs-on: ubuntu-latest
5380
steps:

Makefile

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ endif
7474
KUSTOMIZE_STANDARD_OVERLAY := config/overlays/standard
7575
KUSTOMIZE_STANDARD_E2E_OVERLAY := config/overlays/standard-e2e
7676
KUSTOMIZE_EXPERIMENTAL_OVERLAY := config/overlays/experimental
77+
KUSTOMIZE_EXPERIMENTAL_E2E_OVERLAY := config/overlays/experimental-e2e
7778

7879
export RELEASE_MANIFEST := operator-controller.yaml
7980
export RELEASE_INSTALL := install.sh
@@ -84,6 +85,7 @@ MANIFEST_HOME := ./manifests
8485
STANDARD_MANIFEST := ./manifests/standard.yaml
8586
STANDARD_E2E_MANIFEST := ./manifests/standard-e2e.yaml
8687
EXPERIMENTAL_MANIFEST := ./manifests/experimental.yaml
88+
EXPERIMENTAL_E2E_MANIFEST := ./manifests/experimental-e2e.yaml
8789
CATALOGS_MANIFEST := ./manifests/default-catalogs.yaml
8890

8991
# Manifest used by kind-deploy, which may be overridden by other targets
@@ -110,7 +112,7 @@ SOURCE_MANIFEST := $(STANDARD_MANIFEST)
110112

111113
.PHONY: help
112114
help: #HELP Display essential help.
113-
@awk 'BEGIN {FS = ":[^#]*#HELP"; printf "\nUsage:\n make \033[36m<target>\033[0m\n\n"} /^[a-zA-Z_0-9-]+:.*#HELP / { printf " \033[36m%-17s\033[0m %s\n", $$1, $$2 } ' $(MAKEFILE_LIST)
115+
@awk 'BEGIN {FS = ":[^#]*#HELP"; printf "\nUsage:\n make \033[36m<target>\033[0m\n\n"} /^[a-zA-Z_0-9-]+:.*#HELP / { printf " \033[36m%-21s\033[0m %s\n", $$1, $$2 } ' $(MAKEFILE_LIST)
114116

115117
.PHONY: help-extended
116118
help-extended: #HELP Display extended help.
@@ -157,6 +159,7 @@ manifests: $(CONTROLLER_GEN) $(KUSTOMIZE) #EXHELP Generate WebhookConfiguration,
157159
$(KUSTOMIZE) build $(KUSTOMIZE_STANDARD_OVERLAY) > $(STANDARD_MANIFEST)
158160
$(KUSTOMIZE) build $(KUSTOMIZE_STANDARD_E2E_OVERLAY) > $(STANDARD_E2E_MANIFEST)
159161
$(KUSTOMIZE) build $(KUSTOMIZE_EXPERIMENTAL_OVERLAY) > $(EXPERIMENTAL_MANIFEST)
162+
$(KUSTOMIZE) build $(KUSTOMIZE_EXPERIMENTAL_E2E_OVERLAY) > $(EXPERIMENTAL_E2E_MANIFEST)
160163

161164
.PHONY: generate
162165
generate: $(CONTROLLER_GEN) #EXHELP Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
@@ -206,6 +209,10 @@ test: manifests generate fmt lint test-unit test-e2e #HELP Run all tests.
206209
e2e: #EXHELP Run the e2e tests.
207210
go test -count=1 -v ./test/e2e/...
208211

212+
.PHONY: experimental-e2e
213+
experimental-e2e: #EXHELP Run the experimental e2e tests.
214+
go test -count=1 -v ./test/experimental-e2e/...
215+
209216
E2E_REGISTRY_NAME := docker-registry
210217
E2E_REGISTRY_NAMESPACE := operator-controller-e2e
211218

@@ -261,6 +268,12 @@ test-e2e: KIND_CLUSTER_NAME := operator-controller-e2e
261268
test-e2e: GO_BUILD_EXTRA_FLAGS := -cover
262269
test-e2e: run image-registry prometheus e2e e2e-metrics e2e-coverage kind-clean #HELP Run e2e test suite on local kind cluster
263270

271+
.PHONY: test-experimental-e2e
272+
test-experimental-e2e: SOURCE_MANIFEST := $(EXPERIMENTAL_E2E_MANIFEST)
273+
test-experimental-e2e: KIND_CLUSTER_NAME := operator-controller-e2e
274+
test-experimental-e2e: GO_BUILD_EXTRA_FLAGS := -cover
275+
test-experimental-e2e: run image-registry prometheus experimental-e2e e2e-metrics e2e-coverage kind-clean #HELP Run experimental e2e test suite on local kind cluster
276+
264277
.PHONY: prometheus
265278
prometheus: PROMETHEUS_NAMESPACE := olmv1-system
266279
prometheus: PROMETHEUS_VERSION := v0.83.0

codecov.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
codecov:
22
notify:
3-
after_n_builds: 2
3+
after_n_builds: 3
44

55
# Configure the paths to include in coverage reports.
66
# Exclude documentation, YAML configurations, and test files.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# kustomization file for all the experimental e2e's
2+
# DO NOT ADD A NAMESPACE HERE
3+
apiVersion: kustomize.config.k8s.io/v1beta1
4+
kind: Kustomization
5+
components:
6+
- ../../components/base/experimental
7+
- ../../components/e2e
8+
# This must be last due to namespace overwrite issues of the ca
9+
- ../../components/cert-manager

0 commit comments

Comments
 (0)