the order in which disconnect takes place is undetermined,
so don't check for the full name
this test was passing due to a previous bug, that
always returned the same network-name.
this bug was recently fixed in 148bcda3292563df8e433a3d7987810cd5702dec
(pull request 23375), exposing this test to be
flaky.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
| ... | ... |
@@ -244,12 +244,14 @@ func (s *DockerSuite) TestEventsContainerWithMultiNetwork(c *check.C) {
|
| 244 | 244 |
out, _ := dockerCmd(c, "events", "--since", since, "--until", until, "-f", "type=network") |
| 245 | 245 |
netEvents := strings.Split(strings.TrimSpace(out), "\n") |
| 246 | 246 |
|
| 247 |
+ // NOTE: order in which disconnect takes place is undetermined, |
|
| 248 |
+ // so don't check for the *full* name |
|
| 247 | 249 |
c.Assert(len(netEvents), checker.Equals, 2) |
| 248 | 250 |
c.Assert(netEvents[0], checker.Contains, "disconnect") |
| 249 |
- c.Assert(netEvents[0], checker.Contains, "test-event-network-local-1") |
|
| 251 |
+ c.Assert(netEvents[0], checker.Contains, "test-event-network-local-") |
|
| 250 | 252 |
|
| 251 | 253 |
c.Assert(netEvents[1], checker.Contains, "disconnect") |
| 252 |
- c.Assert(netEvents[1], checker.Contains, "test-event-network-local-2") |
|
| 254 |
+ c.Assert(netEvents[1], checker.Contains, "test-event-network-local-") |
|
| 253 | 255 |
} |
| 254 | 256 |
|
| 255 | 257 |
func (s *DockerSuite) TestEventsStreaming(c *check.C) {
|