Skip to content

Commit

Permalink
fix: /info docs test expectation
Browse files Browse the repository at this point in the history
- the value of "idpDefinitions.*" of /info response is in reality
a String, not an array. Here is how it looks like:
```
 "idpDefinitions": {
    "testsaml-redirect-binding": "http://localhost:8080/uaa/saml/discovery?returnIDParam=idp&entityID=cloudfoundry-saml-login&idp=testsaml-redirect-binding&isPassive=true",
    "testsaml-post-binding": "http://localhost:8080/uaa/saml/discovery?returnIDParam=idp&entityID=cloudfoundry-saml-login&idp=testsaml-post-binding&isPassive=true"
  },
```
which is consistent with the description of "idpDefinitions" field: "A
list of alias/url pairs of SAML IDP providers configured. Each url is
the starting point to initiate the authentication process for the SAML
identity provider."

- previously, this test is passing only because the test uaa.yml used
in this test contains no IDP configs; but once you input some valid IDP
configs, this test would fail since the value is actually a String.

- also clarify the description text
  • Loading branch information
peterhaochen47 committed May 10, 2024
1 parent 74e26cb commit 4aea801
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ void info_endpoint_for_json() throws Exception {
fieldWithPath("commit_id").type(STRING).description("The GIT sha for the UAA version"),
fieldWithPath("timestamp").type(STRING).description("JSON timestamp for the commit of the UAA version"),
fieldWithPath("idpDefinitions").optional().type(OBJECT).description("A list of alias/url pairs of SAML IDP providers configured. Each url is the starting point to initiate the authentication process for the SAML identity provider."),
fieldWithPath("idpDefinitions.*").optional().type(ARRAY).description("A list of alias/url pairs of SAML IDP providers configured. Each url is the starting point to initiate the authentication process for the SAML identity provider."),
fieldWithPath("idpDefinitions.*").optional().type(STRING).description("The URL to initiate the authentication process for the SAML identity provider."),
fieldWithPath("links").type(OBJECT).description("A list of alias/url pairs of configured action URLs for the UAA"),
fieldWithPath("links.login").type(STRING).description("The link to the login host alias of the UAA"),
fieldWithPath("links.uaa").type(STRING).description("The link to the uaa alias host of the UAA"),
Expand Down

0 comments on commit 4aea801

Please sign in to comment.