Skip to content

Commit 0f38bc9

Browse files
committed
fix
1 parent a937a2e commit 0f38bc9

File tree

4 files changed

+12
-10
lines changed

4 files changed

+12
-10
lines changed

.github/workflows/maas-bff-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838

3939
- name: Install envtest assets
4040
working-directory: packages/maas/bff
41-
run: ./bin/setup-envtest-release-0.17 use 1.29.0 --bin-dir ./bin
41+
run: ./bin/setup-envtest-release-0.19 use 1.29.3 --bin-dir ./bin
4242

4343
- name: Test (BFF API)
4444
working-directory: packages/maas/bff

packages/maas/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ GOLANGCI_LINT ?= $(LOCALBIN)/golangci-lint-$(GOLANGCI_LINT_VERSION)
4040

4141
## Tool Versions
4242
GOLANGCI_LINT_VERSION ?= v2.0.2
43-
ENVTEST_VERSION ?= release-0.17
44-
ENVTEST_K8S_VERSION ?= 1.29.0
43+
ENVTEST_VERSION ?= release-0.19
44+
ENVTEST_K8S_VERSION ?= 1.29.3
4545

4646
.PHONY: envtest
4747
envtest: $(ENVTEST) ## Download setup-envtest locally if necessary.
@@ -78,7 +78,7 @@ test: fmt vet envtest
7878
cd bff && \
7979
ABS_BIN_DIR="$$(pwd)/../bin" && \
8080
ASSETS_PATH="$$( $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir "$$ABS_BIN_DIR" -p path )" && \
81-
ENVTEST_ASSETS_DIR="$$(dirname "$$(dirname "$$ASSETS_PATH")")" \
81+
ENVTEST_ASSETS="$$ASSETS_PATH" \
8282
go test ./internal/api -v
8383

8484
############ Dev Environment ############

packages/maas/bff/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ INSECURE_SKIP_VERIFY ?= false
1111
#frontend static assets root directory
1212
STATIC_ASSETS_DIR ?= ./static
1313
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
14-
ENVTEST_K8S_VERSION = 1.29.0
14+
ENVTEST_K8S_VERSION = 1.29.3
1515
LOG_LEVEL ?= info
1616
ALLOWED_ORIGINS ?= ""
1717
DEBUG ?= false
@@ -76,7 +76,7 @@ GOLANGCI_LINT ?= $(LOCALBIN)/golangci-lint-$(GOLANGCI_LINT_VERSION)
7676

7777
## Tool Versions
7878
GOLANGCI_LINT_VERSION ?= v2.0.2
79-
ENVTEST_VERSION ?= release-0.17
79+
ENVTEST_VERSION ?= release-0.19
8080

8181
.PHONY: envtest
8282
envtest: $(ENVTEST) ## Download setup-envtest locally if necessary.

packages/maas/bff/internal/integrations/kubernetes/k8mocks/base_testenv.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,13 @@ func SetupEnvTest(input TestEnvInput) (*envtest.Environment, kubernetes.Interfac
5858
var binaryAssetsDir string
5959
var projectRoot, err = getProjectRoot()
6060

61-
// Check for explicit envtest assets directory (used in Docker)
62-
if envDir := os.Getenv("ENVTEST_ASSETS_DIR"); envDir != "" {
61+
// Prefer ENVTEST_ASSETS (set by make test); fallback to ENVTEST_ASSETS_DIR or project root.
62+
if envtestAssets := os.Getenv("ENVTEST_ASSETS"); envtestAssets != "" {
63+
binaryAssetsDir = envtestAssets
64+
} else if envDir := os.Getenv("ENVTEST_ASSETS_DIR"); envDir != "" {
6365
// Construct full path with OS/ARCH suffix
6466
binaryAssetsDir = filepath.Join(envDir, "k8s",
65-
fmt.Sprintf("1.29.0-%s-%s", runtime.GOOS, runtime.GOARCH))
67+
fmt.Sprintf("1.29.3-%s-%s", runtime.GOOS, runtime.GOARCH))
6668
} else {
6769
// Fall back to project root detection (local development)
6870
projectRoot, err := getProjectRoot()
@@ -72,7 +74,7 @@ func SetupEnvTest(input TestEnvInput) (*envtest.Environment, kubernetes.Interfac
7274
os.Exit(1)
7375
}
7476
binaryAssetsDir = filepath.Join(projectRoot, "bin", "k8s",
75-
fmt.Sprintf("1.29.0-%s-%s", runtime.GOOS, runtime.GOARCH))
77+
fmt.Sprintf("1.29.3-%s-%s", runtime.GOOS, runtime.GOARCH))
7678
}
7779

7880
testEnv := &envtest.Environment{

0 commit comments

Comments
 (0)