(service string, id string, oneOff bool)
| 110 | } |
| 111 | |
| 112 | func 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 | |
| 125 | func containerLabels(service string, oneOff bool) map[string]string { |
| 126 | workingdir := "/src/pkg/compose/testdata" |
no test coverage detected