Skip to content

Commit a8e20c3

Browse files
committed
feat(ci): add separate make targets for scale-to-zero e2e tests
- Add test-e2e-scale-to-zero target for Kind cluster tests - Add test-e2e-openshift-scale-to-zero target for OpenShift tests - Tests are isolated from other e2e tests via Ginkgo focus pattern - Scale-to-zero tests create their own resources and clean up after Usage: make test-e2e-scale-to-zero # Kind cluster make test-e2e-openshift-scale-to-zero # OpenShift cluster
1 parent affb2e0 commit a8e20c3

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

Makefile

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,19 @@ test-e2e: manifests generate fmt vet ## Run the e2e tests. Expected an isolated
153153
$(eval SKIP_ARGS := $(if $(SKIP),-ginkgo.skip="$(SKIP)",))
154154
export COLLECTOR_V2=1 KUBECONFIG=$(KUBECONFIG) K8S_EXPECTED_VERSION=$(K8S_VERSION) && go test ./test/e2e-saturation-based/ -timeout 30m -v -ginkgo.v $(FOCUS_ARGS) $(SKIP_ARGS)
155155

156+
# E2E tests for scale-to-zero feature on Kind cluster
157+
# Requires HPAScaleToZero feature gate (enabled by default in deploy/kind-emulator/setup.sh)
158+
# These tests create isolated resources and do not interfere with other tests
159+
.PHONY: test-e2e-scale-to-zero
160+
test-e2e-scale-to-zero: manifests generate fmt vet ## Run scale-to-zero e2e tests on Kind cluster.
161+
@command -v $(KIND) >/dev/null 2>&1 || { \
162+
echo "Kind is not installed. Please install Kind manually."; \
163+
exit 1; \
164+
}
165+
@echo "Running scale-to-zero e2e tests (requires HPAScaleToZero feature gate)..."
166+
export COLLECTOR_V2=1 KUBECONFIG=$(KUBECONFIG) K8S_EXPECTED_VERSION=$(K8S_VERSION) && \
167+
go test ./test/e2e-saturation-based/ -timeout 30m -v -ginkgo.v -ginkgo.focus="Scale-to-Zero"
168+
156169
# E2E tests on OpenShift cluster
157170
# Supports KUBECONFIG or in-cluster authentication (for self-hosted runners).
158171
.PHONY: test-e2e-openshift
@@ -171,6 +184,20 @@ test-e2e-openshift: ## Run the e2e tests on OpenShift. Supports KUBECONFIG or in
171184
NUM_PROMPTS=$(NUM_PROMPTS) \
172185
go test ./test/e2e-openshift/ -timeout 30m -v -ginkgo.v $(FOCUS_ARGS) $(SKIP_ARGS)
173186

187+
# E2E tests for scale-to-zero feature on OpenShift cluster
188+
# Requires HPAScaleToZero feature gate enabled by cluster admin (see docs/integrations/hpa-integration.md)
189+
# Tests will skip automatically if feature gate is not enabled
190+
.PHONY: test-e2e-openshift-scale-to-zero
191+
test-e2e-openshift-scale-to-zero: ## Run scale-to-zero e2e tests on OpenShift.
192+
@echo "Running scale-to-zero e2e tests on OpenShift (will skip if HPAScaleToZero feature gate not enabled)..."
193+
CONTROLLER_NAMESPACE=$(CONTROLLER_NAMESPACE) \
194+
MONITORING_NAMESPACE=$(MONITORING_NAMESPACE) \
195+
LLMD_NAMESPACE=$(LLMD_NAMESPACE) \
196+
GATEWAY_NAME=$(GATEWAY_NAME) \
197+
MODEL_ID=$(MODEL_ID) \
198+
DEPLOYMENT=$(DEPLOYMENT) \
199+
go test ./test/e2e-openshift/ -timeout 30m -v -ginkgo.v -ginkgo.focus="Scale-to-Zero"
200+
174201
.PHONY: lint
175202
lint: golangci-lint ## Run golangci-lint linter
176203
$(GOLANGCI_LINT) run

0 commit comments

Comments
 (0)