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

Function testContainer

pkg/compose/kill_test.go:112–123  ·  view source on GitHub ↗
(service string, id string, oneOff bool)

Source from the content-addressed store, hash-verified

110}
111
112func testContainer(service string, id string, oneOff bool) container.Summary {
113 // canonical docker names in the API start with a leading slash, some
114 // parts of Compose code will attempt to strip this off, so make sure
115 // it's consistently present
116 name := "/" + strings.TrimPrefix(id, "/")
117 return container.Summary{
118 ID: id,
119 Names: []string{name},
120 Labels: containerLabels(service, oneOff),
121 State: container.StateExited,
122 }
123}
124
125func containerLabels(service string, oneOff bool) map[string]string {
126 workingdir := "/src/pkg/compose/testdata"

Callers 14

TestDownFunction · 0.85
TestDownRemoveOrphansFunction · 0.85
TestDownRemoveVolumesFunction · 0.85
TestDownRemoveImagesFunction · 0.85
TestWatch_SyncFunction · 0.85
TestStopTimeoutFunction · 0.85
TestServiceLinksFunction · 0.85
TestKillAllFunction · 0.85
TestKillSignalFunction · 0.85

Calls 1

containerLabelsFunction · 0.85

Tested by

no test coverage detected