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

Function TestUpWithBuildDependencies

pkg/e2e/up_test.go:109–126  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

107}
108
109func TestUpWithBuildDependencies(t *testing.T) {
110 c := NewParallelCLI(t)
111
112 t.Run("up with service using image build by an another service", func(t *testing.T) {
113 // ensure local test run does not reuse previously build image
114 c.RunDockerOrExitError(t, "rmi", "built-image-dependency")
115
116 res := c.RunDockerComposeCmd(t, "--project-directory", "fixtures/dependencies",
117 "-f", "fixtures/dependencies/service-image-depends-on.yaml", "up", "-d")
118
119 t.Cleanup(func() {
120 c.RunDockerComposeCmd(t, "--project-directory", "fixtures/dependencies",
121 "-f", "fixtures/dependencies/service-image-depends-on.yaml", "down", "--rmi", "all")
122 })
123
124 res.Assert(t, icmd.Success)
125 })
126}
127
128func TestUpWithDependencyExit(t *testing.T) {
129 c := NewParallelCLI(t)

Callers

nothing calls this directly

Calls 3

NewParallelCLIFunction · 0.85
RunDockerOrExitErrorMethod · 0.80
RunDockerComposeCmdMethod · 0.80

Tested by

no test coverage detected