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

Function TestCompatibility

pkg/e2e/compose_test.go:211–232  ·  pkg/e2e/compose_test.go::TestCompatibility
(t *testing.T)

Source from the content-addressed store, hash-verified

209}
210
211func TestCompatibility(t *testing.T) {
212 // this test shares a fixture with TestLocalComposeUp and can't run at the same time
213 c := NewCLI(t)
214
215 const projectName = "compose-e2e-compatibility"
216
217 t.Run("up", func(t *testing.T) {
218 c.RunDockerComposeCmd(t, "--compatibility", "-f", "./fixtures/sentences/compose.yaml", "--project-name",
219 projectName, "up", "-d")
220 })
221
222 t.Run("check container names", func(t *testing.T) {
223 res := c.RunDockerCmd(t, "ps", "--format", "{{.Names}}")
224 res.Assert(t, icmd.Expected{Out: "compose-e2e-compatibility_web_1"})
225 res.Assert(t, icmd.Expected{Out: "compose-e2e-compatibility_words_1"})
226 res.Assert(t, icmd.Expected{Out: "compose-e2e-compatibility_db_1"})
227 })
228
229 t.Run("down", func(t *testing.T) {
230 c.RunDockerComposeCmd(t, "-p", projectName, "down")
231 })
232}
233
234func TestConfig(t *testing.T) {
235 const projectName = "compose-e2e-config"

Callers

nothing calls this directly

Calls 3

RunDockerComposeCmdMethod · 0.95
RunDockerCmdMethod · 0.95
NewCLIFunction · 0.85

Tested by

no test coverage detected