Skip to content

Commit

Permalink
Merge pull request #4 from experimental-platform/hh-fix-dockerutil
Browse files Browse the repository at this point in the history
Make `GetContainerIP` work in testing environments.
  • Loading branch information
kdomanski authored Sep 29, 2016
2 parents 81d2138 + d6c0071 commit 85666f4
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 85666f4

Please sign in to comment.