[ska] relocate x-pack/test/cases_api_integration#225056
[ska] relocate x-pack/test/cases_api_integration#225056dmlemeshko merged 28 commits intoelastic:mainfrom
Conversation
…eshko/kibana into ska/relocate-cases_api_integration
|
Cloud deployments require a Github label, please add |
…eshko/kibana into ska/relocate-cases_api_integration
| * 2.0; you may not use this file except in compliance with the Elastic License | ||
| * 2.0. | ||
| */ | ||
|
|
There was a problem hiding this comment.
copied to simplify imports. we will remove original files in the follow-up with more tests relocated
| getQueryAlertIds, | ||
| } from '@kbn/test-suites-xpack/common/utils/security_solution'; | ||
|
|
||
| export const createSecuritySolutionAlerts = async ( |
There was a problem hiding this comment.
Nice to see the reduced scope here. I noticed these utilities were previously located in x-pack/platform/test/cases_api_integration/common/lib/alerts.ts and have now been moved to the dedicated Security cases_api_integration plugin.
| "@kbn/observability-alert-details": "link:x-pack/solutions/observability/packages/alert-details", | ||
| "@kbn/observability-alerting-test-data": "link:x-pack/solutions/observability/packages/alerting-test-data", | ||
| "@kbn/observability-fixtures-plugin": "link:x-pack/test/cases_api_integration/common/plugins/observability", | ||
| "@kbn/observability-fixtures-plugin": "link:x-pack/platform/test/cases_api_integration/common/plugins/observability", |
There was a problem hiding this comment.
It seems odd to have a plugin that is called observabilityFixtures categorised inside platform.
I could not find if / how the platform code depends on this one, the only thing I've seen is that it registers a Kibana feature. This fixture is then referenced / used in a bunch of places.
@jonathan-buttner is there a strong reason for naming this "Observability"? or could that have been any other project type?
There was a problem hiding this comment.
Cases exists in Observability, Security, and the Stack management page. I believe this fixtures plugin handles testings some observability specific functionality.
There was a problem hiding this comment.
By the looks of it, the observabilityFixture and securitySolutionFixture could be renamed into solution1Fixture and solution2Fixture and everything would continue to work, correct?
The point I'm trying to make is that cases is a generic platform plugin, and we have a bunch of FTR tests testing it, which are also defined at platform level (explicitly relocated under a /platform/ folder with this PR), so we want those tests (and the test data) to remain "solution-agnostic" as much as possible.
On the other hand, if these are truly Observability-specific fixtures that are needed only to test things that are specific to the Observability solution, then maybe it'd make sense to move those tests and fixtures under x-pack/solutions/observability/test (so that in the future, they are tested only for oblt projects).
Or maybe it's a combination of both, and there's a subset of tests that belongs to each category?
That being said, I don't want to block the PR on this. It can be addressed as a follow-up discussion / task.
denar50
left a comment
There was a problem hiding this comment.
LGTM! Code owners review for the files owned by @elastic/security-detection-engine
gsoldevila
left a comment
There was a problem hiding this comment.
LGTM from core standpoint (3 kibana.jsonc files moved without changes)
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Unknown metric groupsESLint disabled in files
ESLint disabled line counts
Total ESLint disabled count
History
cc @dmlemeshko |
## Summary Part of elastic/kibana-team#1503 This PR is mostly about moving tests from x-pack/test/cases_api_integration and updating related imports Before: ``` x-pack/test/ | - cases_api_integration/ ``` After: ``` x-pack/platform/test/ | - cases_api_integration/ x-pack/solutions/security/test/ | - cases_api_integration/ ``` --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit bb7cce6) # Conflicts: # .buildkite/ftr_platform_stateful_configs.yml # .github/CODEOWNERS # x-pack/platform/test/cases_api_integration/common/lib/api/index.ts # x-pack/platform/test/cases_api_integration/security_and_spaces/config_trial_common.ts # x-pack/platform/test/cases_api_integration/security_and_spaces/tests/common/comments/get_all_comments.ts # x-pack/platform/test/cases_api_integration/security_and_spaces/tests/common/index_common_trial/index.ts # x-pack/platform/test/cases_api_integration/security_and_spaces/tests/common/user_actions/get_all_user_actions.ts # x-pack/platform/test/cases_api_integration/security_and_spaces/tests/trial/cases/user_actions/get_all_user_actions.ts # x-pack/platform/test/cases_api_integration/security_and_spaces/tests/trial/index.ts # x-pack/platform/test/cases_api_integration/spaces_only/tests/common/comments/get_all_comments.ts # x-pack/solutions/security/test/cases_api_integration/security_and_spaces/tests/common/comments/delete_comment.ts # x-pack/test/cases_api_integration/security_and_spaces/config_trial_common.ts # x-pack/test/functional_with_es_ssl/apps/cases/group2/attachment_framework.ts # x-pack/test/spaces_api_integration/security_and_spaces/copy_to_space_config_trial.ts
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…25491) # Backport This will backport the following commits from `main` to `8.19`: - [[ska] relocate x-pack/test/cases_api_integration (#225056)](#225056) <!--- Backport version: 10.0.1 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Dzmitry Lemechko","email":"dzmitry.lemechko@elastic.co"},"sourceCommit":{"committedDate":"2025-06-25T17:04:29Z","message":"[ska] relocate x-pack/test/cases_api_integration (#225056)\n\n## Summary\n\nPart of https://github.com/elastic/kibana-team/issues/1503\n\nThis PR is mostly about moving tests from\nx-pack/test/cases_api_integration and updating related imports\n\nBefore:\n\n```\nx-pack/test/\n | - cases_api_integration/\n```\n\nAfter: \n```\nx-pack/platform/test/\n | - cases_api_integration/\n \nx-pack/solutions/security/test/\n | - cases_api_integration/\n```\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"bb7cce6d7b0cf5cc4a28648dd846b5328080df7f","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:skip","v9.1.0","v8.19.0"],"title":"[ska] relocate x-pack/test/cases_api_integration","number":225056,"url":"https://github.com/elastic/kibana/pull/225056","mergeCommit":{"message":"[ska] relocate x-pack/test/cases_api_integration (#225056)\n\n## Summary\n\nPart of https://github.com/elastic/kibana-team/issues/1503\n\nThis PR is mostly about moving tests from\nx-pack/test/cases_api_integration and updating related imports\n\nBefore:\n\n```\nx-pack/test/\n | - cases_api_integration/\n```\n\nAfter: \n```\nx-pack/platform/test/\n | - cases_api_integration/\n \nx-pack/solutions/security/test/\n | - cases_api_integration/\n```\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"bb7cce6d7b0cf5cc4a28648dd846b5328080df7f"}},"sourceBranch":"main","suggestedTargetBranches":["8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/225056","number":225056,"mergeCommit":{"message":"[ska] relocate x-pack/test/cases_api_integration (#225056)\n\n## Summary\n\nPart of https://github.com/elastic/kibana-team/issues/1503\n\nThis PR is mostly about moving tests from\nx-pack/test/cases_api_integration and updating related imports\n\nBefore:\n\n```\nx-pack/test/\n | - cases_api_integration/\n```\n\nAfter: \n```\nx-pack/platform/test/\n | - cases_api_integration/\n \nx-pack/solutions/security/test/\n | - cases_api_integration/\n```\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"bb7cce6d7b0cf5cc4a28648dd846b5328080df7f"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Summary
Part of https://github.com/elastic/kibana-team/issues/1503
This PR is mostly about moving tests from x-pack/test/cases_api_integration and updating related imports
Before:
After: