mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #10852 from Snorch/check-docker-port-is-not-empty
This commit is contained in:
commit
ac7bef5e66
1 changed files with 4 additions and 0 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue