Improve the TestEventsContainerWithMultiNetwork UT
| ... | ... |
@@ -244,14 +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 |
+ // received two network disconnect events |
|
| 249 | 248 |
c.Assert(len(netEvents), checker.Equals, 2) |
| 250 | 249 |
c.Assert(netEvents[0], checker.Contains, "disconnect") |
| 251 |
- c.Assert(netEvents[0], checker.Contains, "test-event-network-local-") |
|
| 252 |
- |
|
| 253 | 250 |
c.Assert(netEvents[1], checker.Contains, "disconnect") |
| 254 |
- c.Assert(netEvents[1], checker.Contains, "test-event-network-local-") |
|
| 251 |
+ |
|
| 252 |
+ //both networks appeared in the network event output |
|
| 253 |
+ c.Assert(out, checker.Contains, "test-event-network-local-1") |
|
| 254 |
+ c.Assert(out, checker.Contains, "test-event-network-local-2") |
|
| 255 | 255 |
} |
| 256 | 256 |
|
| 257 | 257 |
func (s *DockerSuite) TestEventsStreaming(c *check.C) {
|