Add media type to export stream

Signed-off-by: Derek McGowan <derek@mcg.dev>
This commit is contained in:
Derek McGowan
2022-10-04 15:34:45 -07:00
parent 52341a2343
commit 0762a3a759
5 changed files with 17 additions and 13 deletions

View File

@@ -45,7 +45,7 @@ func TestTransferEcho(t *testing.T) {
func newImportExportEcho(ctx context.Context, client *containerd.Client, expected []byte) func(*testing.T) {
return func(t *testing.T) {
testBuf := newWaitBuffer()
err := client.Transfer(ctx, archive.NewImageImportStream(bytes.NewReader(expected), "application/octet-stream"), archive.NewImageExportStream(testBuf))
err := client.Transfer(ctx, archive.NewImageImportStream(bytes.NewReader(expected), "application/octet-stream"), archive.NewImageExportStream(testBuf, "application/octet-stream"))
if err != nil {
t.Fatal(err)
}