From 224232bd441dc755e515847fbba1fefadb135f6e Mon Sep 17 00:00:00 2001 From: Jimmi Dyson Date: Thu, 25 Apr 2024 12:15:41 +0100 Subject: [PATCH] build: Add envtest setup to e2e envrc This enables running envtest based Ginkgo tests more easily in your terminal or in vscode if you have the direnv plugin installed. --- Makefile | 4 +++- make/dev.mk | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d74793887..d4a63305e 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,8 @@ REPO_ROOT := $(CURDIR) # Versions for tools that are not managed by devbox. -ENVTEST_VERSION=1.29.x +# The `!` suffix forces checking the remote API server +# for the latest patch version of the specified minor. +ENVTEST_VERSION=1.29.x! include make/all.mk diff --git a/make/dev.mk b/make/dev.mk index ef92df74e..2146e3eb6 100644 --- a/make/dev.mk +++ b/make/dev.mk @@ -50,4 +50,5 @@ endif .PHONY: .envrc.e2e .envrc.e2e: gojq --yaml-input --raw-output '.variables | to_entries | map("export \(.key)=\(.value|tostring)")|.[]' < test/e2e/config/caren.yaml | envsubst > .envrc.e2e + setup-envtest use -p env $(ENVTEST_VERSION) >> .envrc.e2e direnv reload