Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
Somehow the GitHub tests were successful in the past, although there
should have been the following errors:
```
Summarizing 6 Failures:

[Fail] Extensions fetching applications [It] no error occurs
/Users/robertgogolok/workspace/cf_exporter/vendor/github.com/onsi/gomega/ghttp/handlers.go:48

[Fail] Extensions fetching tasks [It] no error occurs
/Users/robertgogolok/workspace/cf_exporter/vendor/github.com/onsi/gomega/ghttp/handlers.go:48

[Fail] Extensions fetching org quotas [It] no error occurs
/Users/robertgogolok/workspace/cf_exporter/vendor/github.com/onsi/gomega/ghttp/handlers.go:48

[Fail] Extensions fetching space quotas [It] no error occurs
/Users/robertgogolok/workspace/cf_exporter/vendor/github.com/onsi/gomega/ghttp/handlers.go:48

[Fail] Extensions fetching space summary [It] no error occurs
/Users/robertgogolok/workspace/cf_exporter/vendor/github.com/onsi/gomega/ghttp/handlers.go:48

[Fail] Extensions fetching app events [It] no error occurs
/Users/robertgogolok/workspace/cf_exporter/vendor/github.com/onsi/gomega/ghttp/handlers.go:48
```

The /oauth/token endpoint is being hit 3 times in a row.
  • Loading branch information
gogolok authored and benjaminguttmann-avtq committed Sep 9, 2023
1 parent 2246f6c commit 25bffe3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions fetcher/sessionext_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,13 @@ var _ = Describe("Extensions", func() {
),
)

server.AppendHandlers(
ghttp.CombineHandlers(
ghttp.VerifyRequest("POST", "/oauth/token"),
ghttp.RespondWith(http.StatusOK, tokenResponse),
),
)

config = &CFConfig{
URL: server.URL(),
ClientID: "fake",
Expand Down

0 comments on commit 25bffe3

Please sign in to comment.