Skip to content

Commit ddb6435

Browse files
committed
fix covdata complaint, fix envtest
1 parent e0aa6d9 commit ddb6435

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ REGISTRY ?= docker.io/linode
55
IMAGE_NAME ?= cluster-api-provider-linode
66
CONTROLLER_IMAGE ?= $(REGISTRY)/$(IMAGE_NAME)
77
TAG ?= dev
8-
ENVTEST_K8S_VERSION := $(shell go list -m -f '{{.Version}}' k8s.io/client-go)
8+
ENVTEST_K8S_VERSION ?= $(shell go list -m -f "{{ .Version }}" k8s.io/api | awk -F'[v.]' '{printf "1.%d", $$3}')
99
VERSION ?= $(shell git describe --always --tag --dirty=-dev)
1010
BUILD_ARGS := --build-arg VERSION=$(VERSION)
1111
SHELL = /usr/bin/env bash -o pipefail
@@ -154,7 +154,8 @@ docs:
154154

155155
.PHONY: test
156156
test: generate fmt vet ## Run tests.
157-
KUBEBUILDER_ASSETS="$(shell setup-envtest use 0.20.4 --bin-dir $(CACHE_BIN) -p path)" go test -race -timeout 60s `go list ./... | grep -v ./mock$$` -coverprofile cover.out.tmp
157+
go env -w GOTOOLCHAIN=go1.25.0+auto
158+
KUBEBUILDER_ASSETS="$(shell setup-envtest use $(ENVTEST_K8S_VERSION) --bin-dir $(CACHE_BIN) -p path)" go test -race -timeout 60s `go list ./... | grep -v ./mock$$` -coverprofile cover.out.tmp
158159
grep -v "zz_generated.*" cover.out.tmp > cover.out
159160
rm cover.out.tmp
160161

0 commit comments

Comments
 (0)