Skip to content
This repository was archived by the owner on Jul 28, 2020. It is now read-only.

Commit 9ef0a34

Browse files
dgoddardsclevine
authored andcommitted
Set correct default host_ip [#157479260]
- Add acceptance test for accessing host.pcfdev.io from cf container Signed-off-by: Stephen Levine <[email protected]>
1 parent 0b257f1 commit 9ef0a34

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

images/cf/deploy-bosh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
set -e
4-
export HOST_IP="${HOST_IP:-192.168.65.1}"
4+
export HOST_IP="${HOST_IP:-192.168.65.2}"
55

66
create_loop_devices() {
77
echo "creating loop devices..."

src/code.cloudfoundry.org/cfdev/acceptance/privileged/hyperkit_lifecycle_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -219,9 +219,7 @@ server.start
219219

220220
Expect(httpGet("http://cf-test-app.v3.pcfdev.io")).To(Equal("Hello, world!"))
221221
Expect(httpGet("http://cf-test-app.v3.pcfdev.io/external")).To(ContainSubstring("Example Domain"))
222-
223-
// TODO enable below once host.pcfdev.io works again
224-
// Expect(httpGet("http://cf-test-app.v3.pcfdev.io/host")).To(Equal("Text From Test Code"))
222+
Expect(httpGet("http://cf-test-app.v3.pcfdev.io/host")).To(Equal("Text From Test Code"))
225223
}
226224

227225
func fakeTcpServer() (net.Listener, int) {
@@ -230,10 +228,12 @@ func fakeTcpServer() (net.Listener, int) {
230228
go func() {
231229
for {
232230
conn, err := server.Accept()
233-
if err == nil {
234-
conn.Write([]byte("Text From Test Code"))
235-
conn.Close()
231+
if err != nil {
232+
continue
236233
}
234+
_, err = conn.Write([]byte("Text From Test Code"))
235+
Expect(err).NotTo(HaveOccurred())
236+
conn.Close()
237237
}
238238
}()
239239
return server, server.Addr().(*net.TCPAddr).Port

src/code.cloudfoundry.org/cfdev/acceptance/privileged/privileged_suite_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,12 @@ import (
55
"os/exec"
66
"path/filepath"
77
"testing"
8+
"time"
89

910
. "code.cloudfoundry.org/cfdev/acceptance"
1011
"github.com/cloudfoundry-incubator/cf-test-helpers/cf"
1112
. "github.com/onsi/ginkgo"
1213
. "github.com/onsi/gomega"
13-
14-
"time"
15-
1614
"github.com/onsi/gomega/gexec"
1715
)
1816

0 commit comments

Comments
 (0)