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

Commit 21a9eea

Browse files
ForestEckhardtAnthony Emengo
authored and
Anthony Emengo
committed
touch up bosh target tests in acceptance once more
* combats flakiness in bosh env assertion [ci skip] Signed-off-by: Anthony Emengo <aemengo@pivotal.io>
1 parent 705494e commit 21a9eea

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

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

+13-12
Original file line numberDiff line numberDiff line change
@@ -148,20 +148,21 @@ func EventuallyWeCanTargetTheBOSHDirector() {
148148
By("waiting for bosh to listen")
149149
EventuallyShouldListenAt("https://"+BoshDirectorIP+":25555", 480)
150150

151-
var boshCmd *exec.Cmd
152-
153-
if IsWindows() {
154-
boshCmd = exec.Command("powershell.exe",
155-
"-Command",
156-
`cf dev bosh env | Invoke-Expression; bosh env`)
157-
} else {
158-
boshCmd = exec.Command("/bin/sh",
159-
"-e",
160-
"-c", `eval "$(cf dev bosh env)" && bosh env`)
161-
}
162-
163151
w := gexec.NewPrefixedWriter("[bosh env] ", GinkgoWriter)
164152
Eventually(func() int {
153+
154+
var boshCmd *exec.Cmd
155+
156+
if IsWindows() {
157+
boshCmd = exec.Command("powershell.exe",
158+
"-Command",
159+
`cf dev bosh env | Invoke-Expression; bosh env`)
160+
} else {
161+
boshCmd = exec.Command("/bin/sh",
162+
"-e",
163+
"-c", `eval "$(cf dev bosh env)" && bosh env`)
164+
}
165+
165166
session, err := gexec.Start(boshCmd, w, w)
166167
Expect(err).ToNot(HaveOccurred())
167168
<-session.Exited

0 commit comments

Comments
 (0)