[9.1] [Security Solution] Remove duplicated services used in integration tests (#235221)#236594
Merged
nikitaindik merged 1 commit intoelastic:9.1from Sep 26, 2025
Merged
Conversation
…sts (elastic#235221) **Partially addresses: elastic#234642 ## Summary Recent Sustainable Kibana Architecture PR elastic#231416 introduced duplicate copies of SuperTest services used in Security Solution API integration tests. This PR removes those duplicates by extracting the services into a `@kbn/security-solution-test-api-clients` package, making them reusable across the Security Solution codebase. The duplicated services were previously located in: - `x-pack/solutions/security/test/api_integration/services/` - `x-pack/solutions/security/test/security_solution_api_integration/config/services/` - `x-pack/solutions/security/test/functional/services/` ## Changes - Extracted services into a new `@kbn/security-solution-test-api-clients` package - Updated `yarn openapi:generate` scripts to output generated files into the new package. - Split Security Solution API client (`security_solution_api.gen.ts`) into 4 domain-specific clients, each owned by its respective team. - Removed redundant `security_solution` prefix from API client filenames. For example `security_solution_osquery_api.gen.ts` was renamed `osquery_api.gen.ts`. Most of the changes are file moves or variable renames.⚠️ Note: Removal of duplicated D&R utilities mentioned in the issue will be handled in a follow-up PR to keep this one focused and manageable. --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit 6a69d0e) # Conflicts: # src/platform/packages/shared/kbn-openapi-generator/src/template_service/templates/api_client_supertest.handlebars # x-pack/solutions/security/packages/test-api-clients/supertest/endpoint_exceptions.gen.ts # x-pack/solutions/security/packages/test-api-clients/supertest/exceptions.gen.ts # x-pack/solutions/security/packages/test-api-clients/supertest/lists.gen.ts # x-pack/solutions/security/packages/test-api-clients/supertest/osquery.gen.ts # x-pack/solutions/security/test/api_integration/services/security_solution_api.gen.ts # x-pack/solutions/security/test/functional/services/security_solution_api.gen.ts # x-pack/solutions/security/test/security_solution_api_integration/config/services/security_solution_api.gen.ts # x-pack/solutions/security/test/security_solution_api_integration/config/services/security_solution_exceptions_api.gen.ts # x-pack/solutions/security/test/security_solution_api_integration/test_suites/detections_response/detection_engine/rule_execution_logic/frozen_indices_handling/trial_license_complete_tier/frozen_indices_handling.ts # x-pack/solutions/security/test/security_solution_api_integration/test_suites/detections_response/rules_management/rule_creation/trial_license_complete_tier/create_rules.ts # x-pack/solutions/security/test/security_solution_api_integration/test_suites/entity_analytics/entity_store/trial_license_complete_tier/upsert_crud_api.ts # x-pack/solutions/security/test/security_solution_api_integration/test_suites/entity_analytics/monitoring/trial_license_complete_tier/privileged_users/api.ts # x-pack/solutions/security/test/security_solution_api_integration/test_suites/entity_analytics/monitoring/trial_license_complete_tier/privileged_users/cross_source_sync.ts # x-pack/solutions/security/test/security_solution_api_integration/test_suites/entity_analytics/monitoring/trial_license_complete_tier/privileged_users/migrations.ts # x-pack/solutions/security/test/security_solution_api_integration/test_suites/entity_analytics/monitoring/trial_license_complete_tier/privileged_users/task.ts # x-pack/solutions/security/test/security_solution_api_integration/test_suites/entity_analytics/monitoring/trial_license_complete_tier/utils/plain_index_sync_utils.ts # x-pack/solutions/security/test/security_solution_api_integration/test_suites/entity_analytics/monitoring/trial_license_complete_tier/utils/privmon_utils.ts # x-pack/solutions/security/test/security_solution_api_integration/tsconfig.json # x-pack/solutions/security/test/tsconfig.json
maximpn
approved these changes
Sep 26, 2025
nikitaindik
added a commit
that referenced
this pull request
Oct 10, 2025
…ion tests (#235221) (#237108) # Backport This will backport the following commits from `main` to `9.0`: - [[Security Solution] Remove duplicated services used in integration tests (#235221)](#235221) <!--- Backport version: 10.0.2 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Nikita Indik","email":"nikita.indik@elastic.co"},"sourceCommit":{"committedDate":"2025-09-26T11:56:32Z","message":"[Security Solution] Remove duplicated services used in integration tests (#235221)\n\n**Partially addresses: https://github.com/elastic/kibana/issues/234642**\n\n## Summary\nRecent Sustainable Kibana Architecture PR\nhttps://github.com//pull/231416 introduced duplicate\ncopies of SuperTest services used in Security Solution API integration\ntests.\nThis PR removes those duplicates by extracting the services into a\n`@kbn/security-solution-test-api-clients` package, making them reusable\nacross the Security Solution codebase.\n\nThe duplicated services were previously located in:\n- `x-pack/solutions/security/test/api_integration/services/`\n-\n`x-pack/solutions/security/test/security_solution_api_integration/config/services/`\n- `x-pack/solutions/security/test/functional/services/`\n\n## Changes\n- Extracted services into a new\n`@kbn/security-solution-test-api-clients` package\n- Updated `yarn openapi:generate` scripts to output generated files into\nthe new package.\n- Split Security Solution API client (`security_solution_api.gen.ts`)\ninto 4 domain-specific clients, each owned by its respective team.\n- Removed redundant `security_solution` prefix from API client\nfilenames. For example `security_solution_osquery_api.gen.ts` was\nrenamed `osquery_api.gen.ts`.\n\nMost of the changes are file moves or variable renames.\n\n⚠️ Note: Removal of duplicated D&R utilities mentioned in the issue will\nbe handled in a follow-up PR to keep this one focused and manageable.\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"6a69d0ebd27bab55702cdcf199df6f5f9192fbb5","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Detections and Resp","Team: SecuritySolution","Team:Detection Rule Management","backport:version","v9.2.0","v8.19.5","v9.1.5"],"title":"[Security Solution] Remove duplicated services used in integration tests","number":235221,"url":"https://github.com/elastic/kibana/pull/235221","mergeCommit":{"message":"[Security Solution] Remove duplicated services used in integration tests (#235221)\n\n**Partially addresses: https://github.com/elastic/kibana/issues/234642**\n\n## Summary\nRecent Sustainable Kibana Architecture PR\nhttps://github.com//pull/231416 introduced duplicate\ncopies of SuperTest services used in Security Solution API integration\ntests.\nThis PR removes those duplicates by extracting the services into a\n`@kbn/security-solution-test-api-clients` package, making them reusable\nacross the Security Solution codebase.\n\nThe duplicated services were previously located in:\n- `x-pack/solutions/security/test/api_integration/services/`\n-\n`x-pack/solutions/security/test/security_solution_api_integration/config/services/`\n- `x-pack/solutions/security/test/functional/services/`\n\n## Changes\n- Extracted services into a new\n`@kbn/security-solution-test-api-clients` package\n- Updated `yarn openapi:generate` scripts to output generated files into\nthe new package.\n- Split Security Solution API client (`security_solution_api.gen.ts`)\ninto 4 domain-specific clients, each owned by its respective team.\n- Removed redundant `security_solution` prefix from API client\nfilenames. For example `security_solution_osquery_api.gen.ts` was\nrenamed `osquery_api.gen.ts`.\n\nMost of the changes are file moves or variable renames.\n\n⚠️ Note: Removal of duplicated D&R utilities mentioned in the issue will\nbe handled in a follow-up PR to keep this one focused and manageable.\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"6a69d0ebd27bab55702cdcf199df6f5f9192fbb5"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/235221","number":235221,"mergeCommit":{"message":"[Security Solution] Remove duplicated services used in integration tests (#235221)\n\n**Partially addresses: https://github.com/elastic/kibana/issues/234642**\n\n## Summary\nRecent Sustainable Kibana Architecture PR\nhttps://github.com//pull/231416 introduced duplicate\ncopies of SuperTest services used in Security Solution API integration\ntests.\nThis PR removes those duplicates by extracting the services into a\n`@kbn/security-solution-test-api-clients` package, making them reusable\nacross the Security Solution codebase.\n\nThe duplicated services were previously located in:\n- `x-pack/solutions/security/test/api_integration/services/`\n-\n`x-pack/solutions/security/test/security_solution_api_integration/config/services/`\n- `x-pack/solutions/security/test/functional/services/`\n\n## Changes\n- Extracted services into a new\n`@kbn/security-solution-test-api-clients` package\n- Updated `yarn openapi:generate` scripts to output generated files into\nthe new package.\n- Split Security Solution API client (`security_solution_api.gen.ts`)\ninto 4 domain-specific clients, each owned by its respective team.\n- Removed redundant `security_solution` prefix from API client\nfilenames. For example `security_solution_osquery_api.gen.ts` was\nrenamed `osquery_api.gen.ts`.\n\nMost of the changes are file moves or variable renames.\n\n⚠️ Note: Removal of duplicated D&R utilities mentioned in the issue will\nbe handled in a follow-up PR to keep this one focused and manageable.\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"6a69d0ebd27bab55702cdcf199df6f5f9192fbb5"}},{"branch":"8.19","label":"v8.19.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/236618","number":236618,"state":"MERGED","mergeCommit":{"sha":"a68ca880a8dd34ca2e4f5aae8cc7ad2283f828e5","message":"[8.19] [Security Solution] Remove duplicated services used in integration tests (#235221) (#236618)\n\n# Backport\n\nThis will backport the following commits from `main` to `8.19`:\n- [[Security Solution] Remove duplicated services used in integration\ntests (#235221)](https://github.com/elastic/kibana/pull/235221)\n\n\n\n### Questions ?\nPlease refer to the [Backport tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n"}},{"branch":"9.1","label":"v9.1.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/236594","number":236594,"state":"MERGED","mergeCommit":{"sha":"db6d4ddc1bb1cdf309e1d51d997390bce783c512","message":"[9.1] [Security Solution] Remove duplicated services used in integration tests (#235221) (#236594)\n\n# Backport\n\nThis will backport the following commits from `main` to `9.1`:\n- [[Security Solution] Remove duplicated services used in integration\ntests (#235221)](https://github.com/elastic/kibana/pull/235221)\n\n\n\n### Questions ?\nPlease refer to the [Backport tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n"}}]}] BACKPORT-->
nikitaindik
added a commit
that referenced
this pull request
Oct 10, 2025
…tion tests (#235221) (#237148) # Backport This will backport the following commits from `main` to `8.18`: - [[Security Solution] Remove duplicated services used in integration tests (#235221)](#235221) <!--- Backport version: 10.0.2 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Nikita Indik","email":"nikita.indik@elastic.co"},"sourceCommit":{"committedDate":"2025-09-26T11:56:32Z","message":"[Security Solution] Remove duplicated services used in integration tests (#235221)\n\n**Partially addresses: https://github.com/elastic/kibana/issues/234642**\n\n## Summary\nRecent Sustainable Kibana Architecture PR\nhttps://github.com//pull/231416 introduced duplicate\ncopies of SuperTest services used in Security Solution API integration\ntests.\nThis PR removes those duplicates by extracting the services into a\n`@kbn/security-solution-test-api-clients` package, making them reusable\nacross the Security Solution codebase.\n\nThe duplicated services were previously located in:\n- `x-pack/solutions/security/test/api_integration/services/`\n-\n`x-pack/solutions/security/test/security_solution_api_integration/config/services/`\n- `x-pack/solutions/security/test/functional/services/`\n\n## Changes\n- Extracted services into a new\n`@kbn/security-solution-test-api-clients` package\n- Updated `yarn openapi:generate` scripts to output generated files into\nthe new package.\n- Split Security Solution API client (`security_solution_api.gen.ts`)\ninto 4 domain-specific clients, each owned by its respective team.\n- Removed redundant `security_solution` prefix from API client\nfilenames. For example `security_solution_osquery_api.gen.ts` was\nrenamed `osquery_api.gen.ts`.\n\nMost of the changes are file moves or variable renames.\n\n⚠️ Note: Removal of duplicated D&R utilities mentioned in the issue will\nbe handled in a follow-up PR to keep this one focused and manageable.\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"6a69d0ebd27bab55702cdcf199df6f5f9192fbb5","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Detections and Resp","Team: SecuritySolution","Team:Detection Rule Management","backport:version","v9.2.0","v8.19.5","v9.1.5"],"title":"[Security Solution] Remove duplicated services used in integration tests","number":235221,"url":"https://github.com/elastic/kibana/pull/235221","mergeCommit":{"message":"[Security Solution] Remove duplicated services used in integration tests (#235221)\n\n**Partially addresses: https://github.com/elastic/kibana/issues/234642**\n\n## Summary\nRecent Sustainable Kibana Architecture PR\nhttps://github.com//pull/231416 introduced duplicate\ncopies of SuperTest services used in Security Solution API integration\ntests.\nThis PR removes those duplicates by extracting the services into a\n`@kbn/security-solution-test-api-clients` package, making them reusable\nacross the Security Solution codebase.\n\nThe duplicated services were previously located in:\n- `x-pack/solutions/security/test/api_integration/services/`\n-\n`x-pack/solutions/security/test/security_solution_api_integration/config/services/`\n- `x-pack/solutions/security/test/functional/services/`\n\n## Changes\n- Extracted services into a new\n`@kbn/security-solution-test-api-clients` package\n- Updated `yarn openapi:generate` scripts to output generated files into\nthe new package.\n- Split Security Solution API client (`security_solution_api.gen.ts`)\ninto 4 domain-specific clients, each owned by its respective team.\n- Removed redundant `security_solution` prefix from API client\nfilenames. For example `security_solution_osquery_api.gen.ts` was\nrenamed `osquery_api.gen.ts`.\n\nMost of the changes are file moves or variable renames.\n\n⚠️ Note: Removal of duplicated D&R utilities mentioned in the issue will\nbe handled in a follow-up PR to keep this one focused and manageable.\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"6a69d0ebd27bab55702cdcf199df6f5f9192fbb5"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/235221","number":235221,"mergeCommit":{"message":"[Security Solution] Remove duplicated services used in integration tests (#235221)\n\n**Partially addresses: https://github.com/elastic/kibana/issues/234642**\n\n## Summary\nRecent Sustainable Kibana Architecture PR\nhttps://github.com//pull/231416 introduced duplicate\ncopies of SuperTest services used in Security Solution API integration\ntests.\nThis PR removes those duplicates by extracting the services into a\n`@kbn/security-solution-test-api-clients` package, making them reusable\nacross the Security Solution codebase.\n\nThe duplicated services were previously located in:\n- `x-pack/solutions/security/test/api_integration/services/`\n-\n`x-pack/solutions/security/test/security_solution_api_integration/config/services/`\n- `x-pack/solutions/security/test/functional/services/`\n\n## Changes\n- Extracted services into a new\n`@kbn/security-solution-test-api-clients` package\n- Updated `yarn openapi:generate` scripts to output generated files into\nthe new package.\n- Split Security Solution API client (`security_solution_api.gen.ts`)\ninto 4 domain-specific clients, each owned by its respective team.\n- Removed redundant `security_solution` prefix from API client\nfilenames. For example `security_solution_osquery_api.gen.ts` was\nrenamed `osquery_api.gen.ts`.\n\nMost of the changes are file moves or variable renames.\n\n⚠️ Note: Removal of duplicated D&R utilities mentioned in the issue will\nbe handled in a follow-up PR to keep this one focused and manageable.\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"6a69d0ebd27bab55702cdcf199df6f5f9192fbb5"}},{"branch":"8.19","label":"v8.19.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/236618","number":236618,"state":"MERGED","mergeCommit":{"sha":"a68ca880a8dd34ca2e4f5aae8cc7ad2283f828e5","message":"[8.19] [Security Solution] Remove duplicated services used in integration tests (#235221) (#236618)\n\n# Backport\n\nThis will backport the following commits from `main` to `8.19`:\n- [[Security Solution] Remove duplicated services used in integration\ntests (#235221)](https://github.com/elastic/kibana/pull/235221)\n\n\n\n### Questions ?\nPlease refer to the [Backport tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n"}},{"branch":"9.1","label":"v9.1.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/236594","number":236594,"state":"MERGED","mergeCommit":{"sha":"db6d4ddc1bb1cdf309e1d51d997390bce783c512","message":"[9.1] [Security Solution] Remove duplicated services used in integration tests (#235221) (#236594)\n\n# Backport\n\nThis will backport the following commits from `main` to `9.1`:\n- [[Security Solution] Remove duplicated services used in integration\ntests (#235221)](https://github.com/elastic/kibana/pull/235221)\n\n\n\n### Questions ?\nPlease refer to the [Backport tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n"}}]}] BACKPORT--> --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport
This will backport the following commits from
mainto9.1:Questions ?
Please refer to the Backport tool documentation