MCPcopy
hub / github.com/containerd/containerd / TestContainerList

Function TestContainerList

integration/client/container_test.go:60–77  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

58}
59
60func TestContainerList(t *testing.T) {
61 client, err := newClient(t, address)
62 if err != nil {
63 t.Fatal(err)
64 }
65 defer client.Close()
66
67 ctx, cancel := testContext(t)
68 defer cancel()
69
70 containers, err := client.Containers(ctx)
71 if err != nil {
72 t.Fatalf("container list returned error %v", err)
73 }
74 if len(containers) != 0 {
75 t.Errorf("expected 0 containers but received %d", len(containers))
76 }
77}
78
79func TestNewContainer(t *testing.T) {
80 t.Parallel()

Callers

nothing calls this directly

Calls 5

newClientFunction · 0.85
testContextFunction · 0.85
FatalMethod · 0.80
ContainersMethod · 0.80
CloseMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…