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

fix: ErrorRoutingIT test #2977

Merged
merged 2 commits into from
Jul 23, 2024
Merged

Conversation

peterhaochen47
Copy link
Member

@peterhaochen47 peterhaochen47 commented Jul 23, 2024

See commit messages.

- correct the order of actual vs. expected, such that
the test failure message is correct
- before this commit, the failure message is:
```
java.lang.AssertionError: Check status code from /error429 is 200 expected:<429> but was:<200>
```
which is not correct
@peterhaochen47 peterhaochen47 requested a review from a team July 23, 2024 17:57
- the test is intended to access /error429 as a browser would
and expects a 200 response (due to this request mapping:
https://github.com/cloudfoundry/uaa/blob/0a28b5c5aa33c68a5cdb20f23812d5187135b4a8/server/src/main/java/org/cloudfoundry/identity/uaa/home/HomeController.java#L155 and NOT https://github.com/cloudfoundry/uaa/blob/0a28b5c5aa33c68a5cdb20f23812d5187135b4a8/server/src/main/java/org/cloudfoundry/identity/uaa/home/HomeController.java#L144)

- however, in some environments where this test is run, the test
does not access the /error429 like a browser would (e.g. does not
have the request header "Accept: text/html" by default), so explictly
adding this header to the test setup to better emulate a browser
request
@peterhaochen47 peterhaochen47 changed the title fix: ErrorRoutingIT test failure message fix: ErrorRoutingIT test Jul 23, 2024
@strehle strehle merged commit e96fac7 into develop Jul 23, 2024
22 checks passed
@strehle strehle deleted the pr/fix-ErrorRoutingIT-expected-actual-order branch July 23, 2024 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

2 participants