mirror of https://github.com/docker/compose.git
e2e test for --all-resources
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
parent
865a64afea
commit
b4280fb561
|
@ -0,0 +1,5 @@
|
|||
volumes:
|
||||
my_vol: {}
|
||||
|
||||
networks:
|
||||
my_net: {}
|
|
@ -22,6 +22,7 @@ package e2e
|
|||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"os/exec"
|
||||
"strings"
|
||||
"syscall"
|
||||
|
@ -165,3 +166,15 @@ func TestUpWithDependencyNotRequired(t *testing.T) {
|
|||
assert.Assert(t, strings.Contains(res.Combined(), "foo"), res.Combined())
|
||||
assert.Assert(t, strings.Contains(res.Combined(), " optional dependency \"bar\" failed to start"), res.Combined())
|
||||
}
|
||||
|
||||
func TestUpWithAllResources(t *testing.T) {
|
||||
c := NewCLI(t)
|
||||
const projectName = "compose-e2e-all-resources"
|
||||
t.Cleanup(func() {
|
||||
c.RunDockerComposeCmd(t, "--project-name", projectName, "down", "-v")
|
||||
})
|
||||
|
||||
res := c.RunDockerComposeCmd(t, "-f", "./fixtures/resources/compose.yaml", "--all-resources", "--project-name", projectName, "up")
|
||||
assert.Assert(t, strings.Contains(res.Combined(), fmt.Sprintf(`Volume "%s_my_vol" Created`, projectName)), res.Combined())
|
||||
assert.Assert(t, strings.Contains(res.Combined(), fmt.Sprintf(`Network %s_my_net Created`, projectName)), res.Combined())
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue