Skip to content

Commit

Permalink
Merge pull request #2170 from chuanchang/fix_PouchNetworkSuite.TestNe…
Browse files Browse the repository at this point in the history
…tworkDefault

test.cli_network_test: fix TestNetworkDefault failure on Ubuntu
  • Loading branch information
allencloud authored Aug 29, 2018
2 parents 199ad23 + fe96624 commit b375d4b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/cli_network_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,13 @@ func (suite *PouchNetworkSuite) TestNetworkDefault(c *check.C) {
}
{
cmd := "ip r |grep default"
// The command output of "ip r | grep default" contains extra "proto static"
// on Ubuntu host, which is inconsistent with output in container
routeOnHost := icmd.RunCommand("bash", "-c", cmd).Stdout()
if strings.Contains(routeOnHost, "proto static") {
// keep command output consistent between Ubuntu host and container
routeOnHost = strings.Replace(routeOnHost, " proto static ", "", -1)
}
// Assign the host network to a container.
expct := icmd.Expected{
ExitCode: 0,
Expand Down

0 comments on commit b375d4b

Please sign in to comment.