Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[8.x] [Security Solution] Unskip tests for the prebuilt rules bootstr…
…ap endpoint (#205106) (#205133) # Backport This will backport the following commits from `main` to `8.x`: - [[Security Solution] Unskip tests for the prebuilt rules bootstrap endpoint (#205106)](#205106) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Georgii Gorbachev","email":"georgii.gorbachev@elastic.co"},"sourceCommit":{"committedDate":"2024-12-24T09:58:37Z","message":"[Security Solution] Unskip tests for the prebuilt rules bootstrap endpoint (#205106)\n\n**Fixes: https://github.com/elastic/kibana/issues/197108**\r\n**Fixes: https://github.com/elastic/kibana/issues/202037**\r\n**Fixes: https://github.com/elastic/kibana/issues/203632**\r\n\r\n## Summary\r\n\r\nBuilds on top of #203799 and:\r\n\r\n- simplifies the package deletion code (1 [API\r\ncall](https://www.elastic.co/docs/api/doc/kibana/operation/operation-delete-fleet-epm-packages-pkgname-pkgversion)\r\ninstead of 2, per package)\r\n- adds retry logic\r\n- refactors the testing utils a bit\r\n\r\nFlaky test runs:\r\n\r\n-\r\n[ESS](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7632)\r\n- 190 runs\r\n-\r\n[Serverless](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7633)\r\n- 100 runs\r\n\r\n## Details\r\n\r\nHere's how the test logs look like:\r\n\r\n```\r\n info Starting tests\r\n\r\n └-: Rules Management - Prebuilt Rules - Prebuilt Rules Management\r\n └-> \"before all\" hook: beforeTestSuite.trigger in \"Rules Management - Prebuilt Rules - Prebuilt Rules Management\"\r\n └-: @ess @serverless @skipInServerlessMKI Bootstrap Prebuilt Rules\r\n └-> \"before all\" hook: beforeTestSuite.trigger for \"should install fleet packages required for detection engine to function\"\r\n └-> should install fleet packages required for detection engine to function\r\n └-> \"before each\" hook: global before each for \"should install fleet packages required for detection engine to function\"\r\n └-> \"before each\" hook for \"should install fleet packages required for detection engine to function\"\r\n │ debg Deleting security_detection_engine package\r\n │ debg Deleted security_detection_engine package (was not installed) {\r\n │ statusCode: 400,\r\n │ error: 'Bad Request',\r\n │ message: 'security_detection_engine is not installed'\r\n │ }\r\n │ debg Deleting endpoint package\r\n │ debg Deleted endpoint package (was not installed) {\r\n │ statusCode: 400,\r\n │ error: 'Bad Request',\r\n │ message: 'endpoint is not installed'\r\n │ }\r\n └- ✓ pass (21.6s)\r\n └-> should skip installing fleet packages if they are already installed\r\n └-> \"before each\" hook: global before each for \"should skip installing fleet packages if they are already installed\"\r\n └-> \"before each\" hook for \"should skip installing fleet packages if they are already installed\"\r\n │ debg Deleting security_detection_engine package\r\n │ debg Deleted security_detection_engine package (was installed)\r\n │ debg Deleting endpoint package\r\n │ debg Deleted endpoint package (was installed)\r\n └- ✓ pass (22.4s)\r\n └-> \"after all\" hook: afterTestSuite.trigger for \"should skip installing fleet packages if they are already installed\"\r\n └-> \"after all\" hook: afterTestSuite.trigger in \"Rules Management - Prebuilt Rules - Prebuilt Rules Management\"\r\n\r\n2 passing (1.0m)\r\n```\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [x] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed","sha":"71144eded7f56705e54c768c3741e5fcf1b62f9a","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["test","release_note:skip","v9.0.0","Team:Detections and Resp","Team: SecuritySolution","Team:Detection Rule Management","Feature:Prebuilt Detection Rules","backport:version","v8.18.0","v8.16.3","v8.17.1"],"number":205106,"url":"https://github.com/elastic/kibana/pull/205106","mergeCommit":{"message":"[Security Solution] Unskip tests for the prebuilt rules bootstrap endpoint (#205106)\n\n**Fixes: https://github.com/elastic/kibana/issues/197108**\r\n**Fixes: https://github.com/elastic/kibana/issues/202037**\r\n**Fixes: https://github.com/elastic/kibana/issues/203632**\r\n\r\n## Summary\r\n\r\nBuilds on top of #203799 and:\r\n\r\n- simplifies the package deletion code (1 [API\r\ncall](https://www.elastic.co/docs/api/doc/kibana/operation/operation-delete-fleet-epm-packages-pkgname-pkgversion)\r\ninstead of 2, per package)\r\n- adds retry logic\r\n- refactors the testing utils a bit\r\n\r\nFlaky test runs:\r\n\r\n-\r\n[ESS](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7632)\r\n- 190 runs\r\n-\r\n[Serverless](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7633)\r\n- 100 runs\r\n\r\n## Details\r\n\r\nHere's how the test logs look like:\r\n\r\n```\r\n info Starting tests\r\n\r\n └-: Rules Management - Prebuilt Rules - Prebuilt Rules Management\r\n └-> \"before all\" hook: beforeTestSuite.trigger in \"Rules Management - Prebuilt Rules - Prebuilt Rules Management\"\r\n └-: @ess @serverless @skipInServerlessMKI Bootstrap Prebuilt Rules\r\n └-> \"before all\" hook: beforeTestSuite.trigger for \"should install fleet packages required for detection engine to function\"\r\n └-> should install fleet packages required for detection engine to function\r\n └-> \"before each\" hook: global before each for \"should install fleet packages required for detection engine to function\"\r\n └-> \"before each\" hook for \"should install fleet packages required for detection engine to function\"\r\n │ debg Deleting security_detection_engine package\r\n │ debg Deleted security_detection_engine package (was not installed) {\r\n │ statusCode: 400,\r\n │ error: 'Bad Request',\r\n │ message: 'security_detection_engine is not installed'\r\n │ }\r\n │ debg Deleting endpoint package\r\n │ debg Deleted endpoint package (was not installed) {\r\n │ statusCode: 400,\r\n │ error: 'Bad Request',\r\n │ message: 'endpoint is not installed'\r\n │ }\r\n └- ✓ pass (21.6s)\r\n └-> should skip installing fleet packages if they are already installed\r\n └-> \"before each\" hook: global before each for \"should skip installing fleet packages if they are already installed\"\r\n └-> \"before each\" hook for \"should skip installing fleet packages if they are already installed\"\r\n │ debg Deleting security_detection_engine package\r\n │ debg Deleted security_detection_engine package (was installed)\r\n │ debg Deleting endpoint package\r\n │ debg Deleted endpoint package (was installed)\r\n └- ✓ pass (22.4s)\r\n └-> \"after all\" hook: afterTestSuite.trigger for \"should skip installing fleet packages if they are already installed\"\r\n └-> \"after all\" hook: afterTestSuite.trigger in \"Rules Management - Prebuilt Rules - Prebuilt Rules Management\"\r\n\r\n2 passing (1.0m)\r\n```\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [x] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed","sha":"71144eded7f56705e54c768c3741e5fcf1b62f9a"}},"sourceBranch":"main","suggestedTargetBranches":["8.x","8.16","8.17"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/205106","number":205106,"mergeCommit":{"message":"[Security Solution] Unskip tests for the prebuilt rules bootstrap endpoint (#205106)\n\n**Fixes: https://github.com/elastic/kibana/issues/197108**\r\n**Fixes: https://github.com/elastic/kibana/issues/202037**\r\n**Fixes: https://github.com/elastic/kibana/issues/203632**\r\n\r\n## Summary\r\n\r\nBuilds on top of #203799 and:\r\n\r\n- simplifies the package deletion code (1 [API\r\ncall](https://www.elastic.co/docs/api/doc/kibana/operation/operation-delete-fleet-epm-packages-pkgname-pkgversion)\r\ninstead of 2, per package)\r\n- adds retry logic\r\n- refactors the testing utils a bit\r\n\r\nFlaky test runs:\r\n\r\n-\r\n[ESS](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7632)\r\n- 190 runs\r\n-\r\n[Serverless](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7633)\r\n- 100 runs\r\n\r\n## Details\r\n\r\nHere's how the test logs look like:\r\n\r\n```\r\n info Starting tests\r\n\r\n └-: Rules Management - Prebuilt Rules - Prebuilt Rules Management\r\n └-> \"before all\" hook: beforeTestSuite.trigger in \"Rules Management - Prebuilt Rules - Prebuilt Rules Management\"\r\n └-: @ess @serverless @skipInServerlessMKI Bootstrap Prebuilt Rules\r\n └-> \"before all\" hook: beforeTestSuite.trigger for \"should install fleet packages required for detection engine to function\"\r\n └-> should install fleet packages required for detection engine to function\r\n └-> \"before each\" hook: global before each for \"should install fleet packages required for detection engine to function\"\r\n └-> \"before each\" hook for \"should install fleet packages required for detection engine to function\"\r\n │ debg Deleting security_detection_engine package\r\n │ debg Deleted security_detection_engine package (was not installed) {\r\n │ statusCode: 400,\r\n │ error: 'Bad Request',\r\n │ message: 'security_detection_engine is not installed'\r\n │ }\r\n │ debg Deleting endpoint package\r\n │ debg Deleted endpoint package (was not installed) {\r\n │ statusCode: 400,\r\n │ error: 'Bad Request',\r\n │ message: 'endpoint is not installed'\r\n │ }\r\n └- ✓ pass (21.6s)\r\n └-> should skip installing fleet packages if they are already installed\r\n └-> \"before each\" hook: global before each for \"should skip installing fleet packages if they are already installed\"\r\n └-> \"before each\" hook for \"should skip installing fleet packages if they are already installed\"\r\n │ debg Deleting security_detection_engine package\r\n │ debg Deleted security_detection_engine package (was installed)\r\n │ debg Deleting endpoint package\r\n │ debg Deleted endpoint package (was installed)\r\n └- ✓ pass (22.4s)\r\n └-> \"after all\" hook: afterTestSuite.trigger for \"should skip installing fleet packages if they are already installed\"\r\n └-> \"after all\" hook: afterTestSuite.trigger in \"Rules Management - Prebuilt Rules - Prebuilt Rules Management\"\r\n\r\n2 passing (1.0m)\r\n```\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [x] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed","sha":"71144eded7f56705e54c768c3741e5fcf1b62f9a"}},{"branch":"8.x","label":"v8.18.0","labelRegex":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.16","label":"v8.16.3","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.17","label":"v8.17.1","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT-->
- Loading branch information