From 58b8c7aec0a6192e6d4ceb6a006b70025038cb21 Mon Sep 17 00:00:00 2001 From: Dzmitry Lemechko Date: Wed, 25 Jun 2025 18:01:04 +0300 Subject: [PATCH] [ska] [xpack] relocate platform tests (#225223) ## Summary Part of https://github.com/elastic/kibana-team/issues/1503 This PR is mostly about moving platform tests from x-pack/test/ Before: ``` x-pack/test/ | - ftr_apis/ | - load/ | - plugin_api_perf/ | - fleet_packages/ | - fleet_tasks/ | - scalability/ | - task_manager_claimer_update_by_query/ ``` After: ``` x-pack/platform/test/ | - ftr_apis/ | - load/ | - plugin_api_perf/ | - fleet_packages/ | - fleet_tasks/ | - scalability/ | - task_manager_claimer_update_by_query/ --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> --- .buildkite/ftr_platform_stateful_configs.yml | 14 +++++----- .../steps/fleet/install_all_packages.sh | 2 +- .../steps/scalability/api_capacity_testing.sh | 2 +- .github/CODEOWNERS | 27 ++++++++++--------- .../performance/adding_api_capacity_test.mdx | 20 ++++++++++---- package.json | 4 +-- src/dev/performance/run_scalability_cli.ts | 4 +-- tsconfig.base.json | 8 +++--- .../test/fleet_packages/config.ts | 0 .../fleet_packages/ftr_provider_context.d.ts | 0 .../test/fleet_packages/tests/index.ts | 0 .../test/fleet_packages/tests/install_all.ts | 0 .../{ => platform}/test/fleet_tasks/config.ts | 0 .../fleet_tasks/ftr_provider_context.d.ts | 0 .../test/fleet_tasks/helpers.ts | 0 .../fleet_tasks/tests/automatic_upgrades.ts | 0 .../test/fleet_tasks/tests/index.ts | 0 .../es_archiver/base_data/default_space.json | 0 .../es_archiver/base_data/space_1.json | 0 .../ftr_apis/common/lib/authentication.ts | 0 .../common/lib/create_users_and_roles.ts | 0 .../test/ftr_apis/common/lib/index.ts | 0 .../test/ftr_apis/common/lib/types.ts | 0 .../security_and_spaces/apis/bulk_delete.ts | 0 .../security_and_spaces/apis/clean.ts | 0 .../security_and_spaces/apis/create.ts | 0 .../security_and_spaces/apis/delete.ts | 0 .../ftr_apis/security_and_spaces/apis/find.ts | 0 .../ftr_apis/security_and_spaces/apis/get.ts | 0 .../security_and_spaces/apis/index.ts | 0 .../security_and_spaces/apis/test_utils.ts | 8 +++--- .../security_and_spaces/apis/update.ts | 0 .../ftr_apis/security_and_spaces/config.ts | 0 .../ftr_apis/security_and_spaces/services.ts | 0 x-pack/platform/test/index.d.ts | 10 +++++++ x-pack/{ => platform}/test/load/config.ts | 2 +- x-pack/{ => platform}/test/load/runner.ts | 0 .../test/plugin_api_perf/README.md | 10 +++---- .../test/plugin_api_perf/config.ts} | 3 ++- .../plugin_api_perf/ftr_provider_context.d.ts | 0 .../task_manager_performance/kibana.jsonc | 0 .../task_manager_performance/package.json | 14 ++++++++++ .../task_manager_performance/server/index.ts | 0 .../server/init_routes.ts | 0 .../task_manager_performance/server/plugin.ts | 0 .../task_manager_performance/server/types.ts | 0 .../task_manager_performance}/tsconfig.json | 2 +- .../test/plugin_api_perf/services.ts | 0 .../test_suites/task_manager/index.ts | 0 .../task_manager_perf_integration.ts | 0 .../apis/api.core.capabilities.json | 0 .../apis/api.fields.32_fields.json | 0 .../apis/api.fields.6800_fields.json | 0 .../api.fields_for_wildcard.32_fields.json | 0 .../api.fields_for_wildcard.6800_fields.json | 0 .../apis/api.metrics.vis.data.json | 0 .../apis/api.saved_objects_tagging.tags.json | 0 .../test/scalability/apis/api.status.json | 0 .../scalability/apis/api.status.no_auth.json | 0 ...elemetry.cluster_stats.1600_dataviews.json | 2 +- .../apis/api.telemetry.cluster_stats.json | 0 ...cluster_stats.no_cache.1600_dataviews.json | 2 +- .../api.telemetry.cluster_stats.no_cache.json | 0 .../scalability/apis/bundles.core.entry.json | 0 .../apis/internal.security.session.json | 0 .../apis/internal.security.user_profile.json | 0 .../test/scalability/apis/security.me.json | 0 .../{ => platform}/test/scalability/config.ts | 0 .../disabled_scalability_tests.json | 0 .../test/scalability/events_shipper.ts | 0 .../fixtures/kbn_archiver/1600-dataviews.json | 0 .../test/scalability/ftr_provider_context.ts | 0 .../test/scalability/report_parser.ts | 0 .../{ => platform}/test/scalability/runner.ts | 0 .../test/scalability/services.ts | 0 .../{ => platform}/test/scalability/types.ts | 0 .../config.ts | 0 .../ftr_provider_context.d.ts | 0 .../sample_task_plugin_mget/kibana.jsonc | 0 .../sample_task_plugin_mget/package.json | 14 ++++++++++ .../sample_task_plugin_mget/server/index.ts | 0 .../server/init_routes.ts | 0 .../sample_task_plugin_mget/server/plugin.ts | 0 .../sample_task_plugin_mget}/tsconfig.json | 2 +- .../services.ts | 0 .../background_task_utilization_route.ts | 0 .../test_suites/task_manager/health_route.ts | 0 .../test_suites/task_manager/index.ts | 0 .../test_suites/task_manager/metrics_route.ts | 0 .../test_suites/task_manager/migrations.ts | 0 .../task_manager/task_management.ts | 0 .../task_management_removed_types.ts | 0 .../task_management_scheduled_at.ts | 0 .../test_suites/task_manager/task_priority.ts | 0 x-pack/platform/test/tsconfig.json | 5 ++++ .../task_manager_performance/package.json | 14 ---------- .../sample_task_plugin_mget/package.json | 14 ---------- x-pack/test/tsconfig.json | 4 --- yarn.lock | 4 +-- 99 files changed, 107 insertions(+), 84 deletions(-) rename x-pack/{ => platform}/test/fleet_packages/config.ts (100%) rename x-pack/{ => platform}/test/fleet_packages/ftr_provider_context.d.ts (100%) rename x-pack/{ => platform}/test/fleet_packages/tests/index.ts (100%) rename x-pack/{ => platform}/test/fleet_packages/tests/install_all.ts (100%) rename x-pack/{ => platform}/test/fleet_tasks/config.ts (100%) rename x-pack/{ => platform}/test/fleet_tasks/ftr_provider_context.d.ts (100%) rename x-pack/{ => platform}/test/fleet_tasks/helpers.ts (100%) rename x-pack/{ => platform}/test/fleet_tasks/tests/automatic_upgrades.ts (100%) rename x-pack/{ => platform}/test/fleet_tasks/tests/index.ts (100%) rename x-pack/{ => platform}/test/ftr_apis/common/fixtures/es_archiver/base_data/default_space.json (100%) rename x-pack/{ => platform}/test/ftr_apis/common/fixtures/es_archiver/base_data/space_1.json (100%) rename x-pack/{ => platform}/test/ftr_apis/common/lib/authentication.ts (100%) rename x-pack/{ => platform}/test/ftr_apis/common/lib/create_users_and_roles.ts (100%) rename x-pack/{ => platform}/test/ftr_apis/common/lib/index.ts (100%) rename x-pack/{ => platform}/test/ftr_apis/common/lib/types.ts (100%) rename x-pack/{ => platform}/test/ftr_apis/security_and_spaces/apis/bulk_delete.ts (100%) rename x-pack/{ => platform}/test/ftr_apis/security_and_spaces/apis/clean.ts (100%) rename x-pack/{ => platform}/test/ftr_apis/security_and_spaces/apis/create.ts (100%) rename x-pack/{ => platform}/test/ftr_apis/security_and_spaces/apis/delete.ts (100%) rename x-pack/{ => platform}/test/ftr_apis/security_and_spaces/apis/find.ts (100%) rename x-pack/{ => platform}/test/ftr_apis/security_and_spaces/apis/get.ts (100%) rename x-pack/{ => platform}/test/ftr_apis/security_and_spaces/apis/index.ts (100%) rename x-pack/{ => platform}/test/ftr_apis/security_and_spaces/apis/test_utils.ts (79%) rename x-pack/{ => platform}/test/ftr_apis/security_and_spaces/apis/update.ts (100%) rename x-pack/{ => platform}/test/ftr_apis/security_and_spaces/config.ts (100%) rename x-pack/{ => platform}/test/ftr_apis/security_and_spaces/services.ts (100%) create mode 100644 x-pack/platform/test/index.d.ts rename x-pack/{ => platform}/test/load/config.ts (98%) rename x-pack/{ => platform}/test/load/runner.ts (100%) rename x-pack/{ => platform}/test/plugin_api_perf/README.md (90%) rename x-pack/{test/plugin_api_perf/config.js => platform/test/plugin_api_perf/config.ts} (90%) rename x-pack/{ => platform}/test/plugin_api_perf/ftr_provider_context.d.ts (100%) rename x-pack/{ => platform}/test/plugin_api_perf/plugins/task_manager_performance/kibana.jsonc (100%) create mode 100644 x-pack/platform/test/plugin_api_perf/plugins/task_manager_performance/package.json rename x-pack/{ => platform}/test/plugin_api_perf/plugins/task_manager_performance/server/index.ts (100%) rename x-pack/{ => platform}/test/plugin_api_perf/plugins/task_manager_performance/server/init_routes.ts (100%) rename x-pack/{ => platform}/test/plugin_api_perf/plugins/task_manager_performance/server/plugin.ts (100%) rename x-pack/{ => platform}/test/plugin_api_perf/plugins/task_manager_performance/server/types.ts (100%) rename x-pack/{test/task_manager_claimer_update_by_query/plugins/sample_task_plugin_mget => platform/test/plugin_api_perf/plugins/task_manager_performance}/tsconfig.json (82%) rename x-pack/{ => platform}/test/plugin_api_perf/services.ts (100%) rename x-pack/{ => platform}/test/plugin_api_perf/test_suites/task_manager/index.ts (100%) rename x-pack/{ => platform}/test/plugin_api_perf/test_suites/task_manager/task_manager_perf_integration.ts (100%) rename x-pack/{ => platform}/test/scalability/apis/api.core.capabilities.json (100%) rename x-pack/{ => platform}/test/scalability/apis/api.fields.32_fields.json (100%) rename x-pack/{ => platform}/test/scalability/apis/api.fields.6800_fields.json (100%) rename x-pack/{ => platform}/test/scalability/apis/api.fields_for_wildcard.32_fields.json (100%) rename x-pack/{ => platform}/test/scalability/apis/api.fields_for_wildcard.6800_fields.json (100%) rename x-pack/{ => platform}/test/scalability/apis/api.metrics.vis.data.json (100%) rename x-pack/{ => platform}/test/scalability/apis/api.saved_objects_tagging.tags.json (100%) rename x-pack/{ => platform}/test/scalability/apis/api.status.json (100%) rename x-pack/{ => platform}/test/scalability/apis/api.status.no_auth.json (100%) rename x-pack/{ => platform}/test/scalability/apis/api.telemetry.cluster_stats.1600_dataviews.json (91%) rename x-pack/{ => platform}/test/scalability/apis/api.telemetry.cluster_stats.json (100%) rename x-pack/{ => platform}/test/scalability/apis/api.telemetry.cluster_stats.no_cache.1600_dataviews.json (92%) rename x-pack/{ => platform}/test/scalability/apis/api.telemetry.cluster_stats.no_cache.json (100%) rename x-pack/{ => platform}/test/scalability/apis/bundles.core.entry.json (100%) rename x-pack/{ => platform}/test/scalability/apis/internal.security.session.json (100%) rename x-pack/{ => platform}/test/scalability/apis/internal.security.user_profile.json (100%) rename x-pack/{ => platform}/test/scalability/apis/security.me.json (100%) rename x-pack/{ => platform}/test/scalability/config.ts (100%) rename x-pack/{ => platform}/test/scalability/disabled_scalability_tests.json (100%) rename x-pack/{ => platform}/test/scalability/events_shipper.ts (100%) rename x-pack/{ => platform}/test/scalability/fixtures/kbn_archiver/1600-dataviews.json (100%) rename x-pack/{ => platform}/test/scalability/ftr_provider_context.ts (100%) rename x-pack/{ => platform}/test/scalability/report_parser.ts (100%) rename x-pack/{ => platform}/test/scalability/runner.ts (100%) rename x-pack/{ => platform}/test/scalability/services.ts (100%) rename x-pack/{ => platform}/test/scalability/types.ts (100%) rename x-pack/{ => platform}/test/task_manager_claimer_update_by_query/config.ts (100%) rename x-pack/{ => platform}/test/task_manager_claimer_update_by_query/ftr_provider_context.d.ts (100%) rename x-pack/{ => platform}/test/task_manager_claimer_update_by_query/plugins/sample_task_plugin_mget/kibana.jsonc (100%) create mode 100644 x-pack/platform/test/task_manager_claimer_update_by_query/plugins/sample_task_plugin_mget/package.json rename x-pack/{ => platform}/test/task_manager_claimer_update_by_query/plugins/sample_task_plugin_mget/server/index.ts (100%) rename x-pack/{ => platform}/test/task_manager_claimer_update_by_query/plugins/sample_task_plugin_mget/server/init_routes.ts (100%) rename x-pack/{ => platform}/test/task_manager_claimer_update_by_query/plugins/sample_task_plugin_mget/server/plugin.ts (100%) rename x-pack/{test/plugin_api_perf/plugins/task_manager_performance => platform/test/task_manager_claimer_update_by_query/plugins/sample_task_plugin_mget}/tsconfig.json (82%) rename x-pack/{ => platform}/test/task_manager_claimer_update_by_query/services.ts (100%) rename x-pack/{ => platform}/test/task_manager_claimer_update_by_query/test_suites/task_manager/background_task_utilization_route.ts (100%) rename x-pack/{ => platform}/test/task_manager_claimer_update_by_query/test_suites/task_manager/health_route.ts (100%) rename x-pack/{ => platform}/test/task_manager_claimer_update_by_query/test_suites/task_manager/index.ts (100%) rename x-pack/{ => platform}/test/task_manager_claimer_update_by_query/test_suites/task_manager/metrics_route.ts (100%) rename x-pack/{ => platform}/test/task_manager_claimer_update_by_query/test_suites/task_manager/migrations.ts (100%) rename x-pack/{ => platform}/test/task_manager_claimer_update_by_query/test_suites/task_manager/task_management.ts (100%) rename x-pack/{ => platform}/test/task_manager_claimer_update_by_query/test_suites/task_manager/task_management_removed_types.ts (100%) rename x-pack/{ => platform}/test/task_manager_claimer_update_by_query/test_suites/task_manager/task_management_scheduled_at.ts (100%) rename x-pack/{ => platform}/test/task_manager_claimer_update_by_query/test_suites/task_manager/task_priority.ts (100%) delete mode 100644 x-pack/test/plugin_api_perf/plugins/task_manager_performance/package.json delete mode 100644 x-pack/test/task_manager_claimer_update_by_query/plugins/sample_task_plugin_mget/package.json diff --git a/.buildkite/ftr_platform_stateful_configs.yml b/.buildkite/ftr_platform_stateful_configs.yml index afd448fa9245..c14339547f59 100644 --- a/.buildkite/ftr_platform_stateful_configs.yml +++ b/.buildkite/ftr_platform_stateful_configs.yml @@ -30,13 +30,13 @@ disabled: - x-pack/platform/test/alerting_api_integration/security_and_spaces/group2/tests/telemetry/config.ts - x-pack/platform/test/alerting_api_integration/spaces_only_legacy/config.ts - x-pack/test/cloud_integration/config.ts - - x-pack/test/load/config.ts - - x-pack/test/plugin_api_perf/config.js + - x-pack/platform/test/load/config.ts + - x-pack/platform/test/plugin_api_perf/config.ts - x-pack/test/screenshot_creation/config.ts - - x-pack/test/fleet_packages/config.ts + - x-pack/platform/test/fleet_packages/config.ts # Scalability testing config that we run in its own pipeline - - x-pack/test/scalability/config.ts + - x-pack/platform/test/scalability/config.ts # Cypress configs, for now these are still run manually - x-pack/test/fleet_cypress/cli_config.ts @@ -173,8 +173,8 @@ enabled: - x-pack/test/fleet_api_integration/config.package_policy.ts - x-pack/test/fleet_api_integration/config.space_awareness.ts - x-pack/test/fleet_functional/config.ts - - x-pack/test/fleet_tasks/config.ts - - x-pack/test/ftr_apis/security_and_spaces/config.ts + - x-pack/platform/test/fleet_tasks/config.ts + - x-pack/platform/test/ftr_apis/security_and_spaces/config.ts - x-pack/test/functional_basic/apps/ml/permissions/config.ts - x-pack/test/functional_basic/apps/ml/data_visualizer/group1/config.ts - x-pack/test/functional_basic/apps/ml/data_visualizer/group2/config.ts @@ -330,7 +330,7 @@ enabled: - x-pack/test/spaces_api_integration/security_and_spaces/config_basic.ts - x-pack/test/spaces_api_integration/security_and_spaces/config_trial.ts - x-pack/test/spaces_api_integration/spaces_only/config.ts - - x-pack/test/task_manager_claimer_update_by_query/config.ts + - x-pack/platform/test/task_manager_claimer_update_by_query/config.ts - x-pack/test/ui_capabilities/security_and_spaces/config.ts - x-pack/test/ui_capabilities/spaces_only/config.ts - x-pack/test/upgrade_assistant_integration/config.ts diff --git a/.buildkite/scripts/steps/fleet/install_all_packages.sh b/.buildkite/scripts/steps/fleet/install_all_packages.sh index eb001b4399b8..133a35efd56b 100755 --- a/.buildkite/scripts/steps/fleet/install_all_packages.sh +++ b/.buildkite/scripts/steps/fleet/install_all_packages.sh @@ -9,4 +9,4 @@ echo '--- Installing all packages' node scripts/functional_tests \ --debug \ --bail \ - --config x-pack/test/fleet_packages/config.ts + --config x-pack/platform/test/fleet_packages/config.ts diff --git a/.buildkite/scripts/steps/scalability/api_capacity_testing.sh b/.buildkite/scripts/steps/scalability/api_capacity_testing.sh index 7dbd103eb153..9359b85945af 100755 --- a/.buildkite/scripts/steps/scalability/api_capacity_testing.sh +++ b/.buildkite/scripts/steps/scalability/api_capacity_testing.sh @@ -22,7 +22,7 @@ checkout_and_compile_load_runner echo "--- Run single apis capacity tests" cd "$KIBANA_DIR" -node scripts/run_scalability --kibana-install-dir "$KIBANA_BUILD_LOCATION" --journey-path "x-pack/test/scalability/apis" +node scripts/run_scalability --kibana-install-dir "$KIBANA_BUILD_LOCATION" --journey-path "x-pack/platform/test/scalability/apis" echo "--- Upload test results" upload_test_results diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 2540f6cb2673..a281585b9d7b 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -982,7 +982,9 @@ x-pack/platform/test/plugin_api_integration/plugins/elasticsearch_client @elasti x-pack/platform/test/plugin_api_integration/plugins/event_log @elastic/response-ops x-pack/platform/test/plugin_api_integration/plugins/feature_usage_test @elastic/kibana-security x-pack/platform/test/plugin_api_integration/plugins/sample_task_plugin @elastic/response-ops +x-pack/platform/test/plugin_api_perf/plugins/task_manager_performance @elastic/response-ops x-pack/platform/test/saved_object_api_integration/common/plugins/saved_object_test_plugin @elastic/kibana-security +x-pack/platform/test/task_manager_claimer_update_by_query/plugins/sample_task_plugin_mget @elastic/response-ops x-pack/solutions/chat/packages/wc-framework-types-browser @elastic/search-kibana @elastic/workchat-eng x-pack/solutions/chat/packages/wc-framework-types-common @elastic/search-kibana @elastic/workchat-eng x-pack/solutions/chat/packages/wc-framework-types-server @elastic/search-kibana @elastic/workchat-eng @@ -1103,7 +1105,6 @@ x-pack/test/functional_execution_context/plugins/alerts @elastic/kibana-core x-pack/test/functional_with_es_ssl/plugins/alerts @elastic/response-ops x-pack/test/functional_with_es_ssl/plugins/cases @elastic/response-ops x-pack/test/licensing_plugin/plugins/test_feature_usage @elastic/kibana-security -x-pack/test/plugin_api_perf/plugins/task_manager_performance @elastic/response-ops x-pack/test/plugin_functional/plugins/global_search_test @elastic/kibana-core x-pack/test/plugin_functional/plugins/resolver_test @elastic/security-solution x-pack/test/security_api_integration/packages/helpers @elastic/kibana-security @@ -1114,7 +1115,6 @@ x-pack/test/security_api_integration/plugins/saml_provider @elastic/kibana-secur x-pack/test/security_api_integration/plugins/user_profiles_consumer @elastic/kibana-security x-pack/test/security_functional/plugins/test_endpoints @elastic/kibana-security x-pack/test/spaces_api_integration/common/plugins/spaces_test_plugin @elastic/kibana-security -x-pack/test/task_manager_claimer_update_by_query/plugins/sample_task_plugin_mget @elastic/response-ops x-pack/test/ui_capabilities/common/plugins/foo_plugin @elastic/kibana-security x-pack/test/usage_collection/plugins/application_usage_test @elastic/kibana-core x-pack/test/usage_collection/plugins/stack_management_usage_test @elastic/kibana-management @@ -1477,8 +1477,8 @@ src/platform/plugins/shared/discover/public/context_awareness/profile_providers/ /x-pack/test/functional/es_archives/fleet @elastic/fleet /x-pack/test/api_integration/services/fleet_and_agents.ts @elastic/fleet /x-pack/test/fleet_api_integration @elastic/fleet -/x-pack/test/fleet_packages @elastic/fleet -/x-pack/test/fleet_tasks @elastic/fleet +/x-pack/platform/test/fleet_packages @elastic/fleet +/x-pack/platform/test/fleet_tasks @elastic/fleet /src/platform/test/api_integration/apis/custom_integration/*.ts @elastic/fleet /x-pack/test/fleet_cypress @elastic/fleet /x-pack/test/fleet_functional @elastic/fleet @@ -1696,6 +1696,7 @@ x-pack/platform/plugins/shared/ml/server/models/data_recognizer/modules/security # QA - Appex QA .buildkite/scout_ci_config.yml @elastic/appex-qa /x-pack/test/.gitignore @elastic/appex-qa +/x-pack/platform/test/index.d.ts @elastic/appex-qa /src/platform/packages/shared/kbn-es/src/serverless_resources/project_roles/es/roles.yml @elastic/appex-qa /src/platform/packages/shared/kbn-es/src/serverless_resources/project_roles/oblt/roles.yml @elastic/appex-qa /src/platform/packages/shared/kbn-es/src/serverless_resources/project_roles/security/roles.yml @elastic/appex-qa @@ -1766,7 +1767,7 @@ x-pack/platform/plugins/shared/ml/server/models/data_recognizer/modules/security /x-pack/platform/test/api_integration/services @elastic/appex-qa /x-pack/platform/test/api_integration/apis/kibana/config.ts @elastic/appex-qa /x-pack/test/tsconfig.json @elastic/appex-qa -/x-pack/test/load @elastic/appex-qa +/x-pack/platform/test/load @elastic/appex-qa /src/platform/test/tsconfig.json @elastic/appex-qa /src/platform/test/plugin_functional/services/index.ts @elastic/appex-qa /src/platform/test/plugin_functional/README.md @elastic/appex-qa @@ -1818,7 +1819,7 @@ x-pack/platform/plugins/shared/ml/server/models/data_recognizer/modules/security /src/platform/test/accessibility/ftr_provider_context.ts @elastic/appex-qa /src/platform/test/accessibility/config.ts @elastic/appex-qa /src/platform/test/accessibility/apps/index.ts @elastic/appex-qa -/x-pack/test/scalability @elastic/appex-qa +/x-pack/platform/test/scalability @elastic/appex-qa /src/dev/performance @elastic/appex-qa /x-pack/test/functional/config.*.* @elastic/appex-qa /x-pack/platform/test/functional/config.*.* @elastic/appex-qa @@ -2017,9 +2018,9 @@ x-pack/platform/plugins/private/cloud_integrations/cloud_full_story/server/confi /x-pack/test/functional/es_archives/security @elastic/kibana-security /x-pack/test/functional/fixtures/kbn_archiver/spaces @elastic/kibana-security /x-pack/test/functional/fixtures/kbn_archiver/security @elastic/kibana-security -/x-pack/test/ftr_apis/common/lib @elastic/kibana-security -/x-pack/test/ftr_apis/common/fixtures/es_archiver/base_data/space_1.json @elastic/kibana-security # Assigned per only use: https://github.com/elastic/kibana/blob/main/x-pack/test/ftr_apis/security_and_spaces/apis/test_utils.ts#L33 -/x-pack/test/ftr_apis/common/fixtures/es_archiver/base_data/default_space.json @elastic/kibana-security # Assigned per only use: https://github.com/elastic/kibana/blob/main/x-pack/test/ftr_apis/security_and_spaces/apis/test_utils.ts#L33 +/x-pack/platform/test/ftr_apis/common/lib @elastic/kibana-security +/x-pack/platform/test/ftr_apis/common/fixtures/es_archiver/base_data/space_1.json @elastic/kibana-security # Assigned per only use: https://github.com/elastic/kibana/blob/main/x-pack/platform/test/ftr_apis/security_and_spaces/apis/test_utils.ts#L33 +/x-pack/platform/test/ftr_apis/common/fixtures/es_archiver/base_data/default_space.json @elastic/kibana-security # Assigned per only use: https://github.com/elastic/kibana/blob/main/x-pack/platform/test/ftr_apis/security_and_spaces/apis/test_utils.ts#L33 /x-pack/platform/test/api_integration/apis/cloud @elastic/kibana-security # Assigned per https://github.com/elastic/kibana/pull/198444 /src/platform/test/plugin_functional/snapshots/baseline/hardening @elastic/kibana-security # Assigned per https://github.com/elastic/kibana/pull/190716 /src/platform/test/functional/page_objects/login_page.ts @elastic/kibana-security @@ -2036,7 +2037,7 @@ x-pack/platform/plugins/private/cloud_integrations/cloud_full_story/server/confi /x-pack/test/common/services/spaces.ts @elastic/kibana-security /x-pack/test/api_integration/config_security_*.ts @elastic/kibana-security /x-pack/test/functional/apps/api_keys @elastic/kibana-security -/x-pack/test/ftr_apis/security_and_spaces @elastic/kibana-security +/x-pack/platform/test/ftr_apis/security_and_spaces @elastic/kibana-security /src/platform/test/server_integration/services/supertest.js @elastic/kibana-security @elastic/kibana-core /src/platform/test/server_integration/http/ssl @elastic/kibana-security # Assigned per https://github.com/elastic/kibana/pull/53810 /src/platform/test/server_integration/http/ssl_with_p12 @elastic/kibana-security # Assigned per https://github.com/elastic/kibana/pull/199795#discussion_r1846522206 @@ -2096,8 +2097,8 @@ x-pack/platform/plugins/private/cloud_integrations/cloud_full_story/server/confi # Response Ops team /x-pack/test/functional/es_archives/rule_registry @elastic/response-ops /x-pack/test/functional/es_archives/event_log_multiple_indicies @elastic/response-ops -/x-pack/test/functional/es_archives/task_manager* @elastic/response-ops # Assigned per https://github.com/elastic/kibana/blob/assign-response-ops/x-pack/test/plugin_api_perf/plugins/task_manager_performance/kibana.jsonc#L4 -/x-pack/test/plugin_api_perf @elastic/response-ops # Assigned per https://github.com/elastic/kibana/blob/assign-response-ops/x-pack/test/plugin_api_perf/plugins/task_manager_performance/kibana.jsonc#L4 +/x-pack/test/functional/es_archives/task_manager* @elastic/response-ops # Assigned per https://github.com/elastic/kibana/blob/assign-response-ops/x-pack/platform/test/plugin_api_perf/plugins/task_manager_performance/kibana.jsonc#L4 +/x-pack/platform/test/plugin_api_perf @elastic/response-ops # Assigned per https://github.com/elastic/kibana/blob/assign-response-ops/x-pack/platform/test/plugin_api_perf/plugins/task_manager_performance/kibana.jsonc#L4 /x-pack/test/functional/page_objects/maintenance_windows_page.ts @elastic/response-ops /x-pack/test_serverless/functional/test_suites/observability/screenshot_creation/index.ts @elastic/response-ops /x-pack/test_serverless/functional/test_suites/observability/rules/rules_list.ts @elastic/response-ops @@ -2132,7 +2133,7 @@ x-pack/platform/plugins/private/cloud_integrations/cloud_full_story/server/confi /x-pack/platform/test/plugin_api_integration/test_suites/task_manager/ @elastic/response-ops /x-pack/test/functional_with_es_ssl/apps/embeddable_alerts_table/ @elastic/response-ops /x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/ @elastic/response-ops -/x-pack/test/task_manager_claimer_update_by_query/ @elastic/response-ops +/x-pack/platform/test/task_manager_claimer_update_by_query/ @elastic/response-ops /docs/user/alerting/ @elastic/response-ops /docs/management/connectors/ @elastic/response-ops /x-pack/test/cases_api_integration/ @elastic/response-ops diff --git a/dev_docs/tutorials/performance/adding_api_capacity_test.mdx b/dev_docs/tutorials/performance/adding_api_capacity_test.mdx index 869dab986b3b..be1fba338da0 100644 --- a/dev_docs/tutorials/performance/adding_api_capacity_test.mdx +++ b/dev_docs/tutorials/performance/adding_api_capacity_test.mdx @@ -8,6 +8,7 @@ tags: ['kibana', 'onboarding', 'setup', 'performance', 'development', 'telemetry --- ## Overview + It is important to test individual API endpoint for the baseline performance, scalability, or breaking point. If an API doesn’t meet performance requirements, it is a bottleneck. This capacity tests track how response time changes while we slowly increase number of concurrent requests per second. While using similar load model, we are able to identify how many requests per second each endpoint can hold with response time staying below critical threshold. @@ -15,6 +16,7 @@ While using similar load model, we are able to identify how many requests per se Capacity API test defines 3 response time thresholds (default ones: 3000, 6000, 12000) in ms. Test results report rps (requests per second) for each threshold. Test results are reported using EBT in the following format: + ```json { "_index": "backing-kibana-server-scalability-metrics-000003", @@ -37,7 +39,9 @@ Test results are reported using EBT in the following format: ``` ### Adding a new test -Create a new json file in `x-pack/test/scalability/apis` with required properties: + +Create a new json file in `x-pack/platform/test/scalability/apis` with required properties: + - **journeyName** is a test name, e.g. `GET /internal/security/session` - **scalabilitySetup** is used to set load model - **testData** is used to populate Elasticsearch and Kibana wth test data @@ -47,13 +51,15 @@ Create a new json file in `x-pack/test/scalability/apis` with required propertie Warmup phase simulates 10 concurrent requests during 30s period and is important to get consistent results in test phase. Test phase simulates increasing concurrent requests from `minUsersCount` to `maxUsersCount` within `duration` time. Both `maxUsersCount` and `duration` in test phase should be adjusted for individual endpoint: - - `maxUsersCount` should be reasonable and enough to reach endpoint limits - - `duration` should be long enough to ramp up requests with low pace (1-2 requests per second) + +- `maxUsersCount` should be reasonable and enough to reach endpoint limits +- `duration` should be long enough to ramp up requests with low pace (1-2 requests per second) Example: + ```json { - "journeyName": "GET /internal/security/session", + "journeyName": "GET /internal/security/session", "scalabilitySetup": { "warmup": [ { @@ -99,6 +105,7 @@ Example: ``` Override default response time thresholds by adding to `scalabilitySetup`: + ```json "responseTimeThreshold": { "threshold1": 1000, @@ -108,14 +115,16 @@ Override default response time thresholds by adding to `scalabilitySetup`: ``` ### Running api capacity journey locally + Clone [kibana-load-testing](https://github.com/elastic/kibana-load-testing) repo. Use the Node script from kibana root directory: - `node scripts/run_scalability_cli.js --journey-path x-pack/test/scalability/apis/$YOUR_JOURNEY_NAME.ts` +`node scripts/run_scalability_cli.js --journey-path x-pack/platform/test/scalability/apis/$YOUR_JOURNEY_NAME.ts` Use `--kibana-install-dir` flag to test build ### Benchmarking performance on CI + In order to keep track on performance metrics stability, api capacity tests are run on main branch with a scheduled interval. Bare metal machine is used to produce results as stable and reproducible as possible. @@ -128,6 +137,7 @@ RAM: 128 GB SSD: 1.92 TB Data center Gen4 NVMe #### Track performance results + APM metrics are reported to [kibana-stats](https://kibana-stats.elastic.dev/) cluster. You can filter transactions using labels, e.g. `labels.journeyName : "GET /internal/security/session"` diff --git a/package.json b/package.json index 39f15d6613e0..712067001448 100644 --- a/package.json +++ b/package.json @@ -818,7 +818,7 @@ "@kbn/safer-lodash-set": "link:src/platform/packages/shared/kbn-safer-lodash-set", "@kbn/saml-provider-plugin": "link:x-pack/test/security_api_integration/plugins/saml_provider", "@kbn/sample-task-plugin": "link:x-pack/platform/test/plugin_api_integration/plugins/sample_task_plugin", - "@kbn/sample-task-plugin-update-by-query": "link:x-pack/test/task_manager_claimer_update_by_query/plugins/sample_task_plugin_mget", + "@kbn/sample-task-plugin-update-by-query": "link:x-pack/platform/test/task_manager_claimer_update_by_query/plugins/sample_task_plugin_mget", "@kbn/saved-object-export-transforms-plugin": "link:src/platform/test/plugin_functional/plugins/saved_object_export_transforms", "@kbn/saved-object-import-warnings-plugin": "link:src/platform/test/plugin_functional/plugins/saved_object_import_warnings", "@kbn/saved-object-test-plugin": "link:x-pack/platform/test/saved_object_api_integration/common/plugins/saved_object_test_plugin", @@ -983,7 +983,7 @@ "@kbn/synthetics-plugin": "link:x-pack/solutions/observability/plugins/synthetics", "@kbn/task-manager-dependencies-plugin": "link:x-pack/platform/plugins/private/task_manager_dependencies", "@kbn/task-manager-fixture-plugin": "link:x-pack/platform/test/alerting_api_integration/common/plugins/task_manager_fixture", - "@kbn/task-manager-performance-plugin": "link:x-pack/test/plugin_api_perf/plugins/task_manager_performance", + "@kbn/task-manager-performance-plugin": "link:x-pack/platform/test/plugin_api_perf/plugins/task_manager_performance", "@kbn/task-manager-plugin": "link:x-pack/platform/plugins/shared/task_manager", "@kbn/telemetry": "link:src/platform/packages/shared/kbn-telemetry", "@kbn/telemetry-collection-manager-plugin": "link:src/platform/plugins/shared/telemetry_collection_manager", diff --git a/src/dev/performance/run_scalability_cli.ts b/src/dev/performance/run_scalability_cli.ts index 4a9d06b0f71f..3899939858e1 100644 --- a/src/dev/performance/run_scalability_cli.ts +++ b/src/dev/performance/run_scalability_cli.ts @@ -41,7 +41,7 @@ run( }) : [{ name: path.parse(journeyPath).name, path: journeyPath }]; - const skippedFilePath = 'x-pack/test/scalability/disabled_scalability_tests.json'; + const skippedFilePath = 'x-pack/platform/test/scalability/disabled_scalability_tests.json'; const skipped: string[] = JSON.parse( fs.readFileSync(path.resolve(REPO_ROOT, skippedFilePath), 'utf8') ).map((relativePath: string) => path.resolve(REPO_ROOT, relativePath)); @@ -89,7 +89,7 @@ run( cmd: 'node', args: [ 'scripts/functional_tests', - ['--config', 'x-pack/test/scalability/config.ts'], + ['--config', 'x-pack/platform/test/scalability/config.ts'], kibanaBuildDir ? ['--kibana-install-dir', kibanaBuildDir] : [], '--debug', '--logToFile', diff --git a/tsconfig.base.json b/tsconfig.base.json index 8ad001df1d6d..21c8e4f48b09 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -1604,8 +1604,8 @@ "@kbn/sample-log-parser/*": ["x-pack/platform/packages/shared/kbn-sample-parser/*"], "@kbn/sample-task-plugin": ["x-pack/platform/test/plugin_api_integration/plugins/sample_task_plugin"], "@kbn/sample-task-plugin/*": ["x-pack/platform/test/plugin_api_integration/plugins/sample_task_plugin/*"], - "@kbn/sample-task-plugin-update-by-query": ["x-pack/test/task_manager_claimer_update_by_query/plugins/sample_task_plugin_mget"], - "@kbn/sample-task-plugin-update-by-query/*": ["x-pack/test/task_manager_claimer_update_by_query/plugins/sample_task_plugin_mget/*"], + "@kbn/sample-task-plugin-update-by-query": ["x-pack/platform/test/task_manager_claimer_update_by_query/plugins/sample_task_plugin_mget"], + "@kbn/sample-task-plugin-update-by-query/*": ["x-pack/platform/test/task_manager_claimer_update_by_query/plugins/sample_task_plugin_mget/*"], "@kbn/saved-object-export-transforms-plugin": ["src/platform/test/plugin_functional/plugins/saved_object_export_transforms"], "@kbn/saved-object-export-transforms-plugin/*": ["src/platform/test/plugin_functional/plugins/saved_object_export_transforms/*"], "@kbn/saved-object-import-warnings-plugin": ["src/platform/test/plugin_functional/plugins/saved_object_import_warnings"], @@ -1992,8 +1992,8 @@ "@kbn/task-manager-dependencies-plugin/*": ["x-pack/platform/plugins/private/task_manager_dependencies/*"], "@kbn/task-manager-fixture-plugin": ["x-pack/platform/test/alerting_api_integration/common/plugins/task_manager_fixture"], "@kbn/task-manager-fixture-plugin/*": ["x-pack/platform/test/alerting_api_integration/common/plugins/task_manager_fixture/*"], - "@kbn/task-manager-performance-plugin": ["x-pack/test/plugin_api_perf/plugins/task_manager_performance"], - "@kbn/task-manager-performance-plugin/*": ["x-pack/test/plugin_api_perf/plugins/task_manager_performance/*"], + "@kbn/task-manager-performance-plugin": ["x-pack/platform/test/plugin_api_perf/plugins/task_manager_performance"], + "@kbn/task-manager-performance-plugin/*": ["x-pack/platform/test/plugin_api_perf/plugins/task_manager_performance/*"], "@kbn/task-manager-plugin": ["x-pack/platform/plugins/shared/task_manager"], "@kbn/task-manager-plugin/*": ["x-pack/platform/plugins/shared/task_manager/*"], "@kbn/telemetry": ["src/platform/packages/shared/kbn-telemetry"], diff --git a/x-pack/test/fleet_packages/config.ts b/x-pack/platform/test/fleet_packages/config.ts similarity index 100% rename from x-pack/test/fleet_packages/config.ts rename to x-pack/platform/test/fleet_packages/config.ts diff --git a/x-pack/test/fleet_packages/ftr_provider_context.d.ts b/x-pack/platform/test/fleet_packages/ftr_provider_context.d.ts similarity index 100% rename from x-pack/test/fleet_packages/ftr_provider_context.d.ts rename to x-pack/platform/test/fleet_packages/ftr_provider_context.d.ts diff --git a/x-pack/test/fleet_packages/tests/index.ts b/x-pack/platform/test/fleet_packages/tests/index.ts similarity index 100% rename from x-pack/test/fleet_packages/tests/index.ts rename to x-pack/platform/test/fleet_packages/tests/index.ts diff --git a/x-pack/test/fleet_packages/tests/install_all.ts b/x-pack/platform/test/fleet_packages/tests/install_all.ts similarity index 100% rename from x-pack/test/fleet_packages/tests/install_all.ts rename to x-pack/platform/test/fleet_packages/tests/install_all.ts diff --git a/x-pack/test/fleet_tasks/config.ts b/x-pack/platform/test/fleet_tasks/config.ts similarity index 100% rename from x-pack/test/fleet_tasks/config.ts rename to x-pack/platform/test/fleet_tasks/config.ts diff --git a/x-pack/test/fleet_tasks/ftr_provider_context.d.ts b/x-pack/platform/test/fleet_tasks/ftr_provider_context.d.ts similarity index 100% rename from x-pack/test/fleet_tasks/ftr_provider_context.d.ts rename to x-pack/platform/test/fleet_tasks/ftr_provider_context.d.ts diff --git a/x-pack/test/fleet_tasks/helpers.ts b/x-pack/platform/test/fleet_tasks/helpers.ts similarity index 100% rename from x-pack/test/fleet_tasks/helpers.ts rename to x-pack/platform/test/fleet_tasks/helpers.ts diff --git a/x-pack/test/fleet_tasks/tests/automatic_upgrades.ts b/x-pack/platform/test/fleet_tasks/tests/automatic_upgrades.ts similarity index 100% rename from x-pack/test/fleet_tasks/tests/automatic_upgrades.ts rename to x-pack/platform/test/fleet_tasks/tests/automatic_upgrades.ts diff --git a/x-pack/test/fleet_tasks/tests/index.ts b/x-pack/platform/test/fleet_tasks/tests/index.ts similarity index 100% rename from x-pack/test/fleet_tasks/tests/index.ts rename to x-pack/platform/test/fleet_tasks/tests/index.ts diff --git a/x-pack/test/ftr_apis/common/fixtures/es_archiver/base_data/default_space.json b/x-pack/platform/test/ftr_apis/common/fixtures/es_archiver/base_data/default_space.json similarity index 100% rename from x-pack/test/ftr_apis/common/fixtures/es_archiver/base_data/default_space.json rename to x-pack/platform/test/ftr_apis/common/fixtures/es_archiver/base_data/default_space.json diff --git a/x-pack/test/ftr_apis/common/fixtures/es_archiver/base_data/space_1.json b/x-pack/platform/test/ftr_apis/common/fixtures/es_archiver/base_data/space_1.json similarity index 100% rename from x-pack/test/ftr_apis/common/fixtures/es_archiver/base_data/space_1.json rename to x-pack/platform/test/ftr_apis/common/fixtures/es_archiver/base_data/space_1.json diff --git a/x-pack/test/ftr_apis/common/lib/authentication.ts b/x-pack/platform/test/ftr_apis/common/lib/authentication.ts similarity index 100% rename from x-pack/test/ftr_apis/common/lib/authentication.ts rename to x-pack/platform/test/ftr_apis/common/lib/authentication.ts diff --git a/x-pack/test/ftr_apis/common/lib/create_users_and_roles.ts b/x-pack/platform/test/ftr_apis/common/lib/create_users_and_roles.ts similarity index 100% rename from x-pack/test/ftr_apis/common/lib/create_users_and_roles.ts rename to x-pack/platform/test/ftr_apis/common/lib/create_users_and_roles.ts diff --git a/x-pack/test/ftr_apis/common/lib/index.ts b/x-pack/platform/test/ftr_apis/common/lib/index.ts similarity index 100% rename from x-pack/test/ftr_apis/common/lib/index.ts rename to x-pack/platform/test/ftr_apis/common/lib/index.ts diff --git a/x-pack/test/ftr_apis/common/lib/types.ts b/x-pack/platform/test/ftr_apis/common/lib/types.ts similarity index 100% rename from x-pack/test/ftr_apis/common/lib/types.ts rename to x-pack/platform/test/ftr_apis/common/lib/types.ts diff --git a/x-pack/test/ftr_apis/security_and_spaces/apis/bulk_delete.ts b/x-pack/platform/test/ftr_apis/security_and_spaces/apis/bulk_delete.ts similarity index 100% rename from x-pack/test/ftr_apis/security_and_spaces/apis/bulk_delete.ts rename to x-pack/platform/test/ftr_apis/security_and_spaces/apis/bulk_delete.ts diff --git a/x-pack/test/ftr_apis/security_and_spaces/apis/clean.ts b/x-pack/platform/test/ftr_apis/security_and_spaces/apis/clean.ts similarity index 100% rename from x-pack/test/ftr_apis/security_and_spaces/apis/clean.ts rename to x-pack/platform/test/ftr_apis/security_and_spaces/apis/clean.ts diff --git a/x-pack/test/ftr_apis/security_and_spaces/apis/create.ts b/x-pack/platform/test/ftr_apis/security_and_spaces/apis/create.ts similarity index 100% rename from x-pack/test/ftr_apis/security_and_spaces/apis/create.ts rename to x-pack/platform/test/ftr_apis/security_and_spaces/apis/create.ts diff --git a/x-pack/test/ftr_apis/security_and_spaces/apis/delete.ts b/x-pack/platform/test/ftr_apis/security_and_spaces/apis/delete.ts similarity index 100% rename from x-pack/test/ftr_apis/security_and_spaces/apis/delete.ts rename to x-pack/platform/test/ftr_apis/security_and_spaces/apis/delete.ts diff --git a/x-pack/test/ftr_apis/security_and_spaces/apis/find.ts b/x-pack/platform/test/ftr_apis/security_and_spaces/apis/find.ts similarity index 100% rename from x-pack/test/ftr_apis/security_and_spaces/apis/find.ts rename to x-pack/platform/test/ftr_apis/security_and_spaces/apis/find.ts diff --git a/x-pack/test/ftr_apis/security_and_spaces/apis/get.ts b/x-pack/platform/test/ftr_apis/security_and_spaces/apis/get.ts similarity index 100% rename from x-pack/test/ftr_apis/security_and_spaces/apis/get.ts rename to x-pack/platform/test/ftr_apis/security_and_spaces/apis/get.ts diff --git a/x-pack/test/ftr_apis/security_and_spaces/apis/index.ts b/x-pack/platform/test/ftr_apis/security_and_spaces/apis/index.ts similarity index 100% rename from x-pack/test/ftr_apis/security_and_spaces/apis/index.ts rename to x-pack/platform/test/ftr_apis/security_and_spaces/apis/index.ts diff --git a/x-pack/test/ftr_apis/security_and_spaces/apis/test_utils.ts b/x-pack/platform/test/ftr_apis/security_and_spaces/apis/test_utils.ts similarity index 79% rename from x-pack/test/ftr_apis/security_and_spaces/apis/test_utils.ts rename to x-pack/platform/test/ftr_apis/security_and_spaces/apis/test_utils.ts index 7ab99302043f..61250ae96e53 100644 --- a/x-pack/test/ftr_apis/security_and_spaces/apis/test_utils.ts +++ b/x-pack/platform/test/ftr_apis/security_and_spaces/apis/test_utils.ts @@ -30,10 +30,10 @@ export const deleteTestSpaces = async ({ getService }: FtrProviderContext) => { export const createData = async ({ getService }: FtrProviderContext) => { const kibanaServer = getService('kibanaServer'); await kibanaServer.importExport.load( - 'x-pack/test/ftr_apis/common/fixtures/es_archiver/base_data/default_space.json' + 'x-pack/platform/test/ftr_apis/common/fixtures/es_archiver/base_data/default_space.json' ); await kibanaServer.importExport.load( - 'x-pack/test/ftr_apis/common/fixtures/es_archiver/base_data/space_1.json', + 'x-pack/platform/test/ftr_apis/common/fixtures/es_archiver/base_data/space_1.json', { space: 'space_1' } ); }; @@ -41,10 +41,10 @@ export const createData = async ({ getService }: FtrProviderContext) => { export const deleteData = async ({ getService }: FtrProviderContext) => { const kibanaServer = getService('kibanaServer'); await kibanaServer.importExport.unload( - 'x-pack/test/ftr_apis/common/fixtures/es_archiver/base_data/default_space.json' + 'x-pack/platform/test/ftr_apis/common/fixtures/es_archiver/base_data/default_space.json' ); await kibanaServer.importExport.unload( - 'x-pack/test/ftr_apis/common/fixtures/es_archiver/base_data/space_1.json', + 'x-pack/platform/test/ftr_apis/common/fixtures/es_archiver/base_data/space_1.json', { space: 'space_1' } ); }; diff --git a/x-pack/test/ftr_apis/security_and_spaces/apis/update.ts b/x-pack/platform/test/ftr_apis/security_and_spaces/apis/update.ts similarity index 100% rename from x-pack/test/ftr_apis/security_and_spaces/apis/update.ts rename to x-pack/platform/test/ftr_apis/security_and_spaces/apis/update.ts diff --git a/x-pack/test/ftr_apis/security_and_spaces/config.ts b/x-pack/platform/test/ftr_apis/security_and_spaces/config.ts similarity index 100% rename from x-pack/test/ftr_apis/security_and_spaces/config.ts rename to x-pack/platform/test/ftr_apis/security_and_spaces/config.ts diff --git a/x-pack/test/ftr_apis/security_and_spaces/services.ts b/x-pack/platform/test/ftr_apis/security_and_spaces/services.ts similarity index 100% rename from x-pack/test/ftr_apis/security_and_spaces/services.ts rename to x-pack/platform/test/ftr_apis/security_and_spaces/services.ts diff --git a/x-pack/platform/test/index.d.ts b/x-pack/platform/test/index.d.ts new file mode 100644 index 000000000000..bd1bfe60dcdd --- /dev/null +++ b/x-pack/platform/test/index.d.ts @@ -0,0 +1,10 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +declare module '@kbn/repo-info' { + export const REPO_ROOT: string; +} diff --git a/x-pack/test/load/config.ts b/x-pack/platform/test/load/config.ts similarity index 98% rename from x-pack/test/load/config.ts rename to x-pack/platform/test/load/config.ts index b2559ead7af9..cba7da0f2cff 100644 --- a/x-pack/test/load/config.ts +++ b/x-pack/platform/test/load/config.ts @@ -24,7 +24,7 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { require.resolve('@kbn/test-suites-src/common/config') ); const xpackFunctionalTestsConfig = await readConfigFile( - require.resolve('../functional/config.base.js') + require.resolve('../functional/config.base.ts') ); return { diff --git a/x-pack/test/load/runner.ts b/x-pack/platform/test/load/runner.ts similarity index 100% rename from x-pack/test/load/runner.ts rename to x-pack/platform/test/load/runner.ts diff --git a/x-pack/test/plugin_api_perf/README.md b/x-pack/platform/test/plugin_api_perf/README.md similarity index 90% rename from x-pack/test/plugin_api_perf/README.md rename to x-pack/platform/test/plugin_api_perf/README.md index 9918e7c0ff09..1025e031c2a0 100644 --- a/x-pack/test/plugin_api_perf/README.md +++ b/x-pack/platform/test/plugin_api_perf/README.md @@ -22,8 +22,8 @@ In the `./test_suites/task_manager/task_manager_perf_integration.ts` file you se ### running 1. Enable the test in `./test_suites/task_manager/index.ts` by removing the `.skip` from the `describe.skip`. -1. Run the test server from within the `x-pack` folder: `node scripts/functional_tests_server.js --config=test/plugin_api_perf/config.js` -1. Run the test runner from within the `x-pack` folder: `node scripts/functional_test_runner.js --config=test/plugin_api_perf/config.js` +1. Run the test server from within the `x-pack` folder: `node scripts/functional_tests_server.js --config=platform/test/plugin_api_perf/config.js` +1. Run the test runner from within the `x-pack` folder: `node scripts/functional_test_runner.js --config=platform/test/plugin_api_perf/config.js` ## The Results After the test runs you should get the following output: @@ -68,10 +68,10 @@ Ideally we can clean this up and make it easier and less hacky in the future, bu ## Method 1. You need two cloned repos of Kibana, so clone a second Kibana of your personal form along side your existing clone. Personally I have two co-located Kibana folders (`./elastic/kibana` and `./elastic/_kibana`, where the first is my working clone and the other is never used for actual dev work, but that's just me -GM). -1. You can run the FTS in the main clone of your fork by running `node scripts/functional_tests_server.js --config=test/plugin_api_perf/config.js` in the `x-pack` folder. +1. You can run the FTS in the main clone of your fork by running `node scripts/functional_tests_server.js --config=platform/test/plugin_api_perf/config.js` in the `x-pack` folder. 1. Once you've began running the default FTS, you want your second FTS to run such that it is referencing the Elasticsearch instance started by that first FTS. You achieve this by exporting a `TEST_ES_URL` Environment variable that points at it. By default, you should be able to run this: `export TEST_ES_URL=http://elastic:changeme@localhost:9220`. Do this in a terminal window opened in your **second** clone of Kibana (in my case, the `./elastic/_kibana` folder). 1. One issue I encountered with FTS is that I can't tell it _not to start its own ES instance at all_. To achieve this, in `src/platform/packages/shared/kbn-test/src/functional_tests/tasks.js` you need to comment out the line that starts up its own ES (`const es = await runElasticsearch({ config, options: opts });` [line 85] and `await es.cleanup();` shortly after) 1. Next you want each instance of Kibana to run with its own UUID as that is used to identify each Kibana's owned tasks. In the file `x-pack/test/functional/config.base.js` simple change the uuid on the line `--server.uuid=` into any random UUID. -1. Now that you've made these changes you can kick off your second Kibana FTS by running ths following in the second clone's `x-pack` folder: `TEST_KIBANA_PORT=5621 node scripts/functional_tests_server.js --config=test/plugin_api_perf/config.js`. This runs Kibana on a different port than the first FTS (`5621` instead of `5620`). -1. With two FTS Kibana running and both pointing at the same Elasticsearch. Now, you can run the actual perf test by running `node scripts/functional_test_runner.js --config=test/plugin_api_perf/config.js` in a third terminal +1. Now that you've made these changes you can kick off your second Kibana FTS by running ths following in the second clone's `x-pack` folder: `TEST_KIBANA_PORT=5621 node scripts/functional_tests_server.js --config=platform/test/plugin_api_perf/config.js`. This runs Kibana on a different port than the first FTS (`5621` instead of `5620`). +1. With two FTS Kibana running and both pointing at the same Elasticsearch. Now, you can run the actual perf test by running `node scripts/functional_test_runner.js --config=platform/test/plugin_api_perf/config.js` in a third terminal diff --git a/x-pack/test/plugin_api_perf/config.js b/x-pack/platform/test/plugin_api_perf/config.ts similarity index 90% rename from x-pack/test/plugin_api_perf/config.js rename to x-pack/platform/test/plugin_api_perf/config.ts index 8b0347248e63..ddc240c51249 100644 --- a/x-pack/test/plugin_api_perf/config.js +++ b/x-pack/platform/test/plugin_api_perf/config.ts @@ -7,9 +7,10 @@ import path from 'path'; import { findTestPluginPaths } from '@kbn/test'; +import { FtrConfigProviderContext } from '@kbn/test'; import { services } from './services'; -export default async function ({ readConfigFile }) { +export default async function ({ readConfigFile }: FtrConfigProviderContext) { const integrationConfig = await readConfigFile(require.resolve('../api_integration/config')); return { diff --git a/x-pack/test/plugin_api_perf/ftr_provider_context.d.ts b/x-pack/platform/test/plugin_api_perf/ftr_provider_context.d.ts similarity index 100% rename from x-pack/test/plugin_api_perf/ftr_provider_context.d.ts rename to x-pack/platform/test/plugin_api_perf/ftr_provider_context.d.ts diff --git a/x-pack/test/plugin_api_perf/plugins/task_manager_performance/kibana.jsonc b/x-pack/platform/test/plugin_api_perf/plugins/task_manager_performance/kibana.jsonc similarity index 100% rename from x-pack/test/plugin_api_perf/plugins/task_manager_performance/kibana.jsonc rename to x-pack/platform/test/plugin_api_perf/plugins/task_manager_performance/kibana.jsonc diff --git a/x-pack/platform/test/plugin_api_perf/plugins/task_manager_performance/package.json b/x-pack/platform/test/plugin_api_perf/plugins/task_manager_performance/package.json new file mode 100644 index 000000000000..c50c4fd41a4d --- /dev/null +++ b/x-pack/platform/test/plugin_api_perf/plugins/task_manager_performance/package.json @@ -0,0 +1,14 @@ +{ + "name": "@kbn/task-manager-performance-plugin", + "version": "1.0.0", + "kibana": { + "version": "kibana", + "templateVersion": "1.0.0" + }, + "main": "target/platform/test/plugin_api_perf/plugins/task_manager_performance", + "scripts": { + "kbn": "node ../../../../../../scripts/kbn.js", + "build": "rm -rf './target' && ../../../../../../node_modules/.bin/tsc" + }, + "license": "Elastic License 2.0" +} \ No newline at end of file diff --git a/x-pack/test/plugin_api_perf/plugins/task_manager_performance/server/index.ts b/x-pack/platform/test/plugin_api_perf/plugins/task_manager_performance/server/index.ts similarity index 100% rename from x-pack/test/plugin_api_perf/plugins/task_manager_performance/server/index.ts rename to x-pack/platform/test/plugin_api_perf/plugins/task_manager_performance/server/index.ts diff --git a/x-pack/test/plugin_api_perf/plugins/task_manager_performance/server/init_routes.ts b/x-pack/platform/test/plugin_api_perf/plugins/task_manager_performance/server/init_routes.ts similarity index 100% rename from x-pack/test/plugin_api_perf/plugins/task_manager_performance/server/init_routes.ts rename to x-pack/platform/test/plugin_api_perf/plugins/task_manager_performance/server/init_routes.ts diff --git a/x-pack/test/plugin_api_perf/plugins/task_manager_performance/server/plugin.ts b/x-pack/platform/test/plugin_api_perf/plugins/task_manager_performance/server/plugin.ts similarity index 100% rename from x-pack/test/plugin_api_perf/plugins/task_manager_performance/server/plugin.ts rename to x-pack/platform/test/plugin_api_perf/plugins/task_manager_performance/server/plugin.ts diff --git a/x-pack/test/plugin_api_perf/plugins/task_manager_performance/server/types.ts b/x-pack/platform/test/plugin_api_perf/plugins/task_manager_performance/server/types.ts similarity index 100% rename from x-pack/test/plugin_api_perf/plugins/task_manager_performance/server/types.ts rename to x-pack/platform/test/plugin_api_perf/plugins/task_manager_performance/server/types.ts diff --git a/x-pack/test/task_manager_claimer_update_by_query/plugins/sample_task_plugin_mget/tsconfig.json b/x-pack/platform/test/plugin_api_perf/plugins/task_manager_performance/tsconfig.json similarity index 82% rename from x-pack/test/task_manager_claimer_update_by_query/plugins/sample_task_plugin_mget/tsconfig.json rename to x-pack/platform/test/plugin_api_perf/plugins/task_manager_performance/tsconfig.json index 6038cbe20ae8..acca02ed8666 100644 --- a/x-pack/test/task_manager_claimer_update_by_query/plugins/sample_task_plugin_mget/tsconfig.json +++ b/x-pack/platform/test/plugin_api_perf/plugins/task_manager_performance/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../../../../tsconfig.base.json", + "extends": "../../../../../../tsconfig.base.json", "compilerOptions": { "outDir": "target/types" }, diff --git a/x-pack/test/plugin_api_perf/services.ts b/x-pack/platform/test/plugin_api_perf/services.ts similarity index 100% rename from x-pack/test/plugin_api_perf/services.ts rename to x-pack/platform/test/plugin_api_perf/services.ts diff --git a/x-pack/test/plugin_api_perf/test_suites/task_manager/index.ts b/x-pack/platform/test/plugin_api_perf/test_suites/task_manager/index.ts similarity index 100% rename from x-pack/test/plugin_api_perf/test_suites/task_manager/index.ts rename to x-pack/platform/test/plugin_api_perf/test_suites/task_manager/index.ts diff --git a/x-pack/test/plugin_api_perf/test_suites/task_manager/task_manager_perf_integration.ts b/x-pack/platform/test/plugin_api_perf/test_suites/task_manager/task_manager_perf_integration.ts similarity index 100% rename from x-pack/test/plugin_api_perf/test_suites/task_manager/task_manager_perf_integration.ts rename to x-pack/platform/test/plugin_api_perf/test_suites/task_manager/task_manager_perf_integration.ts diff --git a/x-pack/test/scalability/apis/api.core.capabilities.json b/x-pack/platform/test/scalability/apis/api.core.capabilities.json similarity index 100% rename from x-pack/test/scalability/apis/api.core.capabilities.json rename to x-pack/platform/test/scalability/apis/api.core.capabilities.json diff --git a/x-pack/test/scalability/apis/api.fields.32_fields.json b/x-pack/platform/test/scalability/apis/api.fields.32_fields.json similarity index 100% rename from x-pack/test/scalability/apis/api.fields.32_fields.json rename to x-pack/platform/test/scalability/apis/api.fields.32_fields.json diff --git a/x-pack/test/scalability/apis/api.fields.6800_fields.json b/x-pack/platform/test/scalability/apis/api.fields.6800_fields.json similarity index 100% rename from x-pack/test/scalability/apis/api.fields.6800_fields.json rename to x-pack/platform/test/scalability/apis/api.fields.6800_fields.json diff --git a/x-pack/test/scalability/apis/api.fields_for_wildcard.32_fields.json b/x-pack/platform/test/scalability/apis/api.fields_for_wildcard.32_fields.json similarity index 100% rename from x-pack/test/scalability/apis/api.fields_for_wildcard.32_fields.json rename to x-pack/platform/test/scalability/apis/api.fields_for_wildcard.32_fields.json diff --git a/x-pack/test/scalability/apis/api.fields_for_wildcard.6800_fields.json b/x-pack/platform/test/scalability/apis/api.fields_for_wildcard.6800_fields.json similarity index 100% rename from x-pack/test/scalability/apis/api.fields_for_wildcard.6800_fields.json rename to x-pack/platform/test/scalability/apis/api.fields_for_wildcard.6800_fields.json diff --git a/x-pack/test/scalability/apis/api.metrics.vis.data.json b/x-pack/platform/test/scalability/apis/api.metrics.vis.data.json similarity index 100% rename from x-pack/test/scalability/apis/api.metrics.vis.data.json rename to x-pack/platform/test/scalability/apis/api.metrics.vis.data.json diff --git a/x-pack/test/scalability/apis/api.saved_objects_tagging.tags.json b/x-pack/platform/test/scalability/apis/api.saved_objects_tagging.tags.json similarity index 100% rename from x-pack/test/scalability/apis/api.saved_objects_tagging.tags.json rename to x-pack/platform/test/scalability/apis/api.saved_objects_tagging.tags.json diff --git a/x-pack/test/scalability/apis/api.status.json b/x-pack/platform/test/scalability/apis/api.status.json similarity index 100% rename from x-pack/test/scalability/apis/api.status.json rename to x-pack/platform/test/scalability/apis/api.status.json diff --git a/x-pack/test/scalability/apis/api.status.no_auth.json b/x-pack/platform/test/scalability/apis/api.status.no_auth.json similarity index 100% rename from x-pack/test/scalability/apis/api.status.no_auth.json rename to x-pack/platform/test/scalability/apis/api.status.no_auth.json diff --git a/x-pack/test/scalability/apis/api.telemetry.cluster_stats.1600_dataviews.json b/x-pack/platform/test/scalability/apis/api.telemetry.cluster_stats.1600_dataviews.json similarity index 91% rename from x-pack/test/scalability/apis/api.telemetry.cluster_stats.1600_dataviews.json rename to x-pack/platform/test/scalability/apis/api.telemetry.cluster_stats.1600_dataviews.json index de436beed460..ca7dbb773748 100644 --- a/x-pack/test/scalability/apis/api.telemetry.cluster_stats.1600_dataviews.json +++ b/x-pack/platform/test/scalability/apis/api.telemetry.cluster_stats.1600_dataviews.json @@ -20,7 +20,7 @@ }, "testData": { "esArchives": [], - "kbnArchives": ["x-pack/test/scalability/fixtures/kbn_archiver/1600-dataviews.json"] + "kbnArchives": ["x-pack/platform/test/scalability/fixtures/kbn_archiver/1600-dataviews.json"] }, "streams": [ { diff --git a/x-pack/test/scalability/apis/api.telemetry.cluster_stats.json b/x-pack/platform/test/scalability/apis/api.telemetry.cluster_stats.json similarity index 100% rename from x-pack/test/scalability/apis/api.telemetry.cluster_stats.json rename to x-pack/platform/test/scalability/apis/api.telemetry.cluster_stats.json diff --git a/x-pack/test/scalability/apis/api.telemetry.cluster_stats.no_cache.1600_dataviews.json b/x-pack/platform/test/scalability/apis/api.telemetry.cluster_stats.no_cache.1600_dataviews.json similarity index 92% rename from x-pack/test/scalability/apis/api.telemetry.cluster_stats.no_cache.1600_dataviews.json rename to x-pack/platform/test/scalability/apis/api.telemetry.cluster_stats.no_cache.1600_dataviews.json index b9a690027c57..1762782462e7 100644 --- a/x-pack/test/scalability/apis/api.telemetry.cluster_stats.no_cache.1600_dataviews.json +++ b/x-pack/platform/test/scalability/apis/api.telemetry.cluster_stats.no_cache.1600_dataviews.json @@ -25,7 +25,7 @@ }, "testData": { "esArchives": [], - "kbnArchives": ["x-pack/test/scalability/fixtures/kbn_archiver/1600-dataviews.json"] + "kbnArchives": ["x-pack/platform/test/scalability/fixtures/kbn_archiver/1600-dataviews.json"] }, "streams": [ { diff --git a/x-pack/test/scalability/apis/api.telemetry.cluster_stats.no_cache.json b/x-pack/platform/test/scalability/apis/api.telemetry.cluster_stats.no_cache.json similarity index 100% rename from x-pack/test/scalability/apis/api.telemetry.cluster_stats.no_cache.json rename to x-pack/platform/test/scalability/apis/api.telemetry.cluster_stats.no_cache.json diff --git a/x-pack/test/scalability/apis/bundles.core.entry.json b/x-pack/platform/test/scalability/apis/bundles.core.entry.json similarity index 100% rename from x-pack/test/scalability/apis/bundles.core.entry.json rename to x-pack/platform/test/scalability/apis/bundles.core.entry.json diff --git a/x-pack/test/scalability/apis/internal.security.session.json b/x-pack/platform/test/scalability/apis/internal.security.session.json similarity index 100% rename from x-pack/test/scalability/apis/internal.security.session.json rename to x-pack/platform/test/scalability/apis/internal.security.session.json diff --git a/x-pack/test/scalability/apis/internal.security.user_profile.json b/x-pack/platform/test/scalability/apis/internal.security.user_profile.json similarity index 100% rename from x-pack/test/scalability/apis/internal.security.user_profile.json rename to x-pack/platform/test/scalability/apis/internal.security.user_profile.json diff --git a/x-pack/test/scalability/apis/security.me.json b/x-pack/platform/test/scalability/apis/security.me.json similarity index 100% rename from x-pack/test/scalability/apis/security.me.json rename to x-pack/platform/test/scalability/apis/security.me.json diff --git a/x-pack/test/scalability/config.ts b/x-pack/platform/test/scalability/config.ts similarity index 100% rename from x-pack/test/scalability/config.ts rename to x-pack/platform/test/scalability/config.ts diff --git a/x-pack/test/scalability/disabled_scalability_tests.json b/x-pack/platform/test/scalability/disabled_scalability_tests.json similarity index 100% rename from x-pack/test/scalability/disabled_scalability_tests.json rename to x-pack/platform/test/scalability/disabled_scalability_tests.json diff --git a/x-pack/test/scalability/events_shipper.ts b/x-pack/platform/test/scalability/events_shipper.ts similarity index 100% rename from x-pack/test/scalability/events_shipper.ts rename to x-pack/platform/test/scalability/events_shipper.ts diff --git a/x-pack/test/scalability/fixtures/kbn_archiver/1600-dataviews.json b/x-pack/platform/test/scalability/fixtures/kbn_archiver/1600-dataviews.json similarity index 100% rename from x-pack/test/scalability/fixtures/kbn_archiver/1600-dataviews.json rename to x-pack/platform/test/scalability/fixtures/kbn_archiver/1600-dataviews.json diff --git a/x-pack/test/scalability/ftr_provider_context.ts b/x-pack/platform/test/scalability/ftr_provider_context.ts similarity index 100% rename from x-pack/test/scalability/ftr_provider_context.ts rename to x-pack/platform/test/scalability/ftr_provider_context.ts diff --git a/x-pack/test/scalability/report_parser.ts b/x-pack/platform/test/scalability/report_parser.ts similarity index 100% rename from x-pack/test/scalability/report_parser.ts rename to x-pack/platform/test/scalability/report_parser.ts diff --git a/x-pack/test/scalability/runner.ts b/x-pack/platform/test/scalability/runner.ts similarity index 100% rename from x-pack/test/scalability/runner.ts rename to x-pack/platform/test/scalability/runner.ts diff --git a/x-pack/test/scalability/services.ts b/x-pack/platform/test/scalability/services.ts similarity index 100% rename from x-pack/test/scalability/services.ts rename to x-pack/platform/test/scalability/services.ts diff --git a/x-pack/test/scalability/types.ts b/x-pack/platform/test/scalability/types.ts similarity index 100% rename from x-pack/test/scalability/types.ts rename to x-pack/platform/test/scalability/types.ts diff --git a/x-pack/test/task_manager_claimer_update_by_query/config.ts b/x-pack/platform/test/task_manager_claimer_update_by_query/config.ts similarity index 100% rename from x-pack/test/task_manager_claimer_update_by_query/config.ts rename to x-pack/platform/test/task_manager_claimer_update_by_query/config.ts diff --git a/x-pack/test/task_manager_claimer_update_by_query/ftr_provider_context.d.ts b/x-pack/platform/test/task_manager_claimer_update_by_query/ftr_provider_context.d.ts similarity index 100% rename from x-pack/test/task_manager_claimer_update_by_query/ftr_provider_context.d.ts rename to x-pack/platform/test/task_manager_claimer_update_by_query/ftr_provider_context.d.ts diff --git a/x-pack/test/task_manager_claimer_update_by_query/plugins/sample_task_plugin_mget/kibana.jsonc b/x-pack/platform/test/task_manager_claimer_update_by_query/plugins/sample_task_plugin_mget/kibana.jsonc similarity index 100% rename from x-pack/test/task_manager_claimer_update_by_query/plugins/sample_task_plugin_mget/kibana.jsonc rename to x-pack/platform/test/task_manager_claimer_update_by_query/plugins/sample_task_plugin_mget/kibana.jsonc diff --git a/x-pack/platform/test/task_manager_claimer_update_by_query/plugins/sample_task_plugin_mget/package.json b/x-pack/platform/test/task_manager_claimer_update_by_query/plugins/sample_task_plugin_mget/package.json new file mode 100644 index 000000000000..3993e104e018 --- /dev/null +++ b/x-pack/platform/test/task_manager_claimer_update_by_query/plugins/sample_task_plugin_mget/package.json @@ -0,0 +1,14 @@ +{ + "name": "@kbn/sample-task-plugin-update-by-query", + "version": "1.0.0", + "kibana": { + "version": "kibana", + "templateVersion": "1.0.0" + }, + "main": "target/platform/test/task_manager_claimer_update_by_query/plugins/sample_task_plugin_update_by_query", + "scripts": { + "kbn": "node ../../../../../../scripts/kbn.js", + "build": "rm -rf './target' && ../../../../../../node_modules/.bin/tsc" + }, + "license": "Elastic License 2.0" +} \ No newline at end of file diff --git a/x-pack/test/task_manager_claimer_update_by_query/plugins/sample_task_plugin_mget/server/index.ts b/x-pack/platform/test/task_manager_claimer_update_by_query/plugins/sample_task_plugin_mget/server/index.ts similarity index 100% rename from x-pack/test/task_manager_claimer_update_by_query/plugins/sample_task_plugin_mget/server/index.ts rename to x-pack/platform/test/task_manager_claimer_update_by_query/plugins/sample_task_plugin_mget/server/index.ts diff --git a/x-pack/test/task_manager_claimer_update_by_query/plugins/sample_task_plugin_mget/server/init_routes.ts b/x-pack/platform/test/task_manager_claimer_update_by_query/plugins/sample_task_plugin_mget/server/init_routes.ts similarity index 100% rename from x-pack/test/task_manager_claimer_update_by_query/plugins/sample_task_plugin_mget/server/init_routes.ts rename to x-pack/platform/test/task_manager_claimer_update_by_query/plugins/sample_task_plugin_mget/server/init_routes.ts diff --git a/x-pack/test/task_manager_claimer_update_by_query/plugins/sample_task_plugin_mget/server/plugin.ts b/x-pack/platform/test/task_manager_claimer_update_by_query/plugins/sample_task_plugin_mget/server/plugin.ts similarity index 100% rename from x-pack/test/task_manager_claimer_update_by_query/plugins/sample_task_plugin_mget/server/plugin.ts rename to x-pack/platform/test/task_manager_claimer_update_by_query/plugins/sample_task_plugin_mget/server/plugin.ts diff --git a/x-pack/test/plugin_api_perf/plugins/task_manager_performance/tsconfig.json b/x-pack/platform/test/task_manager_claimer_update_by_query/plugins/sample_task_plugin_mget/tsconfig.json similarity index 82% rename from x-pack/test/plugin_api_perf/plugins/task_manager_performance/tsconfig.json rename to x-pack/platform/test/task_manager_claimer_update_by_query/plugins/sample_task_plugin_mget/tsconfig.json index 6038cbe20ae8..acca02ed8666 100644 --- a/x-pack/test/plugin_api_perf/plugins/task_manager_performance/tsconfig.json +++ b/x-pack/platform/test/task_manager_claimer_update_by_query/plugins/sample_task_plugin_mget/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../../../../tsconfig.base.json", + "extends": "../../../../../../tsconfig.base.json", "compilerOptions": { "outDir": "target/types" }, diff --git a/x-pack/test/task_manager_claimer_update_by_query/services.ts b/x-pack/platform/test/task_manager_claimer_update_by_query/services.ts similarity index 100% rename from x-pack/test/task_manager_claimer_update_by_query/services.ts rename to x-pack/platform/test/task_manager_claimer_update_by_query/services.ts diff --git a/x-pack/test/task_manager_claimer_update_by_query/test_suites/task_manager/background_task_utilization_route.ts b/x-pack/platform/test/task_manager_claimer_update_by_query/test_suites/task_manager/background_task_utilization_route.ts similarity index 100% rename from x-pack/test/task_manager_claimer_update_by_query/test_suites/task_manager/background_task_utilization_route.ts rename to x-pack/platform/test/task_manager_claimer_update_by_query/test_suites/task_manager/background_task_utilization_route.ts diff --git a/x-pack/test/task_manager_claimer_update_by_query/test_suites/task_manager/health_route.ts b/x-pack/platform/test/task_manager_claimer_update_by_query/test_suites/task_manager/health_route.ts similarity index 100% rename from x-pack/test/task_manager_claimer_update_by_query/test_suites/task_manager/health_route.ts rename to x-pack/platform/test/task_manager_claimer_update_by_query/test_suites/task_manager/health_route.ts diff --git a/x-pack/test/task_manager_claimer_update_by_query/test_suites/task_manager/index.ts b/x-pack/platform/test/task_manager_claimer_update_by_query/test_suites/task_manager/index.ts similarity index 100% rename from x-pack/test/task_manager_claimer_update_by_query/test_suites/task_manager/index.ts rename to x-pack/platform/test/task_manager_claimer_update_by_query/test_suites/task_manager/index.ts diff --git a/x-pack/test/task_manager_claimer_update_by_query/test_suites/task_manager/metrics_route.ts b/x-pack/platform/test/task_manager_claimer_update_by_query/test_suites/task_manager/metrics_route.ts similarity index 100% rename from x-pack/test/task_manager_claimer_update_by_query/test_suites/task_manager/metrics_route.ts rename to x-pack/platform/test/task_manager_claimer_update_by_query/test_suites/task_manager/metrics_route.ts diff --git a/x-pack/test/task_manager_claimer_update_by_query/test_suites/task_manager/migrations.ts b/x-pack/platform/test/task_manager_claimer_update_by_query/test_suites/task_manager/migrations.ts similarity index 100% rename from x-pack/test/task_manager_claimer_update_by_query/test_suites/task_manager/migrations.ts rename to x-pack/platform/test/task_manager_claimer_update_by_query/test_suites/task_manager/migrations.ts diff --git a/x-pack/test/task_manager_claimer_update_by_query/test_suites/task_manager/task_management.ts b/x-pack/platform/test/task_manager_claimer_update_by_query/test_suites/task_manager/task_management.ts similarity index 100% rename from x-pack/test/task_manager_claimer_update_by_query/test_suites/task_manager/task_management.ts rename to x-pack/platform/test/task_manager_claimer_update_by_query/test_suites/task_manager/task_management.ts diff --git a/x-pack/test/task_manager_claimer_update_by_query/test_suites/task_manager/task_management_removed_types.ts b/x-pack/platform/test/task_manager_claimer_update_by_query/test_suites/task_manager/task_management_removed_types.ts similarity index 100% rename from x-pack/test/task_manager_claimer_update_by_query/test_suites/task_manager/task_management_removed_types.ts rename to x-pack/platform/test/task_manager_claimer_update_by_query/test_suites/task_manager/task_management_removed_types.ts diff --git a/x-pack/test/task_manager_claimer_update_by_query/test_suites/task_manager/task_management_scheduled_at.ts b/x-pack/platform/test/task_manager_claimer_update_by_query/test_suites/task_manager/task_management_scheduled_at.ts similarity index 100% rename from x-pack/test/task_manager_claimer_update_by_query/test_suites/task_manager/task_management_scheduled_at.ts rename to x-pack/platform/test/task_manager_claimer_update_by_query/test_suites/task_manager/task_management_scheduled_at.ts diff --git a/x-pack/test/task_manager_claimer_update_by_query/test_suites/task_manager/task_priority.ts b/x-pack/platform/test/task_manager_claimer_update_by_query/test_suites/task_manager/task_priority.ts similarity index 100% rename from x-pack/test/task_manager_claimer_update_by_query/test_suites/task_manager/task_priority.ts rename to x-pack/platform/test/task_manager_claimer_update_by_query/test_suites/task_manager/task_priority.ts diff --git a/x-pack/platform/test/tsconfig.json b/x-pack/platform/test/tsconfig.json index a70cc0c9cc38..2cb6d7405c47 100644 --- a/x-pack/platform/test/tsconfig.json +++ b/x-pack/platform/test/tsconfig.json @@ -16,6 +16,7 @@ "allowJs": false }, "include": [ + "index.d.ts", "**/*", "../../../typings/**/*", "../../../src/platform/packages/shared/kbn-test/types/ftr_globals/**/*", @@ -94,5 +95,9 @@ "@kbn/stack-alerts-plugin", "@kbn/triggers-actions-ui-plugin", "@kbn/alerts-as-data-utils", + "@kbn/dev-proc-runner", + "@kbn/repo-info", + "@kbn/dev-cli-errors", + "@kbn/journeys", ] } diff --git a/x-pack/test/plugin_api_perf/plugins/task_manager_performance/package.json b/x-pack/test/plugin_api_perf/plugins/task_manager_performance/package.json deleted file mode 100644 index 88b3fd43994e..000000000000 --- a/x-pack/test/plugin_api_perf/plugins/task_manager_performance/package.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "@kbn/task-manager-performance-plugin", - "version": "1.0.0", - "kibana": { - "version": "kibana", - "templateVersion": "1.0.0" - }, - "main": "target/test/plugin_api_perf/plugins/task_manager_performance", - "scripts": { - "kbn": "node ../../../../../scripts/kbn.js", - "build": "rm -rf './target' && ../../../../../node_modules/.bin/tsc" - }, - "license": "Elastic License 2.0" -} \ No newline at end of file diff --git a/x-pack/test/task_manager_claimer_update_by_query/plugins/sample_task_plugin_mget/package.json b/x-pack/test/task_manager_claimer_update_by_query/plugins/sample_task_plugin_mget/package.json deleted file mode 100644 index 6a6bd436fc30..000000000000 --- a/x-pack/test/task_manager_claimer_update_by_query/plugins/sample_task_plugin_mget/package.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "@kbn/sample-task-plugin-update-by-query", - "version": "1.0.0", - "kibana": { - "version": "kibana", - "templateVersion": "1.0.0" - }, - "main": "target/test/task_manager_claimer_update_by_query/plugins/sample_task_plugin_update_by_query", - "scripts": { - "kbn": "node ../../../../../scripts/kbn.js", - "build": "rm -rf './target' && ../../../../../node_modules/.bin/tsc" - }, - "license": "Elastic License 2.0" -} \ No newline at end of file diff --git a/x-pack/test/tsconfig.json b/x-pack/test/tsconfig.json index 951050c4cbf9..474a7e150738 100644 --- a/x-pack/test/tsconfig.json +++ b/x-pack/test/tsconfig.json @@ -56,10 +56,8 @@ "@kbn/repo-info", "@kbn/tooling-log", "@kbn/dev-utils", - "@kbn/dev-proc-runner", "@kbn/ftr-common-functional-services", "@kbn/expect", - "@kbn/dev-cli-errors", "@kbn/ci-stats-reporter", "@kbn/std", "@kbn/apm-synthtrace", @@ -89,7 +87,6 @@ "@kbn/core-provider-plugin", "@kbn/user-profile-components", "@kbn/apm-synthtrace-client", - "@kbn/journeys", "@kbn/cloud-integration-saml-provider-plugin", "@kbn/security-api-integration-helpers", "@kbn/alerts-as-data-utils", @@ -130,7 +127,6 @@ "@kbn/apm-data-view", "@kbn/search-types", "@kbn/alerting-comparators", - "@kbn/alerting-state-types", "@kbn/reporting-server", "@kbn/data-quality-plugin", "@kbn/observability-synthetics-test-data", diff --git a/yarn.lock b/yarn.lock index 0430913d670c..f9657c21bb77 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6973,7 +6973,7 @@ version "0.0.0" uid "" -"@kbn/sample-task-plugin-update-by-query@link:x-pack/test/task_manager_claimer_update_by_query/plugins/sample_task_plugin_mget": +"@kbn/sample-task-plugin-update-by-query@link:x-pack/platform/test/task_manager_claimer_update_by_query/plugins/sample_task_plugin_mget": version "0.0.0" uid "" @@ -7753,7 +7753,7 @@ version "0.0.0" uid "" -"@kbn/task-manager-performance-plugin@link:x-pack/test/plugin_api_perf/plugins/task_manager_performance": +"@kbn/task-manager-performance-plugin@link:x-pack/platform/test/plugin_api_perf/plugins/task_manager_performance": version "0.0.0" uid ""