From 0f028495d87bdef990eca9b8b9f2132a8e3b3196 Mon Sep 17 00:00:00 2001 From: Tim Ebert Date: Mon, 3 Jun 2024 16:53:54 +0200 Subject: [PATCH] Fix e2e tests if `KUBECTL_EXTERNAL_DIFF` env is set --- test/e2e/exec/exec.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/e2e/exec/exec.go b/test/e2e/exec/exec.go index ab560bc..4b79ece 100644 --- a/test/e2e/exec/exec.go +++ b/test/e2e/exec/exec.go @@ -75,7 +75,11 @@ func preparePath() { func NewPluginCommand(args ...string) *exec.Cmd { // nolint:gosec // no security risk in shared test code command := exec.Command("kubectl", append([]string{"revisions"}, args...)...) - command.Env = append(command.Environ(), "PATH="+tmpPath) + command.Env = append(command.Environ(), + "PATH="+tmpPath, + // reset the external diff env in case it is set on the developer's machine + "KUBECTL_EXTERNAL_DIFF=", + ) return command }