@@ -123,8 +123,7 @@ test: manifests generate envtest test-api ## Run tests.
123123 @$(MAKE ) vet
124124 @$(MAKE ) fmt
125125 @echo " 🔍 Running controller tests..."
126- @KUBEBUILDER_ASSETS=" $( shell $( ENVTEST) use $( ENVTEST_K8S_VERSION) --bin-dir $( LOCALBIN) -p path) " \
127- go test $(shell go list ./... | grep -v /test/) -coverprofile cover.out > /dev/null 2>&1
126+ KUBEBUILDER_ASSETS=" $( shell $( ENVTEST) use $( ENVTEST_K8S_VERSION) --bin-dir $( LOCALBIN) -p path) " go test $(shell go list ./... | grep -v /test/) -coverprofile cover.out
128127 @echo " ✅ Tests completed successfully. Coverage report generated: cover.out."
129128
130129.PHONY : test-api
@@ -264,6 +263,8 @@ GOLANGCI_LINT_VERSION ?= v1.57.2
264263KIND_VERSION ?= v0.20.0
265264KNATIVE_VERSION ?= v1.13.2
266265TIMEOUT_SECS ?= 180s
266+ PROMETHEUS_VERSION ?= v0.70.0
267+ GRAFANA_VERSION ?= v5.13.0
267268
268269KNATIVE_SERVING_PREFIX ?= "https://github.com/knative/serving/releases/download/knative-$(KNATIVE_VERSION ) "
269270KNATIVE_EVENTING_PREFIX ?= "https://github.com/knative/eventing/releases/download/knative-$(KNATIVE_VERSION ) "
@@ -402,7 +403,7 @@ generate-all: generate generate-deploy bundle
402403 @$(MAKE ) fmt
403404
404405.PHONY : test-e2e # You will need to have a Minikube/Kind cluster up and running to run this target, and run container-builder before the test
405- label = "flows-ephemeral" # possible values are flows-ephemeral, flows-persistence, platform, cluster
406+ label = "flows-ephemeral" # possible values are flows-ephemeral, flows-persistence, flows-monitoring, platform, cluster
406407test-e2e:
407408ifeq ($(label ) , cluster)
408409 @echo "🌐 Running e2e tests for cluster..."
@@ -424,8 +425,13 @@ else ifeq ($(label), flows-persistence)
424425 go test ./test/e2e/e2e_suite_test.go ./test/e2e/helpers.go ./test/e2e/workflow_test.go \
425426 -v -ginkgo.v -ginkgo.no-color -ginkgo.github-output -ginkgo.label-filter=$(label) \
426427 -ginkgo.junit-report=./e2e-test-report-workflow_test.xml -timeout 60m KUSTOMIZE=$(KUSTOMIZE);
428+ else ifeq ($(label), flows-monitoring)
429+ @echo "🔁 Running e2e tests for flows-monitoring..."
430+ go test ./test/e2e/e2e_suite_test.go ./test/e2e/helpers.go ./test/e2e/workflow_test.go \
431+ -v -ginkgo.v -ginkgo.no-color -ginkgo.github-output -ginkgo.label-filter=$(label) \
432+ -ginkgo.junit-report=./e2e-test-report-workflow_test.xml -timeout 60m KUSTOMIZE=$(KUSTOMIZE);
427433else
428- @echo "❌ Invalid label. Please use one of: cluster, platform, flows-ephemeral, flows-persistence"
434+ @echo "❌ Invalid label. Please use one of: cluster, platform, flows-ephemeral, flows-persistence, flows-monitoring "
429435endif
430436
431437
@@ -450,6 +456,18 @@ deploy-knative:
450456 kubectl wait --for=condition=Ready=True KnativeServing/knative-serving -n knative-serving --timeout=$(TIMEOUT_SECS )
451457 kubectl wait --for=condition=Ready=True KnativeEventing/knative-eventing -n knative-eventing --timeout=$(TIMEOUT_SECS )
452458
459+ .PHONY : deploy-prometheus
460+ deploy-prometheus : create-cluster
461+ kubectl create -f https://github.com/prometheus-operator/prometheus-operator/releases/download/$(PROMETHEUS_VERSION ) /bundle.yaml
462+ kubectl wait --for=condition=Available=True deploy/prometheus-operator -n default --timeout=$(TIMEOUT_SECS )
463+ kubectl apply -f ./test/testdata/prometheus.yaml -n default
464+ kubectl wait --for=condition=Available=True prometheus/prometheus -n default --timeout=$(TIMEOUT_SECS )
465+
466+ .PHONY : deploy-grafana
467+ deploy-grafana : create-cluster
468+ kubectl create -f https://github.com/grafana/grafana-operator/releases/download/$(GRAFANA_VERSION ) /kustomize-cluster_scoped.yaml
469+ kubectl wait --for=condition=Available=True deploy/grafana-operator-controller-manager -n grafana --timeout=$(TIMEOUT_SECS )
470+
453471.PHONY : delete-cluster
454472delete-cluster : install-kind
455473 kind delete cluster && $(BUILDER ) rm -f kind-registry
0 commit comments