mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Improve the UT
As the #23387 comment, the temp fix for UT need to be improved to make it test the expected behavior. So let's add it. Signed-off-by: Kai Qiang Wu(Kennan) <wkqwu@cn.ibm.com>
This commit is contained in:
parent
ee8c512dc3
commit
e0de1718ee
1 changed files with 5 additions and 5 deletions
|
@ -244,14 +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
|
||||
// received two network disconnect events
|
||||
c.Assert(len(netEvents), checker.Equals, 2)
|
||||
c.Assert(netEvents[0], checker.Contains, "disconnect")
|
||||
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-")
|
||||
|
||||
//both networks appeared in the network event output
|
||||
c.Assert(out, checker.Contains, "test-event-network-local-1")
|
||||
c.Assert(out, checker.Contains, "test-event-network-local-2")
|
||||
}
|
||||
|
||||
func (s *DockerSuite) TestEventsStreaming(c *check.C) {
|
||||
|
|
Loading…
Add table
Reference in a new issue