Make networks a list so it can be decided by the provisioner to which to

connect to
This commit is contained in:
Jonathan Leibiusky @xetorthio
2017-08-25 13:39:17 -03:00
parent 3c6d87cb14
commit 6941b8b69a
5 changed files with 32 additions and 29 deletions

View File

@@ -89,6 +89,7 @@ func TestInstanceNew(t *testing.T) {
CACert: nil,
Privileged: true,
HostFQDN: "something.play-with-docker.com",
Networks: map[string]string{session.Id: expectedInstance.Hostname},
}
_d.On("CreateContainer", expectedContainerOpts).Return("10.0.0.1", nil)
_s.On("InstanceCreate", "aaaabbbbcccc", mock.AnythingOfType("*types.Instance")).Return(nil)
@@ -154,6 +155,7 @@ func TestInstanceNew_WithNotAllowedImage(t *testing.T) {
ServerKey: nil,
CACert: nil,
Privileged: true,
Networks: map[string]string{session.Id: expectedInstance.Hostname},
}
_d.On("CreateContainer", expectedContainerOpts).Return("10.0.0.1", nil)
_s.On("InstanceCreate", "aaaabbbbcccc", mock.AnythingOfType("*types.Instance")).Return(nil)
@@ -219,6 +221,7 @@ func TestInstanceNew_WithCustomHostname(t *testing.T) {
ServerKey: nil,
CACert: nil,
Privileged: true,
Networks: map[string]string{session.Id: expectedInstance.Hostname},
}
_d.On("CreateContainer", expectedContainerOpts).Return("10.0.0.1", nil)