Skip to content
New issue

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

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

Already on GitHub? # to your account

Fix: 404 expectations for custom router error pages #930

Merged
merged 1 commit into from
Oct 13, 2023

Conversation

ctlong
Copy link
Member

@ctlong ctlong commented Sep 14, 2023

Are you submitting this PR against the develop branch?

Yes

What is this change about?

Our helpers only return response bodies, not response statuses. This means that if we want to check for a 404 error, for instance, we need to check the body for a 404 error. However, some operators override their router's error pages, which break our expectations, if they're too specific.

This makes our 404 expectations less specific by reducing our assumptions about the error page returned from "it contains 404 Not Found", to "it contains 404". The latter seems like a pretty safe assumption to make.

Please provide contextual information.

Closes #929

What version of cf-deployment have you run this cf-acceptance-test change against?

None yet

Please check all that apply for this PR:

  • introduces a new test --- Are you sure everyone should be running this test?
  • changes an existing test
  • requires an update to a CATs integration-config

Did you update the README as appropriate for this change?

  • YES
  • N/A

If you are introducing a new acceptance test, what is your rationale for including it CATs rather than your own acceptance test suite?

N/A

How many more (or fewer) seconds of runtime will this change introduce to CATs?

None

What is the level of urgency for publishing this change?

  • Urgent - unblocks current or future work
  • Slightly Less than Urgent

Tag your pair, your PM, and/or team!

None

In case operators are overriding their router's error pages, we should
not check for a specific string. However, the presence of "404" on a 404
error page is probably a safe assumption to make.
@ctlong ctlong marked this pull request as ready for review October 12, 2023 16:12
@ctlong ctlong requested a review from a team October 12, 2023 16:12
@ctlong ctlong merged commit e4d6058 into develop Oct 13, 2023
@ctlong ctlong deleted the fix/404-expectations branch October 13, 2023 17:34
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issue with customised router status page and new readiness_heathcheck tests
2 participants