You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Makefile
+66-24Lines changed: 66 additions & 24 deletions
Original file line number
Diff line number
Diff line change
@@ -277,6 +277,26 @@ $(KCP):
277
277
run-kcp: $(KCP)
278
278
$(KCP_CMD) start --bind-address=127.0.0.1
279
279
280
+
.PHONY: run-kcp-infra
281
+
run-kcp-infra: $(KCP)$(DEX)## Run KCP infrastructure for e2e tests (blocking)
282
+
mkdir -p .kcp
283
+
$(MAKE) run-dex 2>&1& DEX_PID=$$!;\
284
+
$(MAKE) run-kcp &>.kcp/kcp.log & KCP_PID=$$!;\
285
+
trap'kill -TERM $$DEX_PID $$KCP_PID; rm -rf .kcp' TERM INT EXIT &&\
286
+
echo"Waiting for kcp to be ready (check .kcp/kcp.log)."&&while! KUBECONFIG=.kcp/admin.kubeconfig kubectl get --raw /readyz &>/dev/null;do sleep 1;echo -n ".";done&&echo&&\
287
+
echo"KCP is ready. Press Ctrl+C to stop."&&\
288
+
wait$$KCP_PID
289
+
290
+
.PHONY: test-e2e-only
291
+
ifdefUSE_GOTESTSUM
292
+
test-e2e-only: $(GOTESTSUM)
293
+
endif
294
+
test-e2e-only: TEST_ARGS ?=
295
+
test-e2e-only: WORK_DIR ?= .
296
+
test-e2e-only: WHAT ?= ./test/e2e...
297
+
test-e2e-only: build ## Run e2e tests against existing KCP infrastructure
trap'kill -TERM $$KCP_PID; rm -rf .kcp' TERM INT EXIT &&\
291
311
echo"Waiting for kcp to be ready (check .kcp/kcp.log)."&&while! KUBECONFIG=.kcp/admin.kubeconfig kubectl get --raw /readyz &>/dev/null;do sleep 1;echo -n ".";done&&echo&&\
@@ -298,7 +318,11 @@ test-e2e-contribs: $(CONTRIBS_E2E) ## Run e2e tests for external integrations
298
318
299
319
test-e2e-contrib-kcp: $(DEX)$(KCP)
300
320
$(CONTRIBS_E2E):
301
-
cd contrib/$(patsubst test-e2e-contrib-%,%,$@)&&$(GO_TEST) -race -count $(COUNT)$(E2E_PARALLELISM_FLAG) ./test/e2e/...
321
+
mkdir .kcp
322
+
$(MAKE) run-kcp &>.kcp/kcp.log & KCP_PID=$$!;\
323
+
trap'kill -TERM $$KCP_PID; rm -rf .kcp' TERM INT EXIT &&\
324
+
echo"Waiting for kcp to be ready (check .kcp/kcp.log)."&&while! KUBECONFIG=.kcp/admin.kubeconfig kubectl get --raw /readyz &>/dev/null;do sleep 1;echo -n ".";done&&echo&&\
325
+
cd contrib/$(patsubst test-e2e-contrib-%,%,$@)&& KUBECONFIG=$$PWD/../../.kcp/admin.kubeconfig $(GO_TEST) -race -count $(COUNT)$(E2E_PARALLELISM_FLAG) ./test/e2e/...
0 commit comments