Skip to content

Commit

Permalink
Merge pull request #8682 from concourse/fix-fly-integration-test-darwin
Browse files Browse the repository at this point in the history
Fix failed fly integration test in darwin for release/7.9.x
  • Loading branch information
xtremerui committed Feb 4, 2023
2 parents 32760d3 + 107584e commit d289c02
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
10 changes: 4 additions & 6 deletions fly/integration/hijack_test.go
Expand Up @@ -301,14 +301,13 @@ var _ = Describe("Hijacking", func() {
stdin, err := flyCmd.StdinPipe()
Expect(err).NotTo(HaveOccurred())

defer stdin.Close()

sess, err := gexec.Start(flyCmd, GinkgoWriter, GinkgoWriter)
Expect(err).NotTo(HaveOccurred())

Eventually(sess.Err.Contents).Should(ContainSubstring("no containers matched your search parameters!\n\nthey may have expired if your build hasn't recently finished.\n"))

err = stdin.Close()
Expect(err).NotTo(HaveOccurred())

<-sess.Exited
Expect(sess.ExitCode()).To(Equal(1))
})
Expand Down Expand Up @@ -915,6 +914,8 @@ var _ = Describe("Hijacking", func() {
stdin, err := flyCmd.StdinPipe()
Expect(err).NotTo(HaveOccurred())

defer stdin.Close()

sess, err := gexec.Start(flyCmd, GinkgoWriter, GinkgoWriter)
Expect(err).NotTo(HaveOccurred())

Expand All @@ -925,9 +926,6 @@ var _ = Describe("Hijacking", func() {

Eventually(sess.Err.Contents).Should(ContainSubstring(ansi.Color("something went wrong", "red+b") + "\n"))

err = stdin.Close()
Expect(err).NotTo(HaveOccurred())

<-sess.Exited
Expect(sess.ExitCode()).To(Equal(255))
})
Expand Down
3 changes: 1 addition & 2 deletions fly/integration/login_insecure_test.go
Expand Up @@ -58,8 +58,7 @@ var _ = Describe("login -k Command", func() {

Eventually(sess.Out).Should(gbytes.Say("target saved"))

err = stdin.Close()
Expect(err).NotTo(HaveOccurred())
defer stdin.Close()

<-sess.Exited
Expect(sess.ExitCode()).To(Equal(0))
Expand Down
2 changes: 1 addition & 1 deletion go.mod
@@ -1,6 +1,6 @@
module github.com/concourse/concourse

go 1.19
go 1.20

require (
code.cloudfoundry.org/clock v1.0.0
Expand Down

0 comments on commit d289c02

Please sign in to comment.