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

Commit

Permalink
touch up bosh target tests in acceptance once more
Browse files Browse the repository at this point in the history
* combats flakiness in bosh env assertion

[ci skip]

Signed-off-by: Anthony Emengo <[email protected]>
  • Loading branch information
ForestEckhardt authored and Anthony Emengo committed Aug 21, 2018
1 parent 705494e commit 21a9eea
Showing 1 changed file with 13 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -148,20 +148,21 @@ func EventuallyWeCanTargetTheBOSHDirector() {
By("waiting for bosh to listen")
EventuallyShouldListenAt("https://"+BoshDirectorIP+":25555", 480)

var boshCmd *exec.Cmd

if IsWindows() {
boshCmd = exec.Command("powershell.exe",
"-Command",
`cf dev bosh env | Invoke-Expression; bosh env`)
} else {
boshCmd = exec.Command("/bin/sh",
"-e",
"-c", `eval "$(cf dev bosh env)" && bosh env`)
}

w := gexec.NewPrefixedWriter("[bosh env] ", GinkgoWriter)
Eventually(func() int {

var boshCmd *exec.Cmd

if IsWindows() {
boshCmd = exec.Command("powershell.exe",
"-Command",
`cf dev bosh env | Invoke-Expression; bosh env`)
} else {
boshCmd = exec.Command("/bin/sh",
"-e",
"-c", `eval "$(cf dev bosh env)" && bosh env`)
}

session, err := gexec.Start(boshCmd, w, w)
Expect(err).ToNot(HaveOccurred())
<-session.Exited
Expand Down

0 comments on commit 21a9eea

Please sign in to comment.