mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
fix TestEventsContainerWithMultiNetwork
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 148bcda329
(pull request 23375), exposing this test to be
flaky.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
3b08711bb7
commit
7d22eb072c
1 changed files with 4 additions and 2 deletions
|
@ -244,12 +244,14 @@ func (s *DockerSuite) TestEventsContainerWithMultiNetwork(c *check.C) {
|
|||
out, _ := dockerCmd(c, "events", "--since", since, "--until", until, "-f", "type=network")
|
||||
netEvents := strings.Split(strings.TrimSpace(out), "\n")
|
||||
|
||||
// NOTE: order in which disconnect takes place is undetermined,
|
||||
// so don't check for the *full* name
|
||||
c.Assert(len(netEvents), checker.Equals, 2)
|
||||
c.Assert(netEvents[0], checker.Contains, "disconnect")
|
||||
c.Assert(netEvents[0], checker.Contains, "test-event-network-local-1")
|
||||
c.Assert(netEvents[0], checker.Contains, "test-event-network-local-")
|
||||
|
||||
c.Assert(netEvents[1], checker.Contains, "disconnect")
|
||||
c.Assert(netEvents[1], checker.Contains, "test-event-network-local-2")
|
||||
c.Assert(netEvents[1], checker.Contains, "test-event-network-local-")
|
||||
}
|
||||
|
||||
func (s *DockerSuite) TestEventsStreaming(c *check.C) {
|
||||
|
|
Loading…
Reference in a new issue