Skip to content

Commit

Permalink
test.cli_network_test: fix TestNetworkDefault failure on Ubuntu
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Jia <chuanchang.jia@gmail.com>
  • Loading branch information
chuanchang committed Aug 29, 2018
1 parent 199ad23 commit fe96624
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 fe96624

Please sign in to comment.