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

Function containerLabels

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

Source from the content-addressed store, hash-verified

123}
124
125func containerLabels(service string, oneOff bool) map[string]string {
126 workingdir := "/src/pkg/compose/testdata"
127 composefile := filepath.Join(workingdir, "compose.yaml")
128 labels := map[string]string{
129 compose.ServiceLabel: service,
130 compose.ConfigFilesLabel: composefile,
131 compose.WorkingDirLabel: workingdir,
132 compose.ProjectLabel: strings.ToLower(testProject),
133 }
134 if oneOff {
135 labels[compose.OneoffLabel] = "True"
136 }
137 return labels
138}
139
140func anyCancellableContext() gomock.Matcher {
141 //nolint:forbidigo // This creates a context type for gomock matching, not for actual test usage

Callers 3

containerDetailFunction · 0.85
containerDetailsFunction · 0.85
testContainerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected