Skip to content

Commit

Permalink
Make GetContainerIP work in testing environments.
Browse files Browse the repository at this point in the history
  • Loading branch information
hinnerk committed Sep 29, 2016
1 parent 81d2138 commit d6c0071
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dockerutil/dockerutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ func GetContainerIP(name string) (string, error) {

protonetNetworkData, ok := data.NetworkSettings.Networks["protonet"]
if !ok {
return "", errors.New("The SKVS container doesn't belong to the network 'protonet'.")
protonetNetworkData, ok = data.NetworkSettings.Networks["docker"]
if !ok {
return "", fmt.Errorf("The container '%s' doesn't exist on the networks 'protonet' and 'docker'.", name)
}
}

return protonetNetworkData.IPAddress, nil
Expand Down

0 comments on commit d6c0071

Please sign in to comment.