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