Skip to content

Commit

Permalink
Use Eventually/Should for routes_command list routes with http1 and (#…
Browse files Browse the repository at this point in the history
…2324)

- Existing test was flaky as the order of the two lines could change.
This uses eventually/should to check the buffer in any order
  • Loading branch information
moleske authored Sep 22, 2022
1 parent ead1418 commit a4ae5d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions integration/v7/isolated/routes_command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ var _ = Describe("routes command", func() {
Eventually(session).Should(Exit(0))
Expect(session).To(Say(`Getting routes for org %s / space %s as %s\.\.\.`, orgName, spaceName, userName))
Expect(session).To(Say(tableHeaders))
Expect(session).To(Say(`%s\s+route1\s+%s\s+http\s+http1, http2\s+%s\s+\n`, spaceName, domainName, fmt.Sprintf("%s, %s", appName1, appName2)))
Expect(session).To(Say(`%s\s+route2\s+%s\s+http\s+http1\s+%s\s+\n`, spaceName, domainName, appName2))
Eventually(session).Should(Say(`%s\s+route1\s+%s\s+http\s+http1, http2\s+%s\s+\n`, spaceName, domainName, fmt.Sprintf("%s, %s", appName1, appName2)))
Eventually(session).Should(Say(`%s\s+route2\s+%s\s+http\s+http1\s+%s\s+\n`, spaceName, domainName, appName2))
})
})

Expand Down

0 comments on commit a4ae5d1

Please sign in to comment.