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.17] [Security Solution] Unskip tests for the prebuilt rules bootstrap endpoint (#205106) #205134

Merged
merged 2 commits into from
Dec 24, 2024

Conversation

banderror
Copy link
Contributor

Backport

This will backport the following commits from main to 8.17:

Questions ?

Please refer to the Backport tool documentation

…point (elastic#205106)

**Fixes: elastic#197108
**Fixes: elastic#202037
**Fixes: elastic#203632

## Summary

Builds on top of elastic#203799 and:

- simplifies the package deletion code (1 [API
call](https://www.elastic.co/docs/api/doc/kibana/operation/operation-delete-fleet-epm-packages-pkgname-pkgversion)
instead of 2, per package)
- adds retry logic
- refactors the testing utils a bit

Flaky test runs:

-
[ESS](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7632)
- 190 runs
-
[Serverless](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7633)
- 100 runs

## Details

Here's how the test logs look like:

```
 info Starting tests

 └-: Rules Management - Prebuilt Rules - Prebuilt Rules Management
   └-> "before all" hook: beforeTestSuite.trigger in "Rules Management - Prebuilt Rules - Prebuilt Rules Management"
   └-: @ess @serverless @skipInServerlessMKI Bootstrap Prebuilt Rules
     └-> "before all" hook: beforeTestSuite.trigger for "should install fleet packages required for detection engine to function"
     └-> should install fleet packages required for detection engine to function
       └-> "before each" hook: global before each for "should install fleet packages required for detection engine to function"
       └-> "before each" hook for "should install fleet packages required for detection engine to function"
         │ debg Deleting security_detection_engine package
         │ debg Deleted security_detection_engine package (was not installed) {
         │        statusCode: 400,
         │        error: 'Bad Request',
         │        message: 'security_detection_engine is not installed'
         │      }
         │ debg Deleting endpoint package
         │ debg Deleted endpoint package (was not installed) {
         │        statusCode: 400,
         │        error: 'Bad Request',
         │        message: 'endpoint is not installed'
         │      }
       └- ✓ pass  (21.6s)
     └-> should skip installing fleet packages if they are already installed
       └-> "before each" hook: global before each for "should skip installing fleet packages if they are already installed"
       └-> "before each" hook for "should skip installing fleet packages if they are already installed"
         │ debg Deleting security_detection_engine package
         │ debg Deleted security_detection_engine package (was installed)
         │ debg Deleting endpoint package
         │ debg Deleted endpoint package (was installed)
       └- ✓ pass  (22.4s)
     └-> "after all" hook: afterTestSuite.trigger for "should skip installing fleet packages if they are already installed"
   └-> "after all" hook: afterTestSuite.trigger in "Rules Management - Prebuilt Rules - Prebuilt Rules Management"

2 passing (1.0m)
```

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed

(cherry picked from commit 71144ed)

# Conflicts:
#	x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/management/trial_license_complete_tier/bootstrap_prebuilt_rules.ts
#	x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/rules/prebuilt_rules/delete_endpoint_fleet_package.ts
#	x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/rules/prebuilt_rules/delete_prebuilt_rules_fleet_package.ts
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

Copy link
Contributor

@nikitaindik nikitaindik left a comment

Choose a reason for hiding this comment

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

Changes are identical to the main PR. Approving!

@banderror banderror merged commit e2848c4 into elastic:8.17 Dec 24, 2024
8 checks passed
@banderror banderror deleted the backport/8.17/pr-205106 branch December 24, 2024 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants