Flow context.Context through image builds (#522)

This should help with cancel responsiveness. Right now, there are
multiple places where docker does not respond to cancel for long periods
of time.
This commit is contained in:
Ian Wahbe
2025-05-02 12:31:40 +02:00
committed by GitHub
parent 7ca0d3a6a4
commit 7eb1e3fe50
5 changed files with 25 additions and 18 deletions

View File

@@ -28,12 +28,12 @@ import (
func TestExec(t *testing.T) {
t.Parallel()
h, err := newHost(context.Background(), nil)
h, err := newHost(t.Context(), nil)
require.NoError(t, err)
cli, err := wrap(h)
require.NoError(t, err)
err = cli.exec([]string{"buildx", "version"}, nil)
err = cli.exec(t.Context(), []string{"buildx", "version"}, nil)
assert.NoError(t, err)
out, err := io.ReadAll(cli.r)