Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"SSO Lifecycle" tests obscure error from broker ApiInfoUrl #1017

Open
peterhaochen47 opened this issue Jan 2, 2024 · 0 comments
Open

"SSO Lifecycle" tests obscure error from broker ApiInfoUrl #1017

peterhaochen47 opened this issue Jan 2, 2024 · 0 comments

Comments

@peterhaochen47
Copy link
Member

peterhaochen47 commented Jan 2, 2024

A "debugg-ability" issue.

current state

The failure we see in test output is:

  [FAILED] Expected
      <int>: 3
  to match exit code:
      <int>: 0
  In [BeforeEach] at: /go/src/github.com/cloudfoundry/cf-acceptance-tests/helpers/services/sso.go:46

Which corresponds to a non-zero exit code when curling the api info url. However, this is misleading. When we print out what the api info url is:

fmt.Println("apiInfoEndpoint is: ", apiInfoEndpoint)

right before a failed curl. We see that the value of apiInfoEndpoint is:

apiInfoEndpoint is:  http://{
    "error": true,
    "message": "undefined method `empty?' for nil:NilClass",
    "path": "http://cats-1-brkr-0007082c607e17d8.uaa-acceptance.cf-app.com/cf_api_info_url",
    "timestamp": "2024-01-02 15:56:42 +0000",
    "type": "500",
    "backtrace": [
     ...

As a comparison, right before a successful curl. The value of apiInfoEndpoint is: http://api.xxx.cf-app.com/v2/info.

This shows that an error from earlier code path was not caught.

After tracing backward the code path, we suspect that this code somehow is not able to detect an error. Is it an issue in http.Client or in the broker's /cf_api_info_url endpoint?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant