Skip to content

Improve SAML tests resiliency to auto-formatting #48517

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

Merged

Conversation

pugnascotia
Copy link
Contributor

Backport of #48452.

The SAML tests have large XML documents within which various parameters
are replaced. At present, if these test are auto-formatted, the XML
documents get strung out over many, many lines, and are basically
illegible.

Fix this by using named placeholders for variables, and indent the
multiline XML documents.

The tests in SamlSpMetadataBuilderTests deserve a special mention,
because they include a number of certificates in Base64. I extracted
these into variables, for additional legibility.

The SAML tests have large XML documents within which various parameters
are replaced. At present, if these test are auto-formatted, the XML
documents get strung out over many, many lines, and are basically
illegible.

Fix this by using named placeholders for variables, and indent the
multiline XML documents.

The tests in `SamlSpMetadataBuilderTests` deserve a special mention,
because they include a number of certificates in Base64. I extracted
these into variables, for additional legibility.
@pugnascotia pugnascotia added :Security/Security Security issues without another label backport v7.6.0 labels Oct 25, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-security (:Security/Security)

@pugnascotia pugnascotia merged commit 30389c6 into elastic:7.x Oct 27, 2019
@pugnascotia pugnascotia deleted the formatting-fixes-security-saml-7-x branch October 27, 2019 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport :Security/Security Security issues without another label v7.6.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants