commit
6fe5f72fb9
|
@ -2654,12 +2654,24 @@ func testPullZstdImage(t *testing.T, sb integration.Sandbox) {
|
|||
"name": target,
|
||||
"push": "true",
|
||||
"compression": "zstd",
|
||||
|
||||
// containerd applier supports only zstd with oci-mediatype.
|
||||
"oci-mediatypes": "true",
|
||||
},
|
||||
},
|
||||
},
|
||||
}, nil)
|
||||
require.NoError(t, err)
|
||||
|
||||
if sb.Name() == "containerd-1.4" {
|
||||
// containerd 1.4 doesn't support zstd compression
|
||||
return
|
||||
}
|
||||
err = c.Prune(sb.Context(), nil, PruneAll)
|
||||
require.NoError(t, err)
|
||||
|
||||
checkAllRemoved(t, c, sb)
|
||||
|
||||
st = llb.Scratch().File(llb.Copy(llb.Image(target), "/data", "/zdata"))
|
||||
|
||||
def, err = st.Marshal(sb.Context())
|
||||
|
|
|
@ -51,6 +51,7 @@ type Sandbox interface {
|
|||
PrintLogs(*testing.T)
|
||||
NewRegistry() (string, error)
|
||||
Value(string) interface{} // chosen matrix value
|
||||
Name() string
|
||||
}
|
||||
|
||||
// BackendConfig is used to configure backends created by a worker.
|
||||
|
|
|
@ -51,6 +51,11 @@ type sandbox struct {
|
|||
cleanup *multiCloser
|
||||
mv matrixValue
|
||||
ctx context.Context
|
||||
name string
|
||||
}
|
||||
|
||||
func (sb *sandbox) Name() string {
|
||||
return sb.name
|
||||
}
|
||||
|
||||
func (sb *sandbox) Context() context.Context {
|
||||
|
@ -135,6 +140,7 @@ func newSandbox(ctx context.Context, w Worker, mirror string, mv matrixValue) (s
|
|||
cleanup: deferF,
|
||||
mv: mv,
|
||||
ctx: ctx,
|
||||
name: w.Name(),
|
||||
}, cl, nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue