Skip to content

Commit 8a7226c

Browse files
authoredApr 10, 2019
Merge pull request #19 from pvormste/fix-false-value
fix field with false value
2 parents 238b5a8 + 3da3055 commit 8a7226c

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed
 

‎pkg/dockertestwrapper/wrapper.go

+1
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ func (w WrapperInstance) PurgeContainer() error {
7575
func (w *WrapperInstance) determineHostname() error {
7676
if strings.HasPrefix(w.Pool.Client.Endpoint(), "unix://") {
7777
w.Hostname = "localhost"
78+
w.DockerHost = w.Hostname // will be removed in a future update
7879
return nil
7980
}
8081

‎pkg/dockertestwrapper/wrapper_test.go

+4
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ var wrapperInstanceDetermineHostnameTests = []struct {
2323
doAssertions: func(t *testing.T, actualInstance WrapperInstance, actualErr error) {
2424
assert.NoError(t, actualErr)
2525
assert.Equal(t, "localhost", actualInstance.Hostname)
26+
assert.Equal(t, "localhost", actualInstance.DockerHost) // will be removed in a future update
2627
},
2728
},
2829
{
@@ -31,6 +32,7 @@ var wrapperInstanceDetermineHostnameTests = []struct {
3132
doAssertions: func(t *testing.T, actualInstance WrapperInstance, actualErr error) {
3233
assert.NoError(t, actualErr)
3334
assert.Equal(t, "docker", actualInstance.Hostname)
35+
assert.Equal(t, "docker", actualInstance.DockerHost) // will be removed in a future update
3436
},
3537
},
3638
}
@@ -70,6 +72,7 @@ var wrapperInstanceDeterminePortTests = []struct {
7072
doAssertions: func(t *testing.T, instance WrapperInstance, actualErr error) {
7173
assert.Error(t, actualErr)
7274
assert.Equal(t, 0, instance.Port)
75+
assert.Equal(t, 0, instance.HostPort) // will be removed in a future update
7376
},
7477
},
7578
{
@@ -79,6 +82,7 @@ var wrapperInstanceDeterminePortTests = []struct {
7982
doAssertions: func(t *testing.T, instance WrapperInstance, actualErr error) {
8083
assert.NoError(t, actualErr)
8184
assert.Equal(t, 5432, instance.Port)
85+
assert.Equal(t, 5432, instance.HostPort) // will be removed in a future update
8286
},
8387
},
8488
}

0 commit comments

Comments
 (0)