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

Function TestCommitWithReplicas

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

Source from the content-addressed store, hash-verified

49}
50
51func TestCommitWithReplicas(t *testing.T) {
52 const projectName = "e2e-commit-service-with-replicas"
53 c := NewParallelCLI(t)
54
55 cleanup := func() {
56 c.RunDockerComposeCmd(t, "--project-name", projectName, "down", "--timeout=0", "--remove-orphans")
57 }
58 t.Cleanup(cleanup)
59 cleanup()
60
61 c.RunDockerComposeCmd(t, "-f", "./fixtures/commit/compose.yaml", "--project-name", projectName, "up", "-d", "service-with-replicas")
62
63 c.RunDockerComposeCmd(
64 t,
65 "--project-name",
66 projectName,
67 "commit",
68 "-a",
69 "John Hannibal Smith <hannibal@a-team.com>",
70 "-c",
71 "ENV DEBUG=true",
72 "-m",
73 "sample commit",
74 "--index=1",
75 "service-with-replicas",
76 "service-with-replicas:1",
77 )
78 c.RunDockerComposeCmd(
79 t,
80 "--project-name",
81 projectName,
82 "commit",
83 "-a",
84 "John Hannibal Smith <hannibal@a-team.com>",
85 "-c",
86 "ENV DEBUG=true",
87 "-m",
88 "sample commit",
89 "--index=2",
90 "service-with-replicas",
91 "service-with-replicas:2",
92 )
93}

Callers

nothing calls this directly

Calls 2

NewParallelCLIFunction · 0.85
RunDockerComposeCmdMethod · 0.80

Tested by

no test coverage detected