diff --git a/test/cli_network_test.go b/test/cli_network_test.go index da79cb4d0..c47c8fdfa 100644 --- a/test/cli_network_test.go +++ b/test/cli_network_test.go @@ -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,