mirror of https://github.com/docker/compose.git
Update E2E test
Signed-off-by: Amit Saha <asaha@atlassian.com>
This commit is contained in:
parent
90ca13b747
commit
8c964f5ad3
|
@ -6,3 +6,5 @@ services:
|
|||
hello:
|
||||
image: alpine
|
||||
command: echo hello
|
||||
deploy:
|
||||
replicas: 2
|
||||
|
|
|
@ -56,9 +56,13 @@ func TestLocalComposeLogs(t *testing.T) {
|
|||
|
||||
t.Run("logs hello index", func(t *testing.T) {
|
||||
res := c.RunDockerComposeCmd(t, "--project-name", projectName, "logs", "--index", "2", "hello")
|
||||
// TODO: see if there is a way we can verify that the logs is from the second replica
|
||||
// or if we need to..
|
||||
res.Assert(t, icmd.Expected{Out: `hello`})
|
||||
|
||||
// docker-compose logs hello
|
||||
// logs-test-hello-2 | hello
|
||||
// logs-test-hello-1 | hello
|
||||
t.Log(res.Stdout())
|
||||
assert.Assert(t, !strings.Contains(res.Stdout(), "hello-1"))
|
||||
assert.Assert(t, strings.Contains(res.Stdout(), "hello-2"))
|
||||
})
|
||||
|
||||
t.Run("down", func(t *testing.T) {
|
||||
|
|
Loading…
Reference in New Issue