@@ -165,12 +165,13 @@ test-unit: $(SETUP_ENVTEST) #HELP Run the unit tests
165
165
$(UNIT_TEST_DIRS ) \
166
166
-test.gocoverdir=$(ROOT_DIR ) /coverage/unit
167
167
168
- image-registry : # # Setup in-cluster image registry
169
- ./hack/test/image-registry.sh $(E2E_REGISTRY_NAMESPACE ) $(E2E_REGISTRY_NAME )
170
-
171
- build-push-e2e-catalog : # # Build the testdata catalog used for e2e tests and push it to the image registry
172
- ./hack/test/build-push-e2e-catalog.sh $(E2E_REGISTRY_NAMESPACE ) $(LOCAL_REGISTRY_HOST ) /$(E2E_TEST_CATALOG_V1 )
173
- ./hack/test/build-push-e2e-catalog.sh $(E2E_REGISTRY_NAMESPACE ) $(LOCAL_REGISTRY_HOST ) /$(E2E_TEST_CATALOG_V2 )
168
+ E2E_REGISTRY_IMAGE =localhost/e2e-test-registry:devel
169
+ image-registry : # # Build the testdata catalog used for e2e tests and push it to the image registry
170
+ go build -o ./testdata/registry/bin/registry ./testdata/registry/registry.go
171
+ go build -o ./testdata/push/bin/push ./testdata/push/push.go
172
+ $(CONTAINER_RUNTIME ) build -f ./testdata/Dockerfile -t $(E2E_REGISTRY_IMAGE ) ./testdata
173
+ $(CONTAINER_RUNTIME ) save $(E2E_REGISTRY_IMAGE ) | $(KIND ) load image-archive /dev/stdin --name $(KIND_CLUSTER_NAME )
174
+ ./testdata/build-test-registry.sh $(E2E_REGISTRY_NAMESPACE ) $(E2E_REGISTRY_NAME ) $(E2E_REGISTRY_IMAGE )
174
175
175
176
# When running the e2e suite, you can set the ARTIFACT_PATH variable to the absolute path
176
177
# of the directory for the operator-controller e2e tests to store the artifacts, which
@@ -181,7 +182,7 @@ build-push-e2e-catalog: ## Build the testdata catalog used for e2e tests and pus
181
182
test-e2e : KIND_CLUSTER_NAME := operator-controller-e2e
182
183
test-e2e : KUSTOMIZE_BUILD_DIR := config/overlays/e2e
183
184
test-e2e : GO_BUILD_FLAGS := -cover
184
- test-e2e : run image-registry build-push-e2e-catalog registry-load-bundles e2e e2e-coverage kind-clean # HELP Run e2e test suite on local kind cluster
185
+ test-e2e : run image-registry e2e e2e-coverage kind-clean # HELP Run e2e test suite on local kind cluster
185
186
186
187
.PHONY : extension-developer-e2e
187
188
extension-developer-e2e : KUSTOMIZE_BUILD_DIR := config/overlays/cert-manager
@@ -205,7 +206,7 @@ post-upgrade-checks:
205
206
test-upgrade-e2e : KIND_CLUSTER_NAME := operator-controller-upgrade-e2e
206
207
test-upgrade-e2e : export TEST_CLUSTER_CATALOG_NAME := test-catalog
207
208
test-upgrade-e2e : export TEST_CLUSTER_EXTENSION_NAME := test-package
208
- test-upgrade-e2e : kind-cluster run-latest-release image-registry build-push-e2e-catalog registry-load-bundles pre-upgrade-setup docker-build kind-load kind-deploy post-upgrade-checks kind-clean # HELP Run upgrade e2e tests on a local kind cluster
209
+ test-upgrade-e2e : kind-cluster run-latest-release image-registry pre-upgrade-setup docker-build kind-load kind-deploy post-upgrade-checks kind-clean # HELP Run upgrade e2e tests on a local kind cluster
209
210
210
211
.PHONY : e2e-coverage
211
212
e2e-coverage :
@@ -231,12 +232,6 @@ kind-cluster: $(KIND) #EXHELP Standup a kind cluster.
231
232
kind-clean : $(KIND ) # EXHELP Delete the kind cluster.
232
233
$(KIND ) delete cluster --name $(KIND_CLUSTER_NAME )
233
234
234
- registry-load-bundles : # # Load selected e2e testdata container images created in kind-load-bundles into registry
235
- testdata/bundles/registry-v1/build-push-e2e-bundle.sh ${E2E_REGISTRY_NAMESPACE} $(LOCAL_REGISTRY_HOST ) /bundles/registry-v1/prometheus-operator:v1.0.0 prometheus-operator.v1.0.0 prometheus-operator.v1.0.0
236
- testdata/bundles/registry-v1/build-push-e2e-bundle.sh ${E2E_REGISTRY_NAMESPACE} $(LOCAL_REGISTRY_HOST ) /bundles/registry-v1/prometheus-operator:v1.0.1 prometheus-operator.v1.0.1 prometheus-operator.v1.0.0
237
- testdata/bundles/registry-v1/build-push-e2e-bundle.sh ${E2E_REGISTRY_NAMESPACE} $(LOCAL_REGISTRY_HOST ) /bundles/registry-v1/prometheus-operator:v1.2.0 prometheus-operator.v1.2.0 prometheus-operator.v1.0.0
238
- testdata/bundles/registry-v1/build-push-e2e-bundle.sh ${E2E_REGISTRY_NAMESPACE} $(LOCAL_REGISTRY_HOST ) /bundles/registry-v1/prometheus-operator:v2.0.0 prometheus-operator.v2.0.0 prometheus-operator.v1.0.0
239
-
240
235
# SECTION Build
241
236
242
237
ifeq ($(origin VERSION ) , undefined)
0 commit comments