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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Security Solution] Tests for prebuilt rule upgrade workflow #202078

Open
5 tasks
Tracked by #174168
banderror opened this issue Nov 27, 2024 · 5 comments
Open
5 tasks
Tracked by #174168

[Security Solution] Tests for prebuilt rule upgrade workflow #202078

banderror opened this issue Nov 27, 2024 · 5 comments
Assignees
Labels
8.18 candidate Feature:Prebuilt Detection Rules Security Solution Prebuilt Detection Rules area Team:Detection Rule Management Security Detection Rule Management Team Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. test test-coverage issues & PRs for improving code test coverage test-plan v8.18.0

Comments

@banderror
Copy link
Contributor

banderror commented Nov 27, 2024

Epics: https://github.com/elastic/security-team/issues/1974 (internal), #174168

Summary

Write test plans (one or a few) and create a comprehensive suite of automated tests for the workflow of upgrading prebuilt rules.

Features to cover:

  • API: upgrade/_review and upgrade/_perform endpoints
  • Upgrading prebuilt rules one-by-one with preview (Rule Upgrade flyout)
    • Non-conflicts, solvable conflicts, non-solvable conflicts
    • Diffs and diff options
    • Suggesting merged versions
    • Editing and accepting changes to the Final version
    • Callouts
    • Validation
    • State persistence
    • Upgrading and saving changes
    • Anything else?
  • Upgrading prebuilt rules one-by-one without preview (Rule Updates table)
  • Upgrading prebuilt rules in bulk (Rule Updates table)
  • Upgrading rule fields - per each rule field - via API and UI
    • name
    • description
    • etc - I feel that we need to cover literally every rule field
  • Specific and edge cases
    • Type changes on upgrade
    • Missing base versions
    • Race conditions and Optimistic Concurrency Control

Please cover both the features under the feature flag turned ON and OFF.

Related tickets

Related functional tickets to cover with tests:

Related bugs to cover with tests:

TODO

  • Come up with a plan for working on this ticket and share with the team
  • Test plans
    • PR link
  • Test coverage
    • PR link
@banderror banderror added 8.18 candidate Feature:Prebuilt Detection Rules Security Solution Prebuilt Detection Rules area Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Detection Rule Management Security Detection Rule Management Team Team:Detections and Resp Security Detection Response Team test test-coverage issues & PRs for improving code test coverage test-plan labels Nov 27, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-detections-response (Team:Detections and Resp)

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-detection-rule-management (Team:Detection Rule Management)

@banderror banderror changed the title [Security Solution] Tests for prebuilt rule upgrade workflow (DRAFT) [Security Solution] Tests for prebuilt rule upgrade workflow Nov 27, 2024
@banderror
Copy link
Contributor Author

@jpdjere @maximpn @nikitaindik

I'd suggest us to split the work on the upgrade test coverage between @maximpn and @jpdjere. Considering the fact that @maximpn and @nikitaindik are busy with finalizing the ThreeWayDiff UI and fixing bugs in it, maybe @jpdjere could address most of this ticket, especially because he is very familiar with the requirements.

Let's sync up on it when @jpdjere is back next week.

@banderror
Copy link
Contributor Author

cc @pborgonovi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.18 candidate Feature:Prebuilt Detection Rules Security Solution Prebuilt Detection Rules area Team:Detection Rule Management Security Detection Rule Management Team Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. test test-coverage issues & PRs for improving code test coverage test-plan v8.18.0
Projects
None yet
Development

No branches or pull requests

4 participants