| ... | ... |
@@ -232,7 +232,8 @@ func isNwPresent(c *check.C, name string) bool {
|
| 232 | 232 |
out, _ := dockerCmd(c, "network", "ls") |
| 233 | 233 |
lines := strings.Split(out, "\n") |
| 234 | 234 |
for i := 1; i < len(lines)-1; i++ {
|
| 235 |
- if strings.Contains(lines[i], name) {
|
|
| 235 |
+ netFields := strings.Fields(lines[i]) |
|
| 236 |
+ if netFields[1] == name {
|
|
| 236 | 237 |
return true |
| 237 | 238 |
} |
| 238 | 239 |
} |