Skip to content

Commit

Permalink
Merge pull request #2696 from crazy-max/test-fix-cleanup
Browse files Browse the repository at this point in the history
test: fix missing envs when cleaning up some workers
  • Loading branch information
tonistiigi authored Sep 18, 2024
2 parents 4528269 + df0270d commit 9eb0318
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 9eb0318

Please sign in to comment.