Skip to content

[Test] Ensure correct randomization for API key metadata#86218

Merged
elasticsearchmachine merged 2 commits intoelastic:masterfrom
ywangd:es-86211
Apr 27, 2022
Merged

[Test] Ensure correct randomization for API key metadata#86218
elasticsearchmachine merged 2 commits intoelastic:masterfrom
ywangd:es-86211

Conversation

@ywangd
Copy link
Copy Markdown
Member

@ywangd ywangd commented Apr 27, 2022

Similar to #86188, the test failure #86211 is also caused by incorrect
randomziation due to refactoring.
In this case, the API metadata was expected to be null in some cases.
This PR fixes it by ensuring the correct randomisation.

Resolves: #86211

Similar to elastic#86188, the test failure elastic#86211 is caused by incorrect
randomziation. In this case, the API metadata was expected to be null
in some cases. This PR fixes it by ensuring the correct randomisation.

Resolves: elastic#86211
@ywangd ywangd added >test Issues or PRs that are addressing/adding tests :Security/Security Security issues without another label v8.3.0 labels Apr 27, 2022
@ywangd ywangd requested a review from n1v0lg April 27, 2022 11:51
@elasticmachine elasticmachine added the Team:Security Meta label for security team label Apr 27, 2022
@elasticmachine
Copy link
Copy Markdown
Collaborator

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

Copy link
Copy Markdown
Contributor

@n1v0lg n1v0lg left a comment

Choose a reason for hiding this comment

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

@ywangd
Copy link
Copy Markdown
Member Author

ywangd commented Apr 27, 2022

I think SetSecurityUserProcessorTests::testApiKeyPopulation might have the same issue here:

Absolutely! Excellent find, thanks! I pushed the fix as part of this PR as well.

@n1v0lg
Copy link
Copy Markdown
Contributor

n1v0lg commented Apr 27, 2022

👍 ship it!

@ywangd ywangd added the auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) label Apr 27, 2022
@elasticsearchmachine elasticsearchmachine merged commit ea07e9d into elastic:master Apr 27, 2022
@ywangd ywangd deleted the es-86211 branch April 27, 2022 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) :Security/Security Security issues without another label Team:Security Meta label for security team >test Issues or PRs that are addressing/adding tests v8.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CI] ApiKeyServiceTests testGetApiKeyMetadata failing

4 participants