end-to-end test
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
parent
3ca75bdf55
commit
27e90a3fdf
@ -191,7 +191,6 @@ func (c *convergence) ensureService(ctx context.Context, project *types.Project,
|
||||
case ContainerCreated:
|
||||
case ContainerRestarting:
|
||||
case ContainerExited:
|
||||
w.Event(progress.CreatedEvent(name))
|
||||
default:
|
||||
container := container
|
||||
eg.Go(tracing.EventWrapFuncForErrGroup(ctx, "service/start", tracing.ContainerOptions(container), func(ctx context.Context) error {
|
||||
|
10
pkg/e2e/fixtures/network-recreate/compose.yaml
Normal file
10
pkg/e2e/fixtures/network-recreate/compose.yaml
Normal file
@ -0,0 +1,10 @@
|
||||
services:
|
||||
web:
|
||||
image: nginx
|
||||
networks:
|
||||
- test
|
||||
|
||||
networks:
|
||||
test:
|
||||
labels:
|
||||
- foo=${FOO:-foo}
|
@ -199,3 +199,24 @@ func TestInterfaceName(t *testing.T) {
|
||||
})
|
||||
res.Assert(t, icmd.Expected{Out: "foobar@"})
|
||||
}
|
||||
|
||||
func TestNetworkRecreate(t *testing.T) {
|
||||
c := NewCLI(t)
|
||||
const projectName = "network_recreate"
|
||||
t.Cleanup(func() {
|
||||
c.cleanupWithDown(t, projectName)
|
||||
})
|
||||
c.RunDockerComposeCmd(t, "-f", "./fixtures/network-recreate/compose.yaml", "--project-name", projectName, "up", "-d")
|
||||
|
||||
c = NewCLI(t, WithEnv("FOO=bar"))
|
||||
res := c.RunDockerComposeCmd(t, "-f", "./fixtures/network-recreate/compose.yaml", "--project-name", projectName, "--progress=plain", "up", "-d")
|
||||
err := res.Stderr()
|
||||
fmt.Println(err)
|
||||
res.Assert(t, icmd.Expected{Err: `
|
||||
Container network_recreate-web-1 Stopped
|
||||
Network network_recreate_test Removed
|
||||
Network network_recreate_test Creating
|
||||
Network network_recreate_test Created
|
||||
Container network_recreate-web-1 Starting
|
||||
Container network_recreate-web-1 Started`})
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user