MCPcopy
hub / github.com/docker/compose / ContainerList

Method ContainerList

pkg/dryrun/dryrunclient.go:141–160  ·  pkg/dryrun/dryrunclient.go::DryRunClient.ContainerList
(ctx context.Context, options client.ContainerListOptions)

Source from the content-addressed store, hash-verified

139}
140
141func (d *DryRunClient) ContainerList(ctx context.Context, options client.ContainerListOptions) (client.ContainerListResult, error) {
142 caller := getCallingFunction()
143 switch caller {
144 case "start":
145 return client.ContainerListResult{
146 Items: d.containers,
147 }, nil
148 case "getContainers":
149 if len(d.containers) == 0 {
150 res, err := d.apiClient.ContainerList(ctx, options)
151 if err == nil {
152 d.containers = res.Items
153 }
154 return client.ContainerListResult{
155 Items: d.containers,
156 }, err
157 }
158 }
159 return d.apiClient.ContainerList(ctx, options)
160}
161
162func (d *DryRunClient) ContainerPause(ctx context.Context, container string, options client.ContainerPauseOptions) (client.ContainerPauseResult, error) {
163 return client.ContainerPauseResult{}, nil

Callers 15

TestDownFunction · 0.45
TestDownRemoveOrphansFunction · 0.45
TestDownRemoveVolumesFunction · 0.45
TestDownRemoveImagesFunction · 0.45
startMethod · 0.45
TestWatch_SyncFunction · 0.45
TestImagesFunction · 0.45
TestStopTimeoutFunction · 0.45
StartMethod · 0.45

Calls 1

getCallingFunctionFunction · 0.85

Tested by 15

TestDownFunction · 0.36
TestDownRemoveOrphansFunction · 0.36
TestDownRemoveVolumesFunction · 0.36
TestDownRemoveImagesFunction · 0.36
TestWatch_SyncFunction · 0.36
TestImagesFunction · 0.36
TestStopTimeoutFunction · 0.36
TestCollectObservedStateFunction · 0.36
TestServiceLinksFunction · 0.36