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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve PIV CSP test assertion for order independence #10355

Merged
merged 1 commit into from
Apr 3, 2024

Conversation

aduth
Copy link
Member

@aduth aduth commented Apr 3, 2024

馃洜 Summary of changes

Improve PIV CSP test assertion for order independence, to resolve a flakey test.

Example: https://gitlab.login.gov/lg/identity-idp/-/jobs/1114999

The issue is that the previous assertion assumed that the form-action directive would never occur last and therefore always be suffixed with ;. This doesn't appear to always be deterministic. The solution is to split the directives by the semi-colon joiner, which also preserves the expectation that the form-action value only includes the asserted text.

馃摐 Testing Plan

rspec spec/features/users/piv_cac_management_spec.rb:18

changelog: Internal, Automated Testing, Resolve flakey test failures for PIV CSP assertions
@aduth aduth requested a review from mitchellhenke April 3, 2024 15:20
@aduth aduth merged commit 3b1dbf1 into main Apr 3, 2024
2 checks passed
@aduth aduth deleted the aduth-csp-spec-order-independent branch April 3, 2024 15:50
@aduth aduth mentioned this pull request Apr 4, 2024
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.

None yet

2 participants