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

Function TestUpImageID

pkg/e2e/up_test.go:194–207  ·  pkg/e2e/up_test.go::TestUpImageID
(t *testing.T)

Source from the content-addressed store, hash-verified

192}
193
194func TestUpImageID(t *testing.T) {
195 c := NewCLI(t)
196 const projectName = "compose-e2e-up-image-id"
197
198 digest := strings.TrimSpace(c.RunDockerCmd(t, "image", "inspect", "alpine", "-f", "{{ .ID }}").Stdout())
199 _, id, _ := strings.Cut(digest, ":")
200
201 t.Cleanup(func() {
202 c.RunDockerComposeCmd(t, "--project-name", projectName, "down", "-v")
203 })
204
205 c = NewCLI(t, WithEnv(fmt.Sprintf("ID=%s", id)))
206 c.RunDockerComposeCmd(t, "-f", "./fixtures/simple-composefile/id.yaml", "--project-name", projectName, "up")
207}
208
209func TestUpStopWithLogsMixed(t *testing.T) {
210 c := NewCLI(t)

Callers

nothing calls this directly

Calls 4

RunDockerCmdMethod · 0.95
RunDockerComposeCmdMethod · 0.95
NewCLIFunction · 0.85
WithEnvFunction · 0.85

Tested by

no test coverage detected