mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Add ingress nw Test around consition which was panicing
Signed-off-by: Alessandro Boch <aboch@docker.com>
This commit is contained in:
parent
747f0b4ba5
commit
4777fb6c6b
1 changed files with 18 additions and 0 deletions
|
@ -468,6 +468,24 @@ func (s *DockerSwarmSuite) TestSwarmIngressNetwork(c *check.C) {
|
||||||
c.Assert(err, checker.IsNil, check.Commentf(out))
|
c.Assert(err, checker.IsNil, check.Commentf(out))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *DockerSwarmSuite) TestSwarmCreateServiceWithNoIngressNetwork(c *check.C) {
|
||||||
|
d := s.AddDaemon(c, true, true)
|
||||||
|
|
||||||
|
// Remove ingress network
|
||||||
|
out, _, err := testutil.RunCommandPipelineWithOutput(
|
||||||
|
exec.Command("echo", "Y"),
|
||||||
|
exec.Command("docker", "-H", d.Sock(), "network", "rm", "ingress"),
|
||||||
|
)
|
||||||
|
c.Assert(err, checker.IsNil, check.Commentf(out))
|
||||||
|
|
||||||
|
// Create a overlay network and launch a service on it
|
||||||
|
// Make sure nothing panics because ingress network is missing
|
||||||
|
out, err = d.Cmd("network", "create", "-d", "overlay", "another-network")
|
||||||
|
c.Assert(err, checker.IsNil, check.Commentf(out))
|
||||||
|
out, err = d.Cmd("service", "create", "--name", "srv4", "--network", "another-network", "busybox", "top")
|
||||||
|
c.Assert(err, checker.IsNil, check.Commentf(out))
|
||||||
|
}
|
||||||
|
|
||||||
// Test case for #24108, also the case from:
|
// Test case for #24108, also the case from:
|
||||||
// https://github.com/docker/docker/pull/24620#issuecomment-233715656
|
// https://github.com/docker/docker/pull/24620#issuecomment-233715656
|
||||||
func (s *DockerSwarmSuite) TestSwarmTaskListFilter(c *check.C) {
|
func (s *DockerSwarmSuite) TestSwarmTaskListFilter(c *check.C) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue