MCPcopy Create free account
hub / github.com/docker/compose / TestCommit

Function TestCommit

pkg/e2e/commit_test.go:23–49  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

21)
22
23func TestCommit(t *testing.T) {
24 const projectName = "e2e-commit-service"
25 c := NewParallelCLI(t)
26
27 cleanup := func() {
28 c.RunDockerComposeCmd(t, "--project-name", projectName, "down", "--timeout=0", "--remove-orphans")
29 }
30 t.Cleanup(cleanup)
31 cleanup()
32
33 c.RunDockerComposeCmd(t, "-f", "./fixtures/commit/compose.yaml", "--project-name", projectName, "up", "-d", "service")
34
35 c.RunDockerComposeCmd(
36 t,
37 "--project-name",
38 projectName,
39 "commit",
40 "-a",
41 "John Hannibal Smith <hannibal@a-team.com>",
42 "-c",
43 "ENV DEBUG=true",
44 "-m",
45 "sample commit",
46 "service",
47 "service:latest",
48 )
49}
50
51func TestCommitWithReplicas(t *testing.T) {
52 const projectName = "e2e-commit-service-with-replicas"

Callers

nothing calls this directly

Calls 2

NewParallelCLIFunction · 0.85
RunDockerComposeCmdMethod · 0.80

Tested by

no test coverage detected