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

[8.11] [Security Solution] Install/Update Prebuilt Rules Test Implementation refactor (#165488) #169129

Merged
merged 1 commit into from
Oct 17, 2023

Conversation

jpdjere
Copy link
Contributor

@jpdjere jpdjere commented Oct 17, 2023

Backport

This will backport the following commits from main to 8.11:

Questions ?

Please refer to the Backport tool documentation

… refactor (elastic#165488)

Fixes: elastic#148192

(Tick the two open checkboxes in that issue when merging this PR)

## Summary

This PR rewrites/refactors Cypress tests for the Installation and
Upgrade of Prebuilt Rules implemented in
elastic#161687. Most of the changes here
address feedback received in that PR - answered those comments there.

- RBAC/Authorization: adds tests scenarios for users with full
privileges (happy path)
- Gets rid of huge util helpers such as
`assertRuleAvailableForInstallAndInstallOne` and rewrites test cases in
a more descriptive way, with step by step actions.
- Gets rid of complex logic in tests and their helpers - removing
if/else logic within them and removing optional flags passed to helpers.
- Fixes `bulkCreateRuleAssets` util and uses it in other helpers to
install multiple `security-rule` assets with a single bulk request to
ES.

Additionally: checked `installation_and_upgrade.md` test plan to make
sure it matches with the test in place. Added
[link](elastic#166215) to a ticket for
a to-do task for the sections:
- Rule installation workflow: filtering, sorting, pagination
- Rule upgrade workflow: filtering, sorting, pagination

## Flaky test runner

~~https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3420~~
~~🟢~~

https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3513

---------

Co-authored-by: kibanamachine <[email protected]>
(cherry picked from commit 24c008b)

# Conflicts:
#	x-pack/test/security_solution_cypress/package.json
@jpdjere jpdjere enabled auto-merge (squash) October 17, 2023 15:40
@jpdjere jpdjere disabled auto-merge October 17, 2023 15:40
@jpdjere jpdjere requested a review from maximpn October 17, 2023 15:45
@jpdjere jpdjere self-assigned this Oct 17, 2023
@jpdjere jpdjere added Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Detection Rule Management Security Detection Rule Management Team labels Oct 17, 2023
@elasticmachine
Copy link
Contributor

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

@elasticmachine
Copy link
Contributor

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

@jpdjere jpdjere added test Feature:Prebuilt Detection Rules Security Solution Prebuilt Detection Rules release_note:skip Skip the PR/issue when compiling release notes labels Oct 17, 2023
@kibana-ci
Copy link
Collaborator

kibana-ci commented Oct 17, 2023

💔 Build Failed

Failed CI Steps

Test Failures

  • [job] [logs] Security Solution Cypress Tests #9 / Ransomware Detection Alerts Ransomware in Timelines Renders ransomware entries in timelines table Renders ransomware entries in timelines table

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
securitySolution 13.0MB 13.0MB +198.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @jpdjere

@jpdjere jpdjere merged commit 2849d3f into elastic:8.11 Oct 17, 2023
37 of 39 checks passed
@jpdjere jpdjere deleted the backport/8.11/pr-165488 branch October 17, 2023 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Feature:Prebuilt Detection Rules Security Solution Prebuilt Detection Rules release_note:skip Skip the PR/issue when compiling release notes 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants