Skip to content

[8.18] [Security Solution] Refactor prebuilt rules integration tests (#219831)#226385

Merged
maximpn merged 1 commit intoelastic:8.18from
maximpn:backport/8.18/pr-219831
Jul 3, 2025
Merged

[8.18] [Security Solution] Refactor prebuilt rules integration tests (#219831)#226385
maximpn merged 1 commit intoelastic:8.18from
maximpn:backport/8.18/pr-219831

Conversation

@maximpn
Copy link
Contributor

@maximpn maximpn commented Jul 3, 2025

Backport

This will backport the following commits from main to 8.18:

Questions ?

Please refer to the Backport tool documentation

…c#219831)

**Related Epic:** elastic#179907

## Summary

This PR refactors prebuilt rules integration tests structure to streamline the implementation of test plans targeted [Prebuilt Rules Customization Milestone 4](elastic#179907).

## Details

Existing integration tests structure have prebuilt rules related integration tests scattered around rules management area. Due to historical reasons and pace of the prebuilt rules customization development some old tests were updated, some new were added as random spots as well as some new tests structure was suggested.

This PR moves files and some tests around to the following structure

- `test_suites/detection_response/rules_management/prebuilt_rules` is the root folder for prebuilt rules related integration tests
- `customization_disabled` subfolder contains prebuilt rules integration tests covering scenarios when users have **insufficient** for customization license level (basic/essentials)
- `customization_enabled` subfolder contains  prebuilt rules integration tests covering scenarios when users have **sufficient** for customization license level
- `customization_disabled` and `customization_enabled` subfoldera have test suites grouped by sub domains
  - `prebuilt_rules_package` - contains integration tests related to detection rules Fleet package installation and updating, bootstrap is also belong to here
  - `install_prebuilt_rules` - contains tests related to prebuilt rules installation from prebuilt rule assets
  - `upgrade_prebuilt_rules` - contains tests related to prebuilt rules upgrade workflow
  - `customization` - contains tests related to prebuilt rules customization including `is_customized` calculation
  - `import_export` - contains tests related to exporting and importing customized and non-customized prebuilt rules
  - `status` - contain status endpoints related tests

(cherry picked from commit 3ea69af)

# Conflicts:
#	.buildkite/ftr_security_serverless_configs.yml
#	x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/customization_enabled/prebuilt_rules_package/index.ts
#	x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/prebuilt_rule_customization/customization_enabled/is_customized_calculation.ts
@maximpn maximpn requested a review from kibanamachine as a code owner July 3, 2025 10:44
@maximpn maximpn added the backport This PR is a backport of another PR label Jul 3, 2025
@maximpn maximpn enabled auto-merge (squash) July 3, 2025 10:44
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

@maximpn maximpn merged commit df366cf into elastic:8.18 Jul 3, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants