MCPcopy
hub / github.com/containerd/containerd / TestTransferEcho

Function TestTransferEcho

integration/client/transfer_test.go:30–43  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

28)
29
30func TestTransferEcho(t *testing.T) {
31 client, err := newClient(t, address)
32 if err != nil {
33 t.Fatal(err)
34 }
35 defer client.Close()
36
37 ctx, cancel := testContext(t)
38 defer cancel()
39 t.Run("ImportExportEchoBig", newImportExportEcho(ctx, client, bytes.Repeat([]byte("somecontent"), 17*1024)))
40 t.Run("ImportExportEchoSmall", newImportExportEcho(ctx, client, []byte("somecontent")))
41 t.Run("ImportExportEchoEmpty", newImportExportEcho(ctx, client, []byte("")))
42
43}
44
45func newImportExportEcho(ctx context.Context, client *containerd.Client, expected []byte) func(*testing.T) {
46 return func(t *testing.T) {

Callers

nothing calls this directly

Calls 6

newClientFunction · 0.85
testContextFunction · 0.85
newImportExportEchoFunction · 0.85
FatalMethod · 0.80
CloseMethod · 0.65
RunMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…