Skip to content

Commit 4406d59

Browse files
committed
chore: set KUBECONFIG environment for local integration tests
Signed-off-by: Kim Christensen <[email protected]>
1 parent ea80b0d commit 4406d59

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

magefile.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,12 @@ func TestLocalIntegration() {
198198

199199
ctx, _ := kubectl("config", "current-context").OutputV()
200200
testLocalIntegration()
201-
must.RunV("go", "test", "-v", "-tags=integration", "./tests/integration/local/...")
201+
202+
// Set KUBECONFIG environment for the Go tests
203+
kubeconfig := fmt.Sprintf("KUBECONFIG=%s", os.Getenv("KUBECONFIG"))
204+
must.Command("go", "test", "-v", "-tags=integration", "./tests/integration/local/...").
205+
Env(kubeconfig).RunV()
206+
202207
if ctx != "" {
203208
kubectl("config", "use-context", ctx).RunV()
204209
}

0 commit comments

Comments
 (0)