Skip to content

CDA-142: Adding integration test for OVERRIDE_PROTECTION flag in gate changes. - #1997

Draft
RyanM-RMA wants to merge 4 commits into
USACE:developfrom
RyanM-RMA:bugfix/gate_change_integration_test
Draft

RyanM-RMA wants to merge 4 commits into
USACE:developfrom
RyanM-RMA:bugfix/gate_change_integration_test

Conversation

@RyanM-RMA

Copy link
Copy Markdown
Collaborator

Summary

Adding unit test for OVERRIDE_PROTECTION flag in gate changes. This PR is an example of an unexpected failure of the DB.

Related Issue

Related to #1906
Related to PR #1992

Validation

Validated through running the unit test

Checklist

  • AI tools used

@RyanM-RMA RyanM-RMA changed the title Adding integration test for OVERRIDE_PROTECTION flag in gate changes. CDA-142: Adding integration test for OVERRIDE_PROTECTION flag in gate changes. Oct 8, 2026
@read-the-docs-community

read-the-docs-community Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Documentation build overview

📚 CWMS-Data-APi | 🛠️ Build #35479889 | 📁 Comparing 233465e against latest (de2397c)

  🔍 Preview build  

No files changed.

@RyanM-RMA
RyanM-RMA force-pushed the bugfix/gate_change_integration_test branch 2 times, most recently from 0a884f2 to 541aa0a Compare October 8, 2026 17:29
.then()
.log().ifValidationFails(LogDetail.ALL, true)
.assertThat()
.statusCode(not(HttpServletResponse.SC_CREATED));

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add check here that real mutation occurred.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No mutation is expected. I could switch it over to is(SC_BAD_REQUEST) so it's more obvious. I wasn't sure what the exact code is supposed to be, just that it's not SC_CREATED since that's the OK response.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, should be checking it DID NOT* occur. We should verify that the data wasn't actually mutated here, in case things fail silently.

@rma-bryson rma-bryson Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that would just be a retrieval before this status code assertion to ensure the original data is what we get back, not the updated data.... or a separate test that doesn't check the status code, and just does the subsequent retrieval to ensure its the original data.

This branch has not been deployed

No deployments
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

Successfully merging this pull request may close these issues.

2 participants