-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Security Solution] Updates test plans for importing and exporting prebuilt rules #204889
base: main
Are you sure you want to change the base?
Conversation
Pinging @elastic/security-detections-response (Team:Detections and Resp) |
Pinging @elastic/security-solution (Team: SecuritySolution) |
Pinging @elastic/security-detection-rule-management (Team:Detection Rule Management) |
@pborgonovi Please review this one |
...ins/security_solution/docs/testing/test_plans/detection_response/prebuilt_rules/exporting.md
Outdated
Show resolved
Hide resolved
...ins/security_solution/docs/testing/test_plans/detection_response/prebuilt_rules/importing.md
Outdated
Show resolved
Hide resolved
...ins/security_solution/docs/testing/test_plans/detection_response/prebuilt_rules/importing.md
Outdated
Show resolved
Hide resolved
...ins/security_solution/docs/testing/test_plans/detection_response/prebuilt_rules/exporting.md
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR @dplumlee! Nice work! 👍
I have reviewed and can confirm that most of the cases from the ticket are covered. However, I couldn’t find explicit test cases for these:
- Converting custom rules to prebuilt rules on upgrade
- Users can import custom rules with rule_id equal to that of a not-installed prebuilt rule (issue)
- Incorrect is_customized Value on Re-Import of Non-Customized Prebuilt Rule (issue)
I also left a few comments. Whenever you have time, please take a look
This was one of the bugs related to the missing base version so I believe it'd be covered by the first scenario:
For this one, I'm not sure what the expected action should be? (failing, changing
For this one did you mean customized rules? If so, I can add that - I think it'd be good to add a similar test in the rule upgrade test plan as well |
...ins/security_solution/docs/testing/test_plans/detection_response/prebuilt_rules/exporting.md
Show resolved
Hide resolved
...ins/security_solution/docs/testing/test_plans/detection_response/prebuilt_rules/importing.md
Show resolved
Hide resolved
Given the import payload contains a custom rule with a matching rule_id and version | ||
And the overwrite flag is set to true | ||
When the user imports the rule | ||
Then the rule should be created or updated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If imported custom rule has rule_id
and version
that match the currently installed rule, then it's already created and has to be updated. Is my understanding correct? If yes, then I think we can remove the mention of "created".
```Gherkin | ||
Given the import payload contains a prebuilt rule with a matching rule_id but no matching version | ||
And the overwrite flag is set to true | ||
When the user imports the rule | ||
Then the rule should be created or updated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps here it should be just "created", without "updated"
Summary
Addresses #202079
Updates the existing import and export rule test plans to include front end tests as well as more exhaustive coverage of the prebuilt rule customization milestone 3 epic