Merge pull request #10852 from Snorch/check-docker-port-is-not-empty

This commit is contained in:
Steve Francia 2015-02-19 17:18:36 -05:00
commit ac7bef5e66
1 changed files with 4 additions and 0 deletions

View File

@ -2922,6 +2922,10 @@ func TestRunPortFromDockerRangeInUse(t *testing.T) {
t.Fatal(out, err)
}
out = strings.TrimSpace(out)
if out == "" {
t.Fatal("docker port command output is empty")
}
out = strings.Split(out, ":")[1]
lastPort, err := strconv.Atoi(out)
if err != nil {