mirror of
https://github.com/docker/compose.git
synced 2025-07-25 22:54:54 +02:00
Add failing test
Signed-off-by: Amit Saha <asaha@atlassian.com>
This commit is contained in:
parent
16c4241c0b
commit
e981c35863
@ -16,6 +16,17 @@ options:
|
|||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
|
- option: index
|
||||||
|
value_type: int
|
||||||
|
default_value: "1"
|
||||||
|
description: |
|
||||||
|
Index of the container if there are multiple instances of a service [default: 1].
|
||||||
|
deprecated: false
|
||||||
|
hidden: false
|
||||||
|
experimental: false
|
||||||
|
experimentalcli: false
|
||||||
|
kubernetes: false
|
||||||
|
swarm: false
|
||||||
- option: no-color
|
- option: no-color
|
||||||
value_type: bool
|
value_type: bool
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
|
@ -6,3 +6,6 @@ services:
|
|||||||
hello:
|
hello:
|
||||||
image: alpine
|
image: alpine
|
||||||
command: echo hello
|
command: echo hello
|
||||||
|
deploy:
|
||||||
|
mode: replicated
|
||||||
|
replicas: 2
|
||||||
|
@ -54,6 +54,13 @@ func TestLocalComposeLogs(t *testing.T) {
|
|||||||
res.Assert(t, icmd.Expected{Out: `hello`})
|
res.Assert(t, icmd.Expected{Out: `hello`})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
t.Run("logs hello index", func(t *testing.T) {
|
||||||
|
res := c.RunDockerComposeCmd(t, "--project-name", projectName, "--index", "2", "logs", "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`})
|
||||||
|
})
|
||||||
|
|
||||||
t.Run("down", func(t *testing.T) {
|
t.Run("down", func(t *testing.T) {
|
||||||
_ = c.RunDockerComposeCmd(t, "--project-name", projectName, "down")
|
_ = c.RunDockerComposeCmd(t, "--project-name", projectName, "down")
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user