Skip to content

Commit

Permalink
test: fix missing envs when cleaning up some workers
Browse files Browse the repository at this point in the history
Signed-off-by: CrazyMax <[email protected]>
  • Loading branch information
crazy-max committed Sep 13, 2024
1 parent 056cf8a commit df0270d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/workers/docker-container.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}

Expand Down
1 change: 1 addition & 0 deletions tests/workers/remote.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit df0270d

Please sign in to comment.