Add PWD_HOST_FQDN env variable to instances.
This commit is contained in:
@@ -66,6 +66,7 @@ type InstanceConfig struct {
|
||||
CACert []byte
|
||||
Cert []byte
|
||||
Key []byte
|
||||
Host string
|
||||
}
|
||||
|
||||
func (i *Instance) setUsedPort(port uint16) {
|
||||
@@ -223,6 +224,7 @@ func (p *pwd) InstanceNew(session *Session, conf InstanceConfig) (*Instance, err
|
||||
ServerKey: conf.ServerKey,
|
||||
CACert: conf.CACert,
|
||||
Privileged: false,
|
||||
HostFQDN: conf.Host,
|
||||
}
|
||||
|
||||
for _, imageName := range p.InstanceAllowedImages() {
|
||||
|
||||
@@ -57,7 +57,7 @@ func TestInstanceNew(t *testing.T) {
|
||||
|
||||
assert.Nil(t, err)
|
||||
|
||||
instance, err := p.InstanceNew(session, InstanceConfig{})
|
||||
instance, err := p.InstanceNew(session, InstanceConfig{Host: "something.play-with-docker.com"})
|
||||
|
||||
assert.Nil(t, err)
|
||||
|
||||
@@ -83,6 +83,7 @@ func TestInstanceNew(t *testing.T) {
|
||||
ServerKey: nil,
|
||||
CACert: nil,
|
||||
Privileged: true,
|
||||
HostFQDN: "something.play-with-docker.com",
|
||||
}
|
||||
assert.Equal(t, expectedContainerOpts, containerOpts)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user