From debcfc6f895fd04e1d3b6961d72d210ecae9772f Mon Sep 17 00:00:00 2001 From: Wen Zhou Date: Fri, 22 Mar 2024 13:51:13 +0100 Subject: [PATCH 1/3] fix(test): pin version not latest which just introduced to use go 1.22 Signed-off-by: Wen Zhou --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 94ffedc20c9..b2879deed3a 100644 --- a/Makefile +++ b/Makefile @@ -350,7 +350,7 @@ TEST_SRC=./controllers/... ./tests/integration/... ./pkg/... .PHONY: envtest envtest: $(ENVTEST) ## Download envtest-setup locally if necessary. $(ENVTEST): $(LOCALBIN) - test -s $(LOCALBIN)/setup-envtest || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest + test -s $(LOCALBIN)/setup-envtest || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@v0.0.0-20240320141353-395cfc7486e6 .PHONY: test test: unit-test e2e-test From 0866675172c69a71f3fd418eeeb8fd7b6b7e7dcf Mon Sep 17 00:00:00 2001 From: Wen Zhou Date: Fri, 22 Mar 2024 14:01:18 +0100 Subject: [PATCH 2/3] update: code review Signed-off-by: Wen Zhou --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b2879deed3a..ceb8880c184 100644 --- a/Makefile +++ b/Makefile @@ -71,6 +71,7 @@ GOLANGCI_LINT_VERSION ?= v1.54.0 YQ_VERSION ?= v4.12.2 # ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary. ENVTEST_K8S_VERSION = 1.24.2 +ENVTEST_PACKAGE_VERSION = v0.0.0-20240320141353-395cfc7486e6 CRD_REF_DOCS_VERSION = 0.0.11 # Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set) @@ -350,7 +351,7 @@ TEST_SRC=./controllers/... ./tests/integration/... ./pkg/... .PHONY: envtest envtest: $(ENVTEST) ## Download envtest-setup locally if necessary. $(ENVTEST): $(LOCALBIN) - test -s $(LOCALBIN)/setup-envtest || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@v0.0.0-20240320141353-395cfc7486e6 + test -s $(LOCALBIN)/setup-envtest || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@$(ENVTEST_PACKAGE_VERSION) .PHONY: test test: unit-test e2e-test From 20327f8b1f5158b1b5f223720ae50901c5abfba4 Mon Sep 17 00:00:00 2001 From: Wen Zhou Date: Fri, 22 Mar 2024 14:34:44 +0100 Subject: [PATCH 3/3] Update Makefile Co-authored-by: Bartosz Majsak --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ceb8880c184..4ac8f98b59f 100644 --- a/Makefile +++ b/Makefile @@ -351,7 +351,7 @@ TEST_SRC=./controllers/... ./tests/integration/... ./pkg/... .PHONY: envtest envtest: $(ENVTEST) ## Download envtest-setup locally if necessary. $(ENVTEST): $(LOCALBIN) - test -s $(LOCALBIN)/setup-envtest || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@$(ENVTEST_PACKAGE_VERSION) + test -s $(ENVTEST) || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@$(ENVTEST_PACKAGE_VERSION) .PHONY: test test: unit-test e2e-test