From df0270d0cc8233399939b232f7820311187a3be7 Mon Sep 17 00:00:00 2001 From: CrazyMax <1951866+crazy-max@users.noreply.github.com> Date: Fri, 13 Sep 2024 14:19:46 +0200 Subject: [PATCH] test: fix missing envs when cleaning up some workers Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com> --- tests/workers/docker-container.go | 5 +++++ tests/workers/remote.go | 1 + 2 files changed, 6 insertions(+) diff --git a/tests/workers/docker-container.go b/tests/workers/docker-container.go index b3880a79..51f253ea 100644 --- a/tests/workers/docker-container.go +++ b/tests/workers/docker-container.go @@ -73,6 +73,11 @@ func (w *containerWorker) New(ctx context.Context, cfg *integration.BackendConfi cl := func() error { cmd := exec.Command("buildx", "rm", "-f", name) + cmd.Env = append( + os.Environ(), + "BUILDX_CONFIG=/tmp/buildx-"+name, + "DOCKER_CONTEXT="+w.docker.DockerAddress(), + ) return cmd.Run() } diff --git a/tests/workers/remote.go b/tests/workers/remote.go index 1e2038b8..14c09cac 100644 --- a/tests/workers/remote.go +++ b/tests/workers/remote.go @@ -56,6 +56,7 @@ func (w remoteWorker) New(ctx context.Context, cfg *integration.BackendConfig) ( cl = func() error { err := bkclose() cmd := exec.Command("buildx", "rm", "-f", name) + cmd.Env = append(os.Environ(), "BUILDX_CONFIG=/tmp/buildx-"+name) if err1 := cmd.Run(); err == nil { err = err1 }