Skip to content

[Policy tests] Add suffix to agent and package policies to avoid collisions#3118

Merged
mrodm merged 2 commits intoelastic:mainfrom
mrodm:add_random_suffix_policy_tests
Nov 27, 2025
Merged

[Policy tests] Add suffix to agent and package policies to avoid collisions#3118
mrodm merged 2 commits intoelastic:mainfrom
mrodm:add_random_suffix_policy_tests

Conversation

@mrodm
Copy link
Contributor

@mrodm mrodm commented Nov 27, 2025

Currently, there could be policy tests creating agent policies and package policies with the same names.

All these tests are run sequentially. However, if any of those policy test fail deleting the resources (e.g. agent policy), the next policy tests would fail creating the agent policy since that policy already exists. Example of this failure:

This PR adds a random suffix to the Agent policy and Package policies to avoid those collisions.

@mrodm mrodm self-assigned this Nov 27, 2025
@mrodm mrodm requested a review from a team November 27, 2025 13:06
@mrodm mrodm marked this pull request as ready for review November 27, 2025 13:06
@elasticmachine
Copy link
Collaborator

elasticmachine commented Nov 27, 2025

💔 Build Failed

Failed CI Steps

History

cc @mrodm

Copy link
Member

@jsoriano jsoriano left a comment

Choose a reason for hiding this comment

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

Good one, thanks!

@mrodm mrodm merged commit a6d7b59 into elastic:main Nov 27, 2025
3 checks passed
@mrodm mrodm deleted the add_random_suffix_policy_tests branch November 27, 2025 17:10
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.

3 participants