Skip to content

Commit

Permalink
Improve error readability
Browse files Browse the repository at this point in the history
Co-authored-by: Sebastian Vidrio <[email protected]>
  • Loading branch information
acosta11 and vitreuz committed Mar 10, 2020
1 parent d51a1d6 commit 5bc8b9c
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions apps/default_environment_variables.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,17 +96,17 @@ exit 1

pushSessionContent := pushSession.Buffer().Contents()

Expect(pushSessionContent).To(MatchRegexp("LANG=en_US\\.UTF-8"))
Expect(pushSessionContent).To(MatchRegexp("CF_INSTANCE_INTERNAL_IP=.*"))
Expect(pushSessionContent).To(MatchRegexp("CF_INSTANCE_IP=.*"))
Expect(pushSessionContent).To(MatchRegexp("CF_INSTANCE_PORTS=.*"))
Expect(pushSessionContent).To(MatchRegexp("CF_STACK=.*"))
Expect(pushSessionContent).To(MatchRegexp("VCAP_APPLICATION=.*"))
Expect(pushSessionContent).To(MatchRegexp("VCAP_SERVICES=.*"))
Expect(string(pushSessionContent)).To(MatchRegexp("LANG=en_US\\.UTF-8"))
Expect(string(pushSessionContent)).To(MatchRegexp("CF_INSTANCE_INTERNAL_IP=.*"))
Expect(string(pushSessionContent)).To(MatchRegexp("CF_INSTANCE_IP=.*"))
Expect(string(pushSessionContent)).To(MatchRegexp("CF_INSTANCE_PORTS=.*"))
Expect(string(pushSessionContent)).To(MatchRegexp("CF_STACK=.*"))
Expect(string(pushSessionContent)).To(MatchRegexp("VCAP_APPLICATION=.*"))
Expect(string(pushSessionContent)).To(MatchRegexp("VCAP_SERVICES=.*"))

// these vars are set to the empty string (use m flag to make $ match eol)
Expect(pushSessionContent).To(MatchRegexp("(?m)CF_INSTANCE_ADDR=$"))
Expect(pushSessionContent).To(MatchRegexp("(?m)CF_INSTANCE_PORT=$"))
Expect(string(pushSessionContent)).To(MatchRegexp("(?m)CF_INSTANCE_ADDR=$"))
Expect(string(pushSessionContent)).To(MatchRegexp("(?m)CF_INSTANCE_PORT=$"))
})

It("applies default environment variables while running apps and tasks", func() {
Expand Down

0 comments on commit 5bc8b9c

Please sign in to comment.