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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user