From 49bdff8ee748eed94d78e89664d99cda8046f34d Mon Sep 17 00:00:00 2001 From: Dzmitry Lemechko Date: Wed, 9 Jul 2025 18:41:40 +0300 Subject: [PATCH 01/11] [ska] relocate oblt deployment-agnostic api integration tests (#227194) ## Summary Part of https://github.com/elastic/kibana-team/issues/1503 This PR is mostly about moving **observability deployment-agnostic tests** from x-pack/test ``` x-pack/test/api_integration/deployment_agnostic/ | - observability/apis/ | - configs/ | - feature_flag_configs/ ``` After: ``` x-pack/solutions/observability/test/api_integration_deployment_agnostic/ | - apis/ | - configs/ | - feature_flag_configs/ ``` Notes: - some services like `alertingApi` and `observabilityAIAssistantApi` were left as copies in original path as other oblt tests depend on them and we try to avoid circular dependencies caused by importing from solution test dirs. --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit 84800836b145b8ba61655edb6e6548ec98e3e234) # Conflicts: # .buildkite/ftr_oblt_serverless_configs.yml # .buildkite/ftr_oblt_stateful_configs.yml # .buildkite/pipelines/es_serverless/verify_es_serverless_image.yml # .github/CODEOWNERS # src/dev/precommit_hook/casing_check_config.js # x-pack/platform/test/api_integration_deployment_agnostic/default_configs/common_paths.ts # x-pack/solutions/observability/plugins/observability_onboarding/README.md # x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/product_docs/index.xml # x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/product_docs/kb-product-doc-elasticsearch-0.0.zip # x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/product_docs/kb-product-doc-kibana-0.0.zip # x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/product_docs/kb-product-doc-observability-0.0.zip # x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/product_docs/kb-product-doc-security-0.0.zip # x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/knowledge_base_8.16_upgrade_test.spec.ts # x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/knowledge_base_bulk_import.spec.ts # x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/local/index.ts # x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/public_complete/public_complete.spec.ts # x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/traces/critical_path.spec.ts # x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/onboarding/update_progress.ts # x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/meta_data.ts # x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/metadata.ts # x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/queries.ts # x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/significant_events.ts # x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/create_monitor_project_multi_space.ts # x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/legacy_and_multispace_monitor_api.ts # x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.ai_assistant_local.index.ts # x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.ai_assistant_local.serverless.config.ts # x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.index.ts # x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.ai_assistant.index.ts # x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.ai_assistant.stateful.config.ts # x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.ai_assistant_local.index.ts # x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.ai_assistant_local.stateful.config.ts # x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.index.ts # x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/metadata.ts # x-pack/test/api_integration/deployment_agnostic/feature_flag_configs/serverless/oblt.index.ts # x-pack/test/api_integration/deployment_agnostic/feature_flag_configs/stateful/oblt.index.ts # x-pack/test/tsconfig.json --- .buildkite/ftr_oblt_serverless_configs.yml | 14 +- .buildkite/ftr_oblt_stateful_configs.yml | 6 +- .../verify_es_serverless_image.yml | 68 +- .eslintrc.js | 5 +- .github/CODEOWNERS | 75 +- .github/paths-labeller.yml | 4 +- src/dev/run_check_file_casing.ts | 2 +- .../plugins/shared/dataset_quality/README.md | 22 +- .../default_configs/common_paths.ts | 2 +- .../plugins/apm/scripts/test/dat.js | 2 +- .../observability/plugins/slo/README.md | 12 +- .../plugins/synthetics/README.md | 11 +- .../custom_threshold_rule_data_view.ts | 1 - .../observability/index.ts | 1 - .../observability/metric_threshold_rule.ts | 1 - .../anonymization/anonymization.spec.ts | 2 +- .../apis}/ai_assistant/chat/chat.spec.ts | 2 +- .../ai_assistant/complete/complete.spec.ts | 2 +- .../complete/functions/alerts.spec.ts | 2 +- .../complete/functions/context.spec.ts | 2 +- .../complete/functions/elasticsearch.spec.ts | 2 +- .../complete/functions/execute_query.spec.ts | 2 +- .../functions/get_alerts_dataset_info.spec.ts | 2 +- .../functions/get_dataset_info.spec.ts | 2 +- .../complete/functions/recall.spec.ts | 2 +- .../functions/retrieve_elastic_doc.spec.ts | 2 +- .../complete/functions/summarize.spec.ts | 2 +- .../functions/title_conversation.spec.ts | 2 +- .../functions/visualize_query.spec.ts | 2 +- .../complete/product_docs/index.xml | 16 + .../kb-product-doc-elasticsearch-0.0.zip | Bin 0 -> 626 bytes .../kb-product-doc-kibana-0.0.zip | Bin 0 -> 5225 bytes .../kb-product-doc-observability-0.0.zip | Bin 0 -> 626 bytes .../kb-product-doc-security-0.0.zip | Bin 0 -> 621 bytes .../connectors/connectors.spec.ts | 2 +- .../conversations/conversations.spec.ts | 4 +- .../distributed_lock_manager.spec.ts | 2 +- .../apis}/ai_assistant/index.ts | 2 +- .../index_assets/index_assets.spec.ts | 2 +- .../knowledge_base_8.10_upgrade_test.spec.ts | 2 +- .../knowledge_base_8.16_upgrade_test.spec.ts | 2 +- .../knowledge_base_8.18_upgrade_test.spec.ts | 2 +- .../knowledge_base_basic_operations.spec.ts | 2 +- .../knowledge_base_bulk_import.spec.ts | 58 + ...base_change_model_from_elser_to_e5.spec.ts | 2 +- ...knowledge_base_reindex_concurrency.spec.ts | 2 +- .../knowledge_base_setup.spec.ts | 2 +- .../knowledge_base_status.spec.ts | 2 +- .../knowledge_base_user_instructions.spec.ts | 2 +- .../knowledge_base_warmup_model.spec.ts | 2 +- .../snapshots/snapshot_kb_8.10/index-0 | 0 .../snapshots/snapshot_kb_8.10/index.latest | Bin .../0/index-KxGoXW9rQlmlCfPaW8lMYA | Bin .../0/snap-9Wej6Q4gRZWSblPzNrtLOQ.dat | Bin .../meta-3cLp9JQBDFLNeO2pjufJ.dat | Bin .../meta-9Wej6Q4gRZWSblPzNrtLOQ.dat | Bin .../snap-9Wej6Q4gRZWSblPzNrtLOQ.dat | Bin .../snapshots/snapshot_kb_8.16/index-2 | 0 .../snapshots/snapshot_kb_8.16/index.latest | Bin .../0/__06CPqevQQOmvowG1MpCD-g | Bin .../0/__4vijD3jIRDKIsqLVeCyiRg | Bin .../0/__67_8A2HNTvS9VX_pNYgoGw | Bin .../0/__BLiiHnFWQhW5EoLYh86Csg | Bin .../0/__BWt56U-gTom2lEcvFItpdg | Bin .../0/__D420iyS_RrOpKLE5V4CKYA | Bin .../0/__D_1rlwiZSf26cF3O5bxszQ | Bin .../0/__FxtJJJycSD2Seyxdr6QVGw | Bin .../0/__GwPjXn70RheLT-KpbFv81w | Bin .../0/__H34FA1J7SoWVKoGOWJlSiw | Bin .../0/__LAUFvO8FTlaqxCpF7pLXRw | Bin .../0/__Lw5ZKbaITR64_ormwZVmog | Bin .../0/__MiOlmmuaQLus8qTMapK-HA | Bin .../0/__PCbIJy9NR66eWvkmj0W2yA | Bin .../0/__PSVIIb94R6WGZknZiAJvGg | Bin .../0/__REtuRhUpTfSBtRs_dN0fZg | Bin .../0/__Rl_c6BJPTGW7E5uuo5eDIw | Bin .../0/__SPQW2ou3T02QJxsmOrrvMg | Bin .../0/__SfcedHiHRXaOxmmxYtbFlw | Bin .../0/__TpwosEuPRm-uCXdsyY4hFw | Bin .../0/__VTFzLU52RuiM9HxDBWOPhA | Bin .../0/__YBl88oxKQiSI1qHr2GLwxQ | Bin .../0/___mIOvmULQBWV2zkBoDVveA | Bin .../0/__aG94RvZxT8Ksa-xz2fgEvg | Bin .../0/__aRTsRTBPQpSlnI2YORTeYA | Bin .../0/__kRTD6xS5Qxin-dxmKsTBMw | Bin .../0/__l7M6Slx7T5CDnEKFqR8-gg | Bin .../0/__m0R_-B8CSsG44znmiNNN2Q | Bin .../0/__oodLbOo3TDKZc57aEYPLCw | Bin .../0/__rgBY_HmwRe2Yl7mgBTfiEw | Bin .../0/__tNe8csu0QoO6dTqllqk_dA | Bin .../0/__ucs8kEFbS3SLJlPbej4NLw | Bin .../0/index-FWDT04_LTIaFE_BxwPeJfA | Bin .../0/snap-y1zcTBUTQFuKFwMMbi7VvQ.dat | Bin .../meta-ZOmqhpYBNSJu_urmZ8Mp.dat | Bin .../meta-y1zcTBUTQFuKFwMMbi7VvQ.dat | Bin .../snap-y1zcTBUTQFuKFwMMbi7VvQ.dat | Bin .../snapshots/snapshot_kb_8.18/index-0 | 0 .../snapshots/snapshot_kb_8.18/index.latest | Bin .../0/__fd1J8ir-QFu4E0UfWCe62A | Bin .../0/__oE6vUpmtRsOKre8fj4wmPQ | Bin .../0/index-E0OyraKORESn_utIfSkkyg | Bin .../0/snap-oHvKVUVfQ4W501XyBty3_Q.dat | Bin .../meta-qUpWgZYBfn3I2UYp5TrQ.dat | Bin .../meta-oHvKVUVfQ4W501XyBty3_Q.dat | Bin .../snap-oHvKVUVfQ4W501XyBty3_Q.dat | Bin .../apis/ai_assistant/local/index.ts | 16 + .../public_complete/public_complete.spec.ts | 2 +- .../create_synthetic_apm_data.ts | 2 +- .../synthtrace_scenarios/simple_logs.ts | 0 .../ai_assistant/utils/advanced_settings.ts | 26 + .../apis/ai_assistant/utils/alerts.ts | 81 ++ .../apis/ai_assistant/utils/conversation.ts | 225 +++ .../ai_assistant/utils/create_llm_proxy.ts | 424 ++++++ .../ai_assistant/utils/create_openai_chunk.ts | 28 + .../apis/ai_assistant/utils/index_assets.ts | 89 ++ .../apis/ai_assistant/utils/kibana_mocks.ts | 38 + .../apis/ai_assistant/utils/knowledge_base.ts | 297 ++++ .../ai_assistant/utils/model_and_inference.ts | 273 ++++ .../observability_ai_assistant_api_client.ts | 168 +++ .../ai_assistant/utils/product_doc_base.ts | 37 + .../apis/ai_assistant/utils/sample_docs.ts | 52 + .../apis/ai_assistant/utils/snapshots.ts | 52 + .../apis/ai_assistant/utils/tasks.ts | 32 + .../apis/ai_assistant/utils/time.ts | 20 + .../alerting/burn_rate/burn_rate_rule.ts | 2 +- .../burn_rate/consumers_and_privileges.ts | 2 +- .../apis}/alerting/burn_rate/index.ts | 2 +- .../custom_threshold/avg_pct_fired.ts | 2 +- .../custom_threshold/avg_pct_no_data.ts | 2 +- .../custom_threshold/avg_ticks_fired.ts | 2 +- .../cardinality_runtime_field_fired.ts | 2 +- .../alerting/custom_threshold/constants.ts | 0 .../consumers_and_privileges.ts | 2 +- .../custom_eq_avg_bytes_fired.ts | 2 +- .../custom_threshold/documents_count_fired.ts | 2 +- .../custom_threshold/group_by_fired.ts | 2 +- .../custom_threshold/helpers/syntrace.ts | 0 .../apis}/alerting/custom_threshold/index.ts | 2 +- .../custom_threshold/p99_pct_fired.ts | 2 +- .../custom_threshold/rate_bytes_fired.ts | 2 +- .../apis}/alerting/custom_threshold/types.ts | 0 .../es_query/consumers_and_privileges.ts | 2 +- .../apis}/alerting/es_query/index.ts | 2 +- .../apis}/alerting/es_query/query_dsl.ts | 2 +- .../es_query/query_dsl_with_group_by.ts | 2 +- .../apis}/alerting/es_query/types.ts | 0 .../apis}/alerting/index.ts | 2 +- .../alerting/synthetics/alert_on_no_data.ts | 6 +- .../alerting/synthetics/custom_status_rule.ts | 6 +- .../apis}/alerting/synthetics/data.ts | 0 .../synthetics/synthetics_default_rule.ts | 4 +- .../synthetics/synthetics_rule_helper.ts | 4 +- .../apm/agent_explorer/agent_explorer.spec.ts | 2 +- .../apis}/apm/agent_explorer/index.ts | 2 +- .../latest_agent_versions.spec.ts | 2 +- .../apm/alerts/error_count_threshold.spec.ts | 4 +- .../apis}/apm/alerts/generate_data.ts | 0 .../apm/alerts/helpers/alerting_helper.ts | 96 ++ .../apis}/apm/alerts/index.ts | 2 +- .../alerts/preview_chart_error_count.spec.ts | 2 +- .../alerts/preview_chart_error_rate.spec.ts | 2 +- ...preview_chart_transaction_duration.spec.ts | 2 +- .../apm/alerts/transaction_duration.spec.ts | 4 +- .../apm/alerts/transaction_error_rate.spec.ts | 4 +- .../apis}/apm/cold_start/cold_start.spec.ts | 2 +- .../cold_start_by_transaction_name.spec.ts | 2 +- .../apis}/apm/cold_start/index.ts | 2 +- .../apis}/apm/constants/archiver.ts | 0 .../apis}/apm/constants/archives_metadata.ts | 2 +- .../correlations/failed_transactions.spec.ts | 2 +- .../apm/correlations/field_candidates.spec.ts | 2 +- .../correlations/field_value_pairs.spec.ts | 2 +- .../apis}/apm/correlations/index.ts | 2 +- .../apis}/apm/correlations/latency.spec.ts | 2 +- .../apis}/apm/correlations/p_values.spec.ts | 2 +- .../significant_correlations.spec.ts | 2 +- .../apis}/apm/custom_dashboards/api_helper.ts | 2 +- .../custom_dashboards.spec.ts | 2 +- .../apis}/apm/custom_dashboards/index.ts | 2 +- .../apis}/apm/data_view/index.ts | 2 +- .../apis}/apm/data_view/static.spec.ts | 4 +- .../dependencies/dependency_metrics.spec.ts | 4 +- .../apis}/apm/dependencies/generate_data.ts | 0 .../dependencies/generate_operation_data.ts | 0 .../apis}/apm/dependencies/index.ts | 2 +- .../apis}/apm/dependencies/metadata.spec.ts | 2 +- .../apm/dependencies/top_dependencies.spec.ts | 2 +- .../apm/dependencies/top_operations.spec.ts | 2 +- .../apis}/apm/dependencies/top_spans.spec.ts | 2 +- .../dependencies/upstream_services.spec.ts | 2 +- .../apis}/apm/diagnostics/apm_events.spec.ts | 2 +- .../apm/diagnostics/data_streams.spec.ts | 2 +- .../apis}/apm/diagnostics/index.ts | 2 +- .../index_pattern_settings.spec.ts | 2 +- .../apm/diagnostics/index_templates.spec.ts | 2 +- .../apis}/apm/diagnostics/indices.spec.ts | 2 +- .../apis}/apm/diagnostics/privileges.spec.ts | 2 +- .../apm/environment/get_environment.spec.ts | 2 +- .../apis}/apm/environment/index.ts | 2 +- .../apis}/apm/error_rate/index.ts | 2 +- .../apis}/apm/error_rate/service_apis.spec.ts | 2 +- .../apis}/apm/error_rate/service_maps.spec.ts | 2 +- .../apis}/apm/errors/distribution.spec.ts | 2 +- .../apis}/apm/errors/error_group_list.spec.ts | 2 +- .../apis}/apm/errors/generate_data.ts | 0 .../apis}/apm/errors/group_id_samples.spec.ts | 2 +- .../apis}/apm/errors/index.ts | 2 +- .../generate_data.ts | 0 .../top_erroneous_transactions.spec.ts | 2 +- .../generate_data.ts | 0 .../top_errors_main_stats.spec.ts | 2 +- .../apm/historical_data/has_data.spec.ts | 2 +- .../apis}/apm/historical_data/index.ts | 2 +- .../apis}/apm/index.ts | 2 +- .../apis}/apm/infrastructure/generate_data.ts | 0 .../apis}/apm/infrastructure/index.ts | 2 +- .../infrastructure_attributes.spec.ts | 2 +- .../apis/apm/inspect}/index.ts | 4 +- .../apis}/apm/inspect/inspect.spec.ts | 2 +- .../apis}/apm/latency/index.ts | 2 +- .../apis}/apm/latency/service_apis.spec.ts | 2 +- .../apis}/apm/latency/service_maps.spec.ts | 2 +- .../apis}/apm/metrics/index.ts | 2 +- .../apis}/apm/metrics/memory/generate_data.ts | 0 .../apm/metrics/memory/memory_metrics.spec.ts | 2 +- .../apis}/apm/metrics/metrics_charts.spec.ts | 4 +- .../apm/metrics/serverless/generate_data.ts | 0 .../serverless_active_instances.spec.ts | 2 +- .../serverless_functions_overview.spec.ts | 2 +- .../serverless_metrics_charts.spec.ts | 2 +- .../serverless/serverless_summary.spec.ts | 2 +- .../mobile/crashes/crash_group_list.spec.ts | 2 +- .../apm/mobile/crashes/distribution.spec.ts | 2 +- .../apis}/apm/mobile/crashes/generate_data.ts | 0 .../apis}/apm/mobile/errors/generate_data.ts | 0 .../mobile/errors/group_id_samples.spec.ts | 2 +- .../apis}/apm/mobile/generate_mobile_data.ts | 0 .../apis}/apm/mobile/index.ts | 2 +- ...obile_detailed_statistics_by_field.spec.ts | 2 +- .../apis}/apm/mobile/mobile_filters.spec.ts | 2 +- .../mobile_http_requests_timeseries.spec.ts | 2 +- .../apm/mobile/mobile_location_stats.spec.ts | 2 +- .../mobile_main_statistics_by_field.spec.ts | 2 +- .../apm/mobile/mobile_most_used_chart.spec.ts | 2 +- .../mobile/mobile_sessions_timeseries.spec.ts | 2 +- .../apis}/apm/mobile/mobile_stats.spec.ts | 2 +- .../apm/mobile/mobile_terms_by_field.spec.ts | 2 +- .../observability_overview/has_data.spec.ts | 2 +- .../apis}/apm/observability_overview/index.ts | 2 +- .../observability_overview.spec.ts | 4 +- .../apis}/apm/service_groups/index.ts | 2 +- .../service_groups/save_service_group.spec.ts | 6 +- .../service_group_count/generate_data.ts | 0 .../service_group_count.spec.ts | 2 +- .../service_group_with_overflow/es_utils.ts | 0 .../generate_data.ts | 0 .../service_group_with_overflow.spec.ts | 2 +- .../service_groups_api_methods.ts | 2 +- .../apis}/apm/service_maps/index.ts | 2 +- .../apm/service_maps/service_maps.spec.ts | 4 +- .../service_maps_kuery_filter.spec.ts | 2 +- .../apis}/apm/service_maps/utils.ts | 0 .../service_nodes/get_service_nodes.spec.ts | 2 +- .../apis}/apm/service_nodes/index.ts | 2 +- .../instances_detailed_statistics.spec.snap | 0 .../service_overview/dependencies/es_utils.ts | 0 .../dependencies/generate_data.ts | 0 .../dependencies/index.spec.ts | 2 +- .../apm/service_overview/generate_data.ts | 0 .../service_overview/get_service_node_ids.ts | 0 .../apis}/apm/service_overview/index.ts | 2 +- .../service_overview/instance_details.spec.ts | 2 +- .../instances_detailed_statistics.spec.ts | 2 +- .../instances_main_statistics.spec.ts | 2 +- ...error_groups_detailed_statistics.spec.snap | 0 .../apis}/apm/services/agent.spec.ts | 4 +- ...chive_services_detailed_statistics.spec.ts | 2 +- .../apm/services/derived_annotations.spec.ts | 2 +- .../error_groups_detailed_statistics.spec.ts | 2 +- .../error_groups_main_statistics.spec.ts | 2 +- .../services/error_groups/generate_data.ts | 0 .../error_groups/get_error_group_ids.ts | 2 +- .../get_service_node_metadata.spec.ts | 2 +- .../apis}/apm/services/index.ts | 2 +- .../apis}/apm/services/service_alerts.spec.ts | 2 +- .../services/service_details/generate_data.ts | 0 .../service_details/service_details.spec.ts | 2 +- .../service_infra_metrics.spec.ts | 4 +- .../services/service_icons/generate_data.ts | 0 .../service_icons/service_icons.spec.ts | 2 +- .../services_detailed_statistics.spec.ts | 2 +- .../apis}/apm/services/throughput.spec.ts | 2 +- .../apis}/apm/services/top_services.spec.ts | 2 +- .../apm/services/transaction_types.spec.ts | 2 +- .../settings/agent_keys/agent_keys.spec.ts | 8 +- .../settings/anomaly_detection/basic.spec.ts | 4 +- .../anomaly_detection/read_user.spec.ts | 4 +- .../settings/apm_indices/apm_indices.spec.ts | 2 +- .../settings/custom_link/custom_link.spec.ts | 4 +- .../apis}/apm/settings/index.ts | 2 +- .../apis}/apm/span_links/data_generator.ts | 0 .../apis}/apm/span_links/index.ts | 2 +- .../apis}/apm/span_links/span_links.spec.ts | 2 +- .../apis}/apm/suggestions/generate_data.ts | 0 .../apis}/apm/suggestions/index.ts | 2 +- .../apis}/apm/suggestions/suggestions.spec.ts | 2 +- .../apm/throughput/dependencies_apis.spec.ts | 2 +- .../apis}/apm/throughput/index.ts | 2 +- .../apis}/apm/throughput/service_apis.spec.ts | 2 +- .../apis}/apm/throughput/service_maps.spec.ts | 2 +- .../apis}/apm/time_range_metadata/index.ts | 2 +- .../many_apm_server_versions.spec.ts | 4 +- .../time_range_metadata.spec.ts | 2 +- .../traces/__snapshots__/top_traces.spec.snap | 0 .../apis}/apm/traces/critical_path.spec.ts | 4 +- .../apis}/apm/traces/find_traces.spec.ts | 4 +- .../apis}/apm/traces/focused_trace.spec.ts | 2 +- .../apis}/apm/traces/generate_trace.ts | 0 .../apis}/apm/traces/index.ts | 2 +- .../large_trace/generate_large_trace.ts | 0 .../traces/large_trace/large_trace.spec.ts | 4 +- .../apis}/apm/traces/span_details.spec.ts | 2 +- .../apis}/apm/traces/top_traces.spec.ts | 2 +- .../apis}/apm/traces/trace_by_id.spec.ts | 2 +- .../apm/traces/transaction_details.spec.ts | 2 +- .../apis}/apm/transactions/breakdown.spec.ts | 2 +- .../apis}/apm/transactions/error_rate.spec.ts | 2 +- .../apis}/apm/transactions/index.ts | 2 +- .../apis}/apm/transactions/latency.spec.ts | 2 +- .../latency_overall_distribution.spec.ts | 2 +- .../apm/transactions/trace_samples.spec.ts | 2 +- .../transactions_groups_alerts.spec.ts | 2 +- ...actions_groups_detailed_statistics.spec.ts | 4 +- ...ransactions_groups_main_statistics.spec.ts | 2 +- .../apis}/apm/utils/common.ts | 0 .../apis}/dataset_quality/chart_preview.ts | 4 +- .../check_and_load_integration.ts | 4 +- .../custom_mappings/custom_synth_mappings.ts | 0 .../dataset_quality/data_stream_details.ts | 4 +- .../dataset_quality/data_stream_rollover.ts | 4 +- .../dataset_quality/data_stream_settings.ts | 4 +- .../dataset_quality/data_stream_total_docs.ts | 4 +- .../data_streams_failure_store.ts | 2 +- .../apis}/dataset_quality/degraded_docs.ts | 4 +- .../dataset_quality/degraded_field_analyze.ts | 4 +- .../dataset_quality/degraded_field_values.ts | 4 +- .../apis}/dataset_quality/degraded_fields.ts | 4 +- .../apis}/dataset_quality/failed_docs.ts | 4 +- .../dataset_quality/failed_docs_errors.ts | 4 +- .../dataset_quality/failed_docs_stats.ts | 4 +- .../apis}/dataset_quality/index.ts | 2 +- .../dataset_quality/integration_dashboards.ts | 4 +- .../apis}/dataset_quality/integrations.ts | 4 +- .../apis}/dataset_quality/processors/index.ts | 0 .../dataset_quality/update_field_limit.ts | 4 +- .../apis}/dataset_quality/utils/es_utils.ts | 0 .../apis}/dataset_quality/utils/index.ts | 0 .../fixtures/dashboards_default_space.ndjson | 0 .../fixtures/dashboards_test_space.ndjson | 0 .../apis}/incident_management/index.ts | 2 +- .../suggested_dashboards.ts | 2 +- .../apis}/infra/index.ts | 2 +- .../apis}/infra/infra.ts | 4 +- .../apis}/infra/infra_asset_count.ts | 4 +- .../apis}/infra/inventory_threshold_alert.ts | 2 +- .../apis}/infra/ip_to_hostname.ts | 4 +- .../apis}/infra/metadata.ts | 4 +- .../apis}/infra/metrics_overview_top.ts | 4 +- .../apis}/infra/metrics_process_list.ts | 4 +- .../apis}/infra/metrics_process_list_chart.ts | 4 +- .../apis}/infra/node_details.ts | 4 +- .../apis}/infra/services.ts | 4 +- .../apis}/infra/snapshot.ts | 4 +- .../apis}/infra/sources.ts | 4 +- .../apis}/infra/utils/constants.ts | 0 .../apis}/infra/utils/create_fake_logger.ts | 0 .../apis}/onboarding/get_progress.ts | 4 +- .../apis/onboarding}/index.ts | 6 +- .../apis/onboarding/update_progress.ts | 122 ++ .../apis}/slo/bulk_delete.ts | 2 +- .../apis}/slo/create_slo.ts | 2 +- .../apis}/slo/delete_slo.ts | 2 +- .../apis}/slo/find_slo.ts | 2 +- .../apis}/slo/find_slo_definition.ts | 2 +- .../apis}/slo/fixtures/slo.ts | 0 .../apis}/slo/get_slo.ts | 2 +- .../apis}/slo/helpers/dataforge.ts | 0 .../apis}/slo/helpers/transform.ts | 2 +- .../apis}/slo/index.ts | 2 +- .../apis}/slo/reset_slo.ts | 2 +- .../apis}/slo/update_slo.ts | 2 +- .../apis}/streams/assets/dashboard.ts | 2 +- .../apis}/streams/basic.ts | 2 +- .../apis}/streams/classic.ts | 2 +- .../apis}/streams/conflicts.ts | 2 +- .../apis}/streams/content.ts | 2 +- .../apis}/streams/discover.ts | 2 +- .../apis}/streams/enrichment.ts | 2 +- .../apis}/streams/flush_config.ts | 2 +- .../apis}/streams/group_streams.ts | 2 +- .../apis}/streams/helpers/create_streams.ts | 0 .../apis}/streams/helpers/dashboards.ts | 0 .../streams/helpers/repository_client.ts | 2 +- .../apis}/streams/helpers/requests.ts | 0 .../apis}/streams/index.ts | 2 +- .../apis}/streams/lifecycle.ts | 2 +- .../apis}/streams/meta_data.ts | 2 +- .../apis/streams/metadata.ts | 74 + .../apis}/streams/migration_on_read.ts | 2 +- .../streams/processing_date_suggestions.ts | 2 +- .../apis}/streams/processing_simulate.ts | 2 +- .../apis}/streams/queries.ts | 4 +- .../apis}/streams/root_stream.ts | 2 +- .../apis}/streams/schema.ts | 2 +- .../apis}/streams/significant_events.ts | 2 +- .../apis}/synthetics/create_monitor.ts | 6 +- .../create_monitor_private_location.ts | 6 +- .../synthetics/create_monitor_project.ts | 6 +- .../create_monitor_project_multi_space.ts | 2 +- ...create_monitor_project_private_location.ts | 6 +- .../synthetics/create_monitor_public_api.ts | 2 +- ...ate_monitor_public_api_private_location.ts | 4 +- .../apis}/synthetics/create_update_params.ts | 4 +- .../apis}/synthetics/delete_monitor.ts | 6 +- .../synthetics/delete_monitor_project.ts | 4 +- .../apis}/synthetics/edit_monitor.ts | 4 +- .../edit_monitor_private_location.ts | 6 +- .../synthetics/edit_monitor_public_api.ts | 4 +- ...dit_monitor_public_api_private_location.ts | 4 +- .../apis}/synthetics/edit_private_location.ts | 6 +- .../synthetics/enable_default_alerting.ts | 4 +- .../synthetics/fixtures/browser_monitor.json | 0 .../synthetics/fixtures/http_monitor.json | 0 .../synthetics/fixtures/icmp_monitor.json | 0 .../fixtures/inspect_browser_monitor.json | 0 .../fixtures/project_browser_monitor.json | 0 .../fixtures/project_http_monitor.json | 0 .../fixtures/project_icmp_monitor.json | 0 .../fixtures/project_tcp_monitor.json | 0 .../synthetics/fixtures/tcp_monitor.json | 0 .../apis}/synthetics/get_filters.ts | 4 +- .../apis}/synthetics/get_monitor.ts | 6 +- .../apis}/synthetics/get_monitor_project.ts | 4 +- .../get_private_location_monitors.ts | 6 +- .../synthetics/helpers/get_fixture_json.ts | 0 .../apis}/synthetics/helpers/location.ts | 0 .../apis}/synthetics/helpers/monitor.ts | 0 .../apis}/synthetics/index.ts | 2 +- .../apis}/synthetics/inspect_monitor.ts | 6 +- .../legacy_and_multispace_monitor_api.ts | 2 +- .../synthetics/sample_data/test_policy.ts | 2 +- .../test_project_monitor_policy.ts | 2 +- .../apis}/synthetics/suggestions.ts | 4 +- .../apis}/synthetics/sync_global_params.ts | 4 +- .../apis}/synthetics/synthetics_enablement.ts | 4 +- .../apis}/synthetics/test_now_monitor.ts | 4 +- .../serverless/oblt.ai_assistant.index.ts | 2 +- .../oblt.ai_assistant.serverless.config.ts | 0 .../oblt.ai_assistant_local.index.ts | 15 + ...lt.ai_assistant_local.serverless.config.ts | 18 + .../configs/serverless/oblt.apm.index.ts | 2 +- .../serverless/oblt.apm.serverless.config.ts | 0 .../configs/serverless/oblt.index.ts | 10 +- .../serverless/oblt.serverless.config.ts | 0 .../configs/serverless/oblt.streams.index.ts | 2 +- .../oblt.streams.serverless.config.ts | 0 .../serverless/oblt.synthetics.index.ts | 2 +- .../oblt.synthetics.serverless.config.ts | 0 .../stateful/oblt.ai_assistant.index.ts | 13 + .../oblt.ai_assistant.stateful.config.ts | 29 + .../stateful/oblt.ai_assistant_local.index.ts | 13 + ...oblt.ai_assistant_local.stateful.config.ts | 17 + .../configs/stateful/oblt.apm.index.ts | 2 +- .../stateful/oblt.apm.stateful.config.ts | 0 .../configs/stateful/oblt.index.ts | 16 +- .../configs/stateful/oblt.stateful.config.ts | 0 .../serverless/oblt.index.ts | 18 + .../serverless/oblt.serverless.config.ts | 0 .../stateful/oblt.index.ts | 18 + .../stateful/oblt.stateful.config.ts | 0 .../services/alerting_api.ts | 1226 +++++++++++++++++ .../services/index.ts | 9 + .../observability_ai_assistant_api.ts | 182 +++ .../services/slo_api.ts | 0 .../services/synthetics_monitor.ts | 0 .../services/synthetics_private_location.ts | 0 .../services/synthtrace.ts | 47 + .../create_admin_service_from_repository.ts | 237 ++++ .../common/utils/synthtrace/apm_es_client.ts | 26 + .../utils/synthtrace/infra_es_client.ts | 17 + .../common/utils/synthtrace/logs_es_client.ts | 17 + .../observability/test/tsconfig.json | 26 + .../config_non_dedicated_task_runner.ts | 1 - .../security_and_spaces/config_basic.ts | 1 - .../security_and_spaces/config_trial.ts | 1 - .../apm/alerts/helpers/alerting_helper.ts | 83 -- .../deployment_agnostic/services/apm_api.ts | 211 --- .../deployment_agnostic/services/index.ts | 8 +- x-pack/test/tsconfig.json | 25 +- .../observability/streams/read_privilege.ts | 6 +- x-pack/test_serverless/tsconfig.json | 1 + 501 files changed, 4713 insertions(+), 824 deletions(-) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/anonymization/anonymization.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/chat/chat.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/complete/complete.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/complete/functions/alerts.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/complete/functions/context.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/complete/functions/elasticsearch.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/complete/functions/execute_query.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/complete/functions/get_alerts_dataset_info.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/complete/functions/get_dataset_info.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/complete/functions/recall.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/complete/functions/retrieve_elastic_doc.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/complete/functions/summarize.spec.ts (98%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/complete/functions/title_conversation.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/complete/functions/visualize_query.spec.ts (98%) create mode 100644 x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/product_docs/index.xml create mode 100644 x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/product_docs/kb-product-doc-elasticsearch-0.0.zip create mode 100644 x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/product_docs/kb-product-doc-kibana-0.0.zip create mode 100644 x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/product_docs/kb-product-doc-observability-0.0.zip create mode 100644 x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/product_docs/kb-product-doc-security-0.0.zip rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/connectors/connectors.spec.ts (98%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/conversations/conversations.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/distributed_lock_manager/distributed_lock_manager.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/index.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/index_assets/index_assets.spec.ts (98%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/knowledge_base/knowledge_base_8.10_upgrade_test.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/knowledge_base/knowledge_base_8.16_upgrade_test.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/knowledge_base/knowledge_base_8.18_upgrade_test.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/knowledge_base/knowledge_base_basic_operations.spec.ts (99%) create mode 100644 x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/knowledge_base_bulk_import.spec.ts rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/knowledge_base/knowledge_base_change_model_from_elser_to_e5.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/knowledge_base/knowledge_base_reindex_concurrency.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/knowledge_base/knowledge_base_setup.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/knowledge_base/knowledge_base_status.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/knowledge_base/knowledge_base_user_instructions.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/knowledge_base/knowledge_base_warmup_model.spec.ts (98%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.10/index-0 (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.10/index.latest (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.10/indices/oYscBShISaWpDm7n1KXkCA/0/index-KxGoXW9rQlmlCfPaW8lMYA (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.10/indices/oYscBShISaWpDm7n1KXkCA/0/snap-9Wej6Q4gRZWSblPzNrtLOQ.dat (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.10/indices/oYscBShISaWpDm7n1KXkCA/meta-3cLp9JQBDFLNeO2pjufJ.dat (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.10/meta-9Wej6Q4gRZWSblPzNrtLOQ.dat (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.10/snap-9Wej6Q4gRZWSblPzNrtLOQ.dat (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/index-2 (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/index.latest (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__06CPqevQQOmvowG1MpCD-g (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__4vijD3jIRDKIsqLVeCyiRg (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__67_8A2HNTvS9VX_pNYgoGw (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__BLiiHnFWQhW5EoLYh86Csg (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__BWt56U-gTom2lEcvFItpdg (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__D420iyS_RrOpKLE5V4CKYA (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__D_1rlwiZSf26cF3O5bxszQ (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__FxtJJJycSD2Seyxdr6QVGw (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__GwPjXn70RheLT-KpbFv81w (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__H34FA1J7SoWVKoGOWJlSiw (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__LAUFvO8FTlaqxCpF7pLXRw (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__Lw5ZKbaITR64_ormwZVmog (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__MiOlmmuaQLus8qTMapK-HA (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__PCbIJy9NR66eWvkmj0W2yA (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__PSVIIb94R6WGZknZiAJvGg (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__REtuRhUpTfSBtRs_dN0fZg (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__Rl_c6BJPTGW7E5uuo5eDIw (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__SPQW2ou3T02QJxsmOrrvMg (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__SfcedHiHRXaOxmmxYtbFlw (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__TpwosEuPRm-uCXdsyY4hFw (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__VTFzLU52RuiM9HxDBWOPhA (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__YBl88oxKQiSI1qHr2GLwxQ (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/___mIOvmULQBWV2zkBoDVveA (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__aG94RvZxT8Ksa-xz2fgEvg (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__aRTsRTBPQpSlnI2YORTeYA (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__kRTD6xS5Qxin-dxmKsTBMw (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__l7M6Slx7T5CDnEKFqR8-gg (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__m0R_-B8CSsG44znmiNNN2Q (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__oodLbOo3TDKZc57aEYPLCw (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__rgBY_HmwRe2Yl7mgBTfiEw (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__tNe8csu0QoO6dTqllqk_dA (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__ucs8kEFbS3SLJlPbej4NLw (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/index-FWDT04_LTIaFE_BxwPeJfA (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/snap-y1zcTBUTQFuKFwMMbi7VvQ.dat (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/meta-ZOmqhpYBNSJu_urmZ8Mp.dat (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/meta-y1zcTBUTQFuKFwMMbi7VvQ.dat (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/snap-y1zcTBUTQFuKFwMMbi7VvQ.dat (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.18/index-0 (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.18/index.latest (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.18/indices/xqR66eHHSniUBARvrCJl_w/0/__fd1J8ir-QFu4E0UfWCe62A (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.18/indices/xqR66eHHSniUBARvrCJl_w/0/__oE6vUpmtRsOKre8fj4wmPQ (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.18/indices/xqR66eHHSniUBARvrCJl_w/0/index-E0OyraKORESn_utIfSkkyg (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.18/indices/xqR66eHHSniUBARvrCJl_w/0/snap-oHvKVUVfQ4W501XyBty3_Q.dat (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.18/indices/xqR66eHHSniUBARvrCJl_w/meta-qUpWgZYBfn3I2UYp5TrQ.dat (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.18/meta-oHvKVUVfQ4W501XyBty3_Q.dat (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.18/snap-oHvKVUVfQ4W501XyBty3_Q.dat (100%) create mode 100644 x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/local/index.ts rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/public_complete/public_complete.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/synthtrace_scenarios/create_synthetic_apm_data.ts (94%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/ai_assistant/synthtrace_scenarios/simple_logs.ts (100%) create mode 100644 x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/utils/advanced_settings.ts create mode 100644 x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/utils/alerts.ts create mode 100644 x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/utils/conversation.ts create mode 100644 x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/utils/create_llm_proxy.ts create mode 100644 x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/utils/create_openai_chunk.ts create mode 100644 x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/utils/index_assets.ts create mode 100644 x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/utils/kibana_mocks.ts create mode 100644 x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/utils/knowledge_base.ts create mode 100644 x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/utils/model_and_inference.ts create mode 100644 x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/utils/observability_ai_assistant_api_client.ts create mode 100644 x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/utils/product_doc_base.ts create mode 100644 x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/utils/sample_docs.ts create mode 100644 x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/utils/snapshots.ts create mode 100644 x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/utils/tasks.ts create mode 100644 x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/utils/time.ts rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/alerting/burn_rate/burn_rate_rule.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/alerting/burn_rate/consumers_and_privileges.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/alerting/burn_rate/index.ts (86%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/alerting/custom_threshold/avg_pct_fired.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/alerting/custom_threshold/avg_pct_no_data.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/alerting/custom_threshold/avg_ticks_fired.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/alerting/custom_threshold/cardinality_runtime_field_fired.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/alerting/custom_threshold/constants.ts (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/alerting/custom_threshold/consumers_and_privileges.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/alerting/custom_threshold/custom_eq_avg_bytes_fired.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/alerting/custom_threshold/documents_count_fired.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/alerting/custom_threshold/group_by_fired.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/alerting/custom_threshold/helpers/syntrace.ts (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/alerting/custom_threshold/index.ts (92%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/alerting/custom_threshold/p99_pct_fired.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/alerting/custom_threshold/rate_bytes_fired.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/alerting/custom_threshold/types.ts (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/alerting/es_query/consumers_and_privileges.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/alerting/es_query/index.ts (88%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/alerting/es_query/query_dsl.ts (98%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/alerting/es_query/query_dsl_with_group_by.ts (98%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/alerting/es_query/types.ts (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/alerting/index.ts (86%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/alerting/synthetics/alert_on_no_data.ts (97%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/alerting/synthetics/custom_status_rule.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/alerting/synthetics/data.ts (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/alerting/synthetics/synthetics_default_rule.ts (97%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/alerting/synthetics/synthetics_rule_helper.ts (98%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/agent_explorer/agent_explorer.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/agent_explorer/index.ts (95%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/agent_explorer/latest_agent_versions.spec.ts (98%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/alerts/error_count_threshold.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/alerts/generate_data.ts (100%) create mode 100644 x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/alerts/helpers/alerting_helper.ts rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/alerts/index.ts (96%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/alerts/preview_chart_error_count.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/alerts/preview_chart_error_rate.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/alerts/preview_chart_transaction_duration.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/alerts/transaction_duration.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/alerts/transaction_error_rate.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/cold_start/cold_start.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/cold_start/cold_start_by_transaction_name.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/cold_start/index.ts (95%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/constants/archiver.ts (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/constants/archives_metadata.ts (71%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/correlations/failed_transactions.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/correlations/field_candidates.spec.ts (98%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/correlations/field_value_pairs.spec.ts (98%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/correlations/index.ts (96%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/correlations/latency.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/correlations/p_values.spec.ts (98%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/correlations/significant_correlations.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/custom_dashboards/api_helper.ts (96%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/custom_dashboards/custom_dashboards.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/custom_dashboards/index.ts (94%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/data_view/index.ts (94%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/data_view/static.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/dependencies/dependency_metrics.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/dependencies/generate_data.ts (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/dependencies/generate_operation_data.ts (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/dependencies/index.ts (96%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/dependencies/metadata.spec.ts (98%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/dependencies/top_dependencies.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/dependencies/top_operations.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/dependencies/top_spans.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/dependencies/upstream_services.spec.ts (98%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/diagnostics/apm_events.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/diagnostics/data_streams.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/diagnostics/index.ts (96%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/diagnostics/index_pattern_settings.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/diagnostics/index_templates.spec.ts (98%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/diagnostics/indices.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/diagnostics/privileges.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/environment/get_environment.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/environment/index.ts (94%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/error_rate/index.ts (94%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/error_rate/service_apis.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/error_rate/service_maps.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/errors/distribution.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/errors/error_group_list.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/errors/generate_data.ts (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/errors/group_id_samples.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/errors/index.ts (89%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/errors/top_erroneous_transactions/generate_data.ts (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/errors/top_erroneous_transactions/top_erroneous_transactions.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/errors/top_errors_for_transaction/generate_data.ts (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/errors/top_errors_for_transaction/top_errors_main_stats.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/historical_data/has_data.spec.ts (98%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/historical_data/index.ts (94%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/index.ts (98%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/infrastructure/generate_data.ts (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/infrastructure/index.ts (94%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/infrastructure/infrastructure_attributes.spec.ts (98%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability/onboarding => solutions/observability/test/api_integration_deployment_agnostic/apis/apm/inspect}/index.ts (83%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/inspect/inspect.spec.ts (97%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/latency/index.ts (94%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/latency/service_apis.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/latency/service_maps.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/metrics/index.ts (90%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/metrics/memory/generate_data.ts (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/metrics/memory/memory_metrics.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/metrics/metrics_charts.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/metrics/serverless/generate_data.ts (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/metrics/serverless/serverless_active_instances.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/metrics/serverless/serverless_functions_overview.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/metrics/serverless/serverless_metrics_charts.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/metrics/serverless/serverless_summary.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/mobile/crashes/crash_group_list.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/mobile/crashes/distribution.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/mobile/crashes/generate_data.ts (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/mobile/errors/generate_data.ts (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/mobile/errors/group_id_samples.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/mobile/generate_mobile_data.ts (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/mobile/index.ts (97%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/mobile/mobile_detailed_statistics_by_field.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/mobile/mobile_filters.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/mobile/mobile_http_requests_timeseries.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/mobile/mobile_location_stats.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/mobile/mobile_main_statistics_by_field.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/mobile/mobile_most_used_chart.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/mobile/mobile_sessions_timeseries.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/mobile/mobile_stats.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/mobile/mobile_terms_by_field.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/observability_overview/has_data.spec.ts (98%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/observability_overview/index.ts (95%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/observability_overview/observability_overview.spec.ts (98%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/service_groups/index.ts (95%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/service_groups/save_service_group.spec.ts (89%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/service_groups/service_group_count/generate_data.ts (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/service_groups/service_group_count/service_group_count.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/service_groups/service_group_with_overflow/es_utils.ts (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/service_groups/service_group_with_overflow/generate_data.ts (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/service_groups/service_group_with_overflow/service_group_with_overflow.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/service_groups/service_groups_api_methods.ts (96%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/service_maps/index.ts (85%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/service_maps/service_maps.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/service_maps/service_maps_kuery_filter.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/service_maps/utils.ts (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/service_nodes/get_service_nodes.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/service_nodes/index.ts (94%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/service_overview/__snapshots__/instances_detailed_statistics.spec.snap (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/service_overview/dependencies/es_utils.ts (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/service_overview/dependencies/generate_data.ts (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/service_overview/dependencies/index.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/service_overview/generate_data.ts (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/service_overview/get_service_node_ids.ts (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/service_overview/index.ts (96%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/service_overview/instance_details.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/service_overview/instances_detailed_statistics.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/service_overview/instances_main_statistics.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/services/__snapshots__/error_groups_detailed_statistics.spec.snap (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/services/agent.spec.ts (93%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/services/archive_services_detailed_statistics.spec.ts (98%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/services/derived_annotations.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/services/error_groups/error_groups_detailed_statistics.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/services/error_groups/error_groups_main_statistics.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/services/error_groups/generate_data.ts (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/services/error_groups/get_error_group_ids.ts (93%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/services/get_service_node_metadata.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/services/index.ts (93%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/services/service_alerts.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/services/service_details/generate_data.ts (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/services/service_details/service_details.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/services/service_details/service_infra_metrics.spec.ts (97%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/services/service_icons/generate_data.ts (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/services/service_icons/service_icons.spec.ts (98%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/services/services_detailed_statistics.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/services/throughput.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/services/top_services.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/services/transaction_types.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/settings/agent_keys/agent_keys.spec.ts (91%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/settings/anomaly_detection/basic.spec.ts (94%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/settings/anomaly_detection/read_user.spec.ts (94%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/settings/apm_indices/apm_indices.spec.ts (98%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/settings/custom_link/custom_link.spec.ts (98%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/settings/index.ts (89%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/span_links/data_generator.ts (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/span_links/index.ts (83%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/span_links/span_links.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/suggestions/generate_data.ts (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/suggestions/index.ts (94%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/suggestions/suggestions.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/throughput/dependencies_apis.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/throughput/index.ts (95%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/throughput/service_apis.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/throughput/service_maps.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/time_range_metadata/index.ts (85%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/time_range_metadata/many_apm_server_versions.spec.ts (98%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/time_range_metadata/time_range_metadata.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/traces/__snapshots__/top_traces.spec.snap (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/traces/critical_path.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/traces/find_traces.spec.ts (98%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/traces/focused_trace.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/traces/generate_trace.ts (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/traces/index.ts (90%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/traces/large_trace/generate_large_trace.ts (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/traces/large_trace/large_trace.spec.ts (97%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/traces/span_details.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/traces/top_traces.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/traces/trace_by_id.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/traces/transaction_details.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/transactions/breakdown.spec.ts (97%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/transactions/error_rate.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/transactions/index.ts (97%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/transactions/latency.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/transactions/latency_overall_distribution.spec.ts (98%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/transactions/trace_samples.spec.ts (97%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/transactions/transactions_groups_alerts.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/transactions/transactions_groups_detailed_statistics.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/transactions/transactions_groups_main_statistics.spec.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/apm/utils/common.ts (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/dataset_quality/chart_preview.ts (98%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/dataset_quality/check_and_load_integration.ts (98%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/dataset_quality/custom_mappings/custom_synth_mappings.ts (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/dataset_quality/data_stream_details.ts (96%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/dataset_quality/data_stream_rollover.ts (94%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/dataset_quality/data_stream_settings.ts (98%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/dataset_quality/data_stream_total_docs.ts (97%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/dataset_quality/data_streams_failure_store.ts (97%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/dataset_quality/degraded_docs.ts (98%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/dataset_quality/degraded_field_analyze.ts (98%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/dataset_quality/degraded_field_values.ts (97%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/dataset_quality/degraded_fields.ts (98%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/dataset_quality/failed_docs.ts (97%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/dataset_quality/failed_docs_errors.ts (97%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/dataset_quality/failed_docs_stats.ts (97%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/dataset_quality/index.ts (94%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/dataset_quality/integration_dashboards.ts (97%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/dataset_quality/integrations.ts (98%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/dataset_quality/processors/index.ts (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/dataset_quality/update_field_limit.ts (98%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/dataset_quality/utils/es_utils.ts (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/dataset_quality/utils/index.ts (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/incident_management/fixtures/dashboards_default_space.ndjson (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/incident_management/fixtures/dashboards_test_space.ndjson (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/incident_management/index.ts (83%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/incident_management/suggested_dashboards.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/infra/index.ts (97%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/infra/infra.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/infra/infra_asset_count.ts (96%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/infra/inventory_threshold_alert.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/infra/ip_to_hostname.ts (94%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/infra/metadata.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/infra/metrics_overview_top.ts (97%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/infra/metrics_process_list.ts (95%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/infra/metrics_process_list_chart.ts (95%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/infra/node_details.ts (97%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/infra/services.ts (98%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/infra/snapshot.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/infra/sources.ts (98%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/infra/utils/constants.ts (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/infra/utils/create_fake_logger.ts (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/onboarding/get_progress.ts (98%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability/apm/inspect => solutions/observability/test/api_integration_deployment_agnostic/apis/onboarding}/index.ts (66%) create mode 100644 x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/onboarding/update_progress.ts rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/slo/bulk_delete.ts (97%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/slo/create_slo.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/slo/delete_slo.ts (97%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/slo/find_slo.ts (97%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/slo/find_slo_definition.ts (97%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/slo/fixtures/slo.ts (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/slo/get_slo.ts (96%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/slo/helpers/dataforge.ts (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/slo/helpers/transform.ts (95%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/slo/index.ts (90%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/slo/reset_slo.ts (96%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/slo/update_slo.ts (97%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/streams/assets/dashboard.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/streams/basic.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/streams/classic.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/streams/conflicts.ts (96%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/streams/content.ts (98%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/streams/discover.ts (97%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/streams/enrichment.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/streams/flush_config.ts (98%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/streams/group_streams.ts (98%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/streams/helpers/create_streams.ts (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/streams/helpers/dashboards.ts (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/streams/helpers/repository_client.ts (92%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/streams/helpers/requests.ts (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/streams/index.ts (98%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/streams/lifecycle.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/streams/meta_data.ts (96%) create mode 100644 x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/metadata.ts rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/streams/migration_on_read.ts (98%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/streams/processing_date_suggestions.ts (97%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/streams/processing_simulate.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/streams/queries.ts (98%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/streams/root_stream.ts (98%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/streams/schema.ts (98%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/streams/significant_events.ts (98%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/synthetics/create_monitor.ts (95%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/synthetics/create_monitor_private_location.ts (98%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/synthetics/create_monitor_project.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/synthetics/create_monitor_project_multi_space.ts (98%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/synthetics/create_monitor_project_private_location.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/synthetics/create_monitor_public_api.ts (98%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/synthetics/create_monitor_public_api_private_location.ts (98%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/synthetics/create_update_params.ts (98%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/synthetics/delete_monitor.ts (95%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/synthetics/delete_monitor_project.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/synthetics/edit_monitor.ts (98%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/synthetics/edit_monitor_private_location.ts (97%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/synthetics/edit_monitor_public_api.ts (97%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/synthetics/edit_monitor_public_api_private_location.ts (98%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/synthetics/edit_private_location.ts (98%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/synthetics/enable_default_alerting.ts (98%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/synthetics/fixtures/browser_monitor.json (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/synthetics/fixtures/http_monitor.json (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/synthetics/fixtures/icmp_monitor.json (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/synthetics/fixtures/inspect_browser_monitor.json (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/synthetics/fixtures/project_browser_monitor.json (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/synthetics/fixtures/project_http_monitor.json (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/synthetics/fixtures/project_icmp_monitor.json (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/synthetics/fixtures/project_tcp_monitor.json (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/synthetics/fixtures/tcp_monitor.json (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/synthetics/get_filters.ts (94%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/synthetics/get_monitor.ts (98%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/synthetics/get_monitor_project.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/synthetics/get_private_location_monitors.ts (94%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/synthetics/helpers/get_fixture_json.ts (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/synthetics/helpers/location.ts (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/synthetics/helpers/monitor.ts (100%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/synthetics/index.ts (95%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/synthetics/inspect_monitor.ts (97%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/synthetics/legacy_and_multispace_monitor_api.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/synthetics/sample_data/test_policy.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/synthetics/sample_data/test_project_monitor_policy.ts (99%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/synthetics/suggestions.ts (97%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/synthetics/sync_global_params.ts (98%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/synthetics/synthetics_enablement.ts (98%) rename x-pack/{test/api_integration/deployment_agnostic/apis/observability => solutions/observability/test/api_integration_deployment_agnostic/apis}/synthetics/test_now_monitor.ts (95%) rename x-pack/{test/api_integration/deployment_agnostic => solutions/observability/test/api_integration_deployment_agnostic}/configs/serverless/oblt.ai_assistant.index.ts (88%) rename x-pack/{test/api_integration/deployment_agnostic => solutions/observability/test/api_integration_deployment_agnostic}/configs/serverless/oblt.ai_assistant.serverless.config.ts (100%) create mode 100644 x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.ai_assistant_local.index.ts create mode 100644 x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.ai_assistant_local.serverless.config.ts rename x-pack/{test/api_integration/deployment_agnostic => solutions/observability/test/api_integration_deployment_agnostic}/configs/serverless/oblt.apm.index.ts (89%) rename x-pack/{test/api_integration/deployment_agnostic => solutions/observability/test/api_integration_deployment_agnostic}/configs/serverless/oblt.apm.serverless.config.ts (100%) rename x-pack/{test/api_integration/deployment_agnostic => solutions/observability/test/api_integration_deployment_agnostic}/configs/serverless/oblt.index.ts (64%) rename x-pack/{test/api_integration/deployment_agnostic => solutions/observability/test/api_integration_deployment_agnostic}/configs/serverless/oblt.serverless.config.ts (100%) rename x-pack/{test/api_integration/deployment_agnostic => solutions/observability/test/api_integration_deployment_agnostic}/configs/serverless/oblt.streams.index.ts (88%) rename x-pack/{test/api_integration/deployment_agnostic => solutions/observability/test/api_integration_deployment_agnostic}/configs/serverless/oblt.streams.serverless.config.ts (100%) rename x-pack/{test/api_integration/deployment_agnostic => solutions/observability/test/api_integration_deployment_agnostic}/configs/serverless/oblt.synthetics.index.ts (88%) rename x-pack/{test/api_integration/deployment_agnostic => solutions/observability/test/api_integration_deployment_agnostic}/configs/serverless/oblt.synthetics.serverless.config.ts (100%) create mode 100644 x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.ai_assistant.index.ts create mode 100644 x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.ai_assistant.stateful.config.ts create mode 100644 x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.ai_assistant_local.index.ts create mode 100644 x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.ai_assistant_local.stateful.config.ts rename x-pack/{test/api_integration/deployment_agnostic => solutions/observability/test/api_integration_deployment_agnostic}/configs/stateful/oblt.apm.index.ts (88%) rename x-pack/{test/api_integration/deployment_agnostic => solutions/observability/test/api_integration_deployment_agnostic}/configs/stateful/oblt.apm.stateful.config.ts (100%) rename x-pack/{test/api_integration/deployment_agnostic => solutions/observability/test/api_integration_deployment_agnostic}/configs/stateful/oblt.index.ts (50%) rename x-pack/{test/api_integration/deployment_agnostic => solutions/observability/test/api_integration_deployment_agnostic}/configs/stateful/oblt.stateful.config.ts (100%) create mode 100644 x-pack/solutions/observability/test/api_integration_deployment_agnostic/feature_flag_configs/serverless/oblt.index.ts rename x-pack/{test/api_integration/deployment_agnostic => solutions/observability/test/api_integration_deployment_agnostic}/feature_flag_configs/serverless/oblt.serverless.config.ts (100%) create mode 100644 x-pack/solutions/observability/test/api_integration_deployment_agnostic/feature_flag_configs/stateful/oblt.index.ts rename x-pack/{test/api_integration/deployment_agnostic => solutions/observability/test/api_integration_deployment_agnostic}/feature_flag_configs/stateful/oblt.stateful.config.ts (100%) create mode 100644 x-pack/solutions/observability/test/api_integration_deployment_agnostic/services/alerting_api.ts create mode 100644 x-pack/solutions/observability/test/api_integration_deployment_agnostic/services/observability_ai_assistant_api.ts rename x-pack/{test/api_integration/deployment_agnostic => solutions/observability/test/api_integration_deployment_agnostic}/services/slo_api.ts (100%) rename x-pack/{test/api_integration/deployment_agnostic => solutions/observability/test/api_integration_deployment_agnostic}/services/synthetics_monitor.ts (100%) rename x-pack/{test/api_integration/deployment_agnostic => solutions/observability/test/api_integration_deployment_agnostic}/services/synthetics_private_location.ts (100%) create mode 100644 x-pack/solutions/observability/test/api_integration_deployment_agnostic/services/synthtrace.ts create mode 100644 x-pack/solutions/observability/test/common/utils/server_route_repository/create_admin_service_from_repository.ts create mode 100644 x-pack/solutions/observability/test/common/utils/synthtrace/apm_es_client.ts create mode 100644 x-pack/solutions/observability/test/common/utils/synthtrace/infra_es_client.ts create mode 100644 x-pack/solutions/observability/test/common/utils/synthtrace/logs_es_client.ts delete mode 100644 x-pack/test/api_integration/deployment_agnostic/services/apm_api.ts diff --git a/.buildkite/ftr_oblt_serverless_configs.yml b/.buildkite/ftr_oblt_serverless_configs.yml index 8930e94ce5c5e..50ad54fb3d49a 100644 --- a/.buildkite/ftr_oblt_serverless_configs.yml +++ b/.buildkite/ftr_oblt_serverless_configs.yml @@ -33,13 +33,13 @@ disabled: - x-pack/test_serverless/functional/test_suites/observability/config.screenshots.ts - x-pack/test_serverless/functional/test_suites/observability/config.telemetry.ts # serverless config files that run deployment-agnostic tests - - x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.serverless.config.ts - - x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.logs_essentials.serverless.config.ts - - x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.ai_assistant.serverless.config.ts - - x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.apm.serverless.config.ts - - x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.synthetics.serverless.config.ts - - x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.streams.serverless.config.ts - - x-pack/test/api_integration/deployment_agnostic/feature_flag_configs/serverless/oblt.serverless.config.ts + - x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.serverless.config.ts + - x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.logs_essentials.serverless.config.ts + - x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.ai_assistant.serverless.config.ts + - x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.apm.serverless.config.ts + - x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.synthetics.serverless.config.ts + - x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.streams.serverless.config.ts + - x-pack/solutions/observability/test/api_integration_deployment_agnostic/feature_flag_configs/serverless/oblt.serverless.config.ts # Serverless tests only run on main defaultQueue: 'n2-4-spot' diff --git a/.buildkite/ftr_oblt_stateful_configs.yml b/.buildkite/ftr_oblt_stateful_configs.yml index 95384f3f5e7de..c64841fea3ca5 100644 --- a/.buildkite/ftr_oblt_stateful_configs.yml +++ b/.buildkite/ftr_oblt_stateful_configs.yml @@ -46,6 +46,6 @@ enabled: - x-pack/test/functional/apps/apm/config.ts - x-pack/test/functional_with_es_ssl/apps/config.ts # stateful configs that run deployment-agnostic tests - - x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.stateful.config.ts - - x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.apm.stateful.config.ts - - x-pack/test/api_integration/deployment_agnostic/feature_flag_configs/stateful/oblt.stateful.config.ts + - x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.stateful.config.ts + - x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.apm.stateful.config.ts + - x-pack/solutions/observability/test/api_integration_deployment_agnostic/feature_flag_configs/stateful/oblt.stateful.config.ts diff --git a/.buildkite/pipelines/es_serverless/verify_es_serverless_image.yml b/.buildkite/pipelines/es_serverless/verify_es_serverless_image.yml index 5ed5cbe5bbbf9..292404f5e2d2c 100644 --- a/.buildkite/pipelines/es_serverless/verify_es_serverless_image.yml +++ b/.buildkite/pipelines/es_serverless/verify_es_serverless_image.yml @@ -15,13 +15,13 @@ agents: machineType: n2-standard-2 steps: - - label: "Annotate runtime parameters" + - label: 'Annotate runtime parameters' command: .buildkite/scripts/steps/es_serverless/annotate_runtime_parameters.sh - - group: "(:kibana: x :elastic:) Trigger Kibana Serverless suite" + - group: '(:kibana: x :elastic:) Trigger Kibana Serverless suite' if: "build.env('SKIP_VERIFICATION') != '1' && build.env('SKIP_VERIFICATION') != 'true'" steps: - - label: "Pre-Build" + - label: 'Pre-Build' command: .buildkite/scripts/lifecycle/pre_build.sh key: pre-build timeout_in_minutes: 10 @@ -31,7 +31,7 @@ steps: provider: gcp machineType: n2-standard-2 - - label: "Build Kibana Distribution" + - label: 'Build Kibana Distribution' command: .buildkite/scripts/steps/build_kibana.sh agents: image: family/kibana-ubuntu-2004 @@ -44,26 +44,26 @@ steps: timeout_in_minutes: 60 retry: automatic: - - exit_status: "-1" + - exit_status: '-1' limit: 3 - - label: "Pick Test Group Run Order (FTR + Integration)" + - label: 'Pick Test Group Run Order (FTR + Integration)' command: .buildkite/scripts/steps/test/pick_test_group_run_order.sh depends_on: build timeout_in_minutes: 10 env: - FTR_CONFIGS_SCRIPT: "TEST_ES_SERVERLESS_IMAGE=$ES_SERVERLESS_IMAGE .buildkite/scripts/steps/test/ftr_configs.sh" - JEST_INTEGRATION_SCRIPT: "TEST_ES_SERVERLESS_IMAGE=$ES_SERVERLESS_IMAGE .buildkite/scripts/steps/test/jest_integration.sh" - FTR_CONFIG_PATTERNS: "**/test_serverless/**,**/test/security_solution_api_integration/**/serverless.config.ts" - FTR_EXTRA_ARGS: "$FTR_EXTRA_ARGS" - LIMIT_CONFIG_TYPE: "functional,integration" + FTR_CONFIGS_SCRIPT: 'TEST_ES_SERVERLESS_IMAGE=$ES_SERVERLESS_IMAGE .buildkite/scripts/steps/test/ftr_configs.sh' + JEST_INTEGRATION_SCRIPT: 'TEST_ES_SERVERLESS_IMAGE=$ES_SERVERLESS_IMAGE .buildkite/scripts/steps/test/jest_integration.sh' + FTR_CONFIG_PATTERNS: '**/test_serverless/**,**/test/security_solution_api_integration/**/serverless.config.ts,x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/**,x-pack/platform/test/api_integration_deployment_agnostic/configs/serverless/**' + FTR_EXTRA_ARGS: '$FTR_EXTRA_ARGS' + LIMIT_CONFIG_TYPE: 'functional,integration' retry: automatic: - - exit_status: "*" + - exit_status: '*' limit: 1 - command: .buildkite/scripts/steps/functional/security_serverless_entity_analytics.sh - label: "Serverless Entity Analytics - Security Solution Cypress Tests" + label: 'Serverless Entity Analytics - Security Solution Cypress Tests' if: "build.env('SKIP_CYPRESS') != '1' && build.env('SKIP_CYPRESS') != 'true'" agents: image: family/kibana-ubuntu-2004 @@ -76,11 +76,11 @@ steps: parallelism: 3 retry: automatic: - - exit_status: "-1" + - exit_status: '-1' limit: 1 - command: .buildkite/scripts/steps/functional/security_serverless_explore.sh - label: "Serverless Explore - Security Solution Cypress Tests" + label: 'Serverless Explore - Security Solution Cypress Tests' if: "build.env('SKIP_CYPRESS') != '1' && build.env('SKIP_CYPRESS') != 'true'" agents: image: family/kibana-ubuntu-2004 @@ -93,11 +93,11 @@ steps: parallelism: 4 retry: automatic: - - exit_status: "-1" + - exit_status: '-1' limit: 1 - command: .buildkite/scripts/steps/functional/security_serverless_investigations.sh - label: "Serverless Investigations - Security Solution Cypress Tests" + label: 'Serverless Investigations - Security Solution Cypress Tests' if: "build.env('SKIP_CYPRESS') != '1' && build.env('SKIP_CYPRESS') != 'true'" agents: image: family/kibana-ubuntu-2004 @@ -110,11 +110,11 @@ steps: parallelism: 10 retry: automatic: - - exit_status: "-1" + - exit_status: '-1' limit: 1 - command: .buildkite/scripts/steps/functional/security_serverless_rule_management.sh - label: "Serverless Rule Management - Security Solution Cypress Tests" + label: 'Serverless Rule Management - Security Solution Cypress Tests' if: "build.env('SKIP_CYPRESS') != '1' && build.env('SKIP_CYPRESS') != 'true'" agents: image: family/kibana-ubuntu-2004 @@ -127,11 +127,11 @@ steps: parallelism: 5 retry: automatic: - - exit_status: "-1" + - exit_status: '-1' limit: 1 - command: .buildkite/scripts/steps/functional/security_serverless_rule_management_prebuilt_rules.sh - label: "Serverless Rule Management - Prebuilt Rules - Security Solution Cypress Tests" + label: 'Serverless Rule Management - Prebuilt Rules - Security Solution Cypress Tests' if: "build.env('SKIP_CYPRESS') != '1' && build.env('SKIP_CYPRESS') != 'true'" agents: image: family/kibana-ubuntu-2004 @@ -144,11 +144,11 @@ steps: parallelism: 1 retry: automatic: - - exit_status: "-1" + - exit_status: '-1' limit: 1 - command: .buildkite/scripts/steps/functional/security_serverless_detection_engine.sh - label: "Serverless Detection Engine - Security Solution Cypress Tests" + label: 'Serverless Detection Engine - Security Solution Cypress Tests' if: "build.env('SKIP_CYPRESS') != '1' && build.env('SKIP_CYPRESS') != 'true'" agents: image: family/kibana-ubuntu-2004 @@ -161,11 +161,11 @@ steps: parallelism: 5 retry: automatic: - - exit_status: "-1" + - exit_status: '-1' limit: 1 - command: .buildkite/scripts/steps/functional/security_serverless_detection_engine_exceptions.sh - label: "Serverless Detection Engine - Exceptions - Security Solution Cypress Tests" + label: 'Serverless Detection Engine - Exceptions - Security Solution Cypress Tests' if: "build.env('SKIP_CYPRESS') != '1' && build.env('SKIP_CYPRESS') != 'true'" agents: image: family/kibana-ubuntu-2004 @@ -178,11 +178,11 @@ steps: parallelism: 4 retry: automatic: - - exit_status: "-1" + - exit_status: '-1' limit: 1 - command: .buildkite/scripts/steps/functional/security_serverless_ai_assistant.sh - label: "Serverless AI Assistant - Security Solution Cypress Tests" + label: 'Serverless AI Assistant - Security Solution Cypress Tests' if: "build.env('SKIP_CYPRESS') != '1' && build.env('SKIP_CYPRESS') != 'true'" agents: image: family/kibana-ubuntu-2004 @@ -195,11 +195,11 @@ steps: parallelism: 1 retry: automatic: - - exit_status: "-1" + - exit_status: '-1' limit: 1 - command: .buildkite/scripts/steps/functional/defend_workflows_serverless.sh - label: "Defend Workflows Cypress Tests on Serverless" + label: 'Defend Workflows Cypress Tests on Serverless' if: "build.env('SKIP_CYPRESS') != '1' && build.env('SKIP_CYPRESS') != 'true'" agents: image: family/kibana-ubuntu-2004 @@ -212,11 +212,11 @@ steps: parallelism: 12 retry: automatic: - - exit_status: "-1" + - exit_status: '-1' limit: 1 - command: .buildkite/scripts/steps/functional/security_serverless_osquery.sh - label: "Osquery Cypress Tests on Serverless" + label: 'Osquery Cypress Tests on Serverless' if: "build.env('SKIP_CYPRESS') != '1' && build.env('SKIP_CYPRESS') != 'true'" agents: image: family/kibana-ubuntu-2004 @@ -229,16 +229,16 @@ steps: parallelism: 7 retry: automatic: - - exit_status: "-1" + - exit_status: '-1' limit: 1 - wait: ~ - - label: ":arrow_up::elastic::arrow_up: Promote docker image" + - label: ':arrow_up::elastic::arrow_up: Promote docker image' command: .buildkite/scripts/steps/es_serverless/promote_es_serverless_image.sh $ES_SERVERLESS_IMAGE - wait: ~ - - label: "Post-Build" + - label: 'Post-Build' command: .buildkite/scripts/lifecycle/post_build.sh timeout_in_minutes: 10 diff --git a/.eslintrc.js b/.eslintrc.js index 078be229c7889..43bd511c0f893 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -652,9 +652,10 @@ module.exports = { 'x-pack/platform/test/*/{tests,test_suites,apis,apps}/**/*', 'x-pack/platform/test/*api_integration*/**/*', 'x-pack/platform/test/*/*config.*ts', - 'x-pack/solutions/*/test/**/{tests,test_suites,apis,apps,deployment_agnostic,fixtures}/**/*', + 'x-pack/solutions/*/test/**/{tests,test_suites,apis,apps,fixtures}/**/*', + 'x-pack/solutions/*/test/*api_integration*/**/*', 'x-pack/solutions/*/test/**/*config.*ts', - 'x-pack/test/*/{tests,test_suites,apis,apps,deployment_agnostic}/**/*', + 'x-pack/test/*/{tests,test_suites,apis,apps}/**/*', 'x-pack/test/*/*config.*ts', 'x-pack/platform/test/saved_object_api_integration/*/apis/**/*', 'x-pack/platform/test/ui_capabilities/*/tests/**/*', diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 9348012e9f855..1c4f4d1a9ef25 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1258,6 +1258,8 @@ x-pack/solutions/observability/plugins/observability/server/lib/esql_extensions /x-pack/test_serverless/api_integration/test_suites/observability/config.logs_essentials.ts @elastic/observability-ui @elastic/appex-qa /x-pack/test_serverless/api_integration/test_suites/observability/index.logs_essentials.ts @elastic/observability-ui /x-pack/test_serverless/api_integration/test_suites/observability/logs_essentials_only @elastic/observability-ui +/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.logs_essentials.index.ts @elastic/observability-ui +/x-pack/platform/test/api_integration_deployment_agnostic/configs/serverless/oblt.logs_essentials.serverless.config.ts @elastic/observability-ui ### Observability Plugins @@ -1267,7 +1269,16 @@ x-pack/solutions/observability/plugins/observability/server/lib/esql_extensions /x-pack/test_serverless/functional/page_objects/svl_data_usage.ts @elastic/obs-ai-assistant @elastic/security-solution /x-pack/test/observability_ai_assistant_functional @elastic/obs-ai-assistant /x-pack/test/functional/es_archives/observability/ai_assistant @elastic/obs-ai-assistant -/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant @elastic/obs-ai-assistant +/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant @elastic/obs-ai-assistant +/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.ai_assistant.index.ts @elastic/obs-ai-assistant +/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.ai_assistant.serverless.config.ts @elastic/obs-ai-assistant +/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.ai_assistant.index.ts @elastic/obs-ai-assistant +/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.ai_assistant.stateful.config.ts @elastic/obs-ai-assistant +/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.ai_assistant_local.index.ts @elastic/obs-ai-assistant +/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.ai_assistant_local.serverless.config.ts @elastic/obs-ai-assistant +/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.ai_assistant_local.index.ts @elastic/obs-ai-assistant +/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.ai_assistant_local.stateful.config.ts @elastic/obs-ai-assistant + # Infra Obs ## This plugin mostly contains the codebase for the infra services, but also includes some code for the Logs UI app. ## To keep @elastic/obs-ux-logs-team as codeowner of the plugin manifest without requiring a review for all the other code changes @@ -1279,8 +1290,16 @@ x-pack/solutions/observability/plugins/observability/server/lib/esql_extensions ## infra/{common,docs,public,server}/{sub-folders}/ -> @elastic/obs-ux-infra_services-team # obs-ux-infra_services-team -/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/ @elastic/obs-ux-infra_services-team -/x-pack/test/api_integration/deployment_agnostic/apis/observability/infra/ @elastic/obs-ux-infra_services-team +/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/ @elastic/obs-ux-infra_services-team +/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.apm.index.ts @elastic/obs-ux-infra_services-team +/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.apm.serverless.config.ts @elastic/obs-ux-infra_services-team +/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.apm.index.ts @elastic/obs-ux-infra_services-team +/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.apm.stateful.config.ts @elastic/obs-ux-infra_services-team +/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/infra/ @elastic/obs-ux-infra_services-team +/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.index.ts @elastic/obs-ux-infra_services-team +/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.serverless.config.ts @elastic/obs-ux-infra_services-team +/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.index.ts @elastic/obs-ux-infra_services-team +/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.stateful.config.ts @elastic/obs-ux-infra_services-team /x-pack/test/functional/page_objects/asset_details.ts @elastic/obs-ux-infra_services-team # Assigned per https://github.com/elastic/kibana/pull/200157/files/c83fae62151fe634342c498aca69b686b739fe45#r1842202022 /x-pack/test/functional/page_objects/infra_* @elastic/obs-ux-infra_services-team /x-pack/test/functional/es_archives/infra @elastic/obs-ux-infra_services-team @@ -1313,8 +1332,8 @@ x-pack/solutions/observability/plugins/observability/server/lib/esql_extensions ## Logs UI code exceptions -> @elastic/obs-ux-logs-team -/x-pack/test/api_integration/deployment_agnostic/apis/observability/data_quality/ @elastic/obs-ux-logs-team -/x-pack/test/api_integration/deployment_agnostic/apis/observability/onboarding/ @elastic/obs-ux-logs-team +/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/data_quality/ @elastic/obs-ux-logs-team +/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/onboarding/ @elastic/obs-ux-logs-team /x-pack/test_serverless/functional/page_objects/svl_oblt_onboarding_stream_log_file.ts @elastic/obs-ux-logs-team /x-pack/test_serverless/functional/page_objects/svl_oblt_onboarding_page.ts @elastic/obs-ux-logs-team /x-pack/solutions/observability/plugins/infra/common/http_api/log_alerts @elastic/obs-ux-logs-team @@ -1337,6 +1356,8 @@ x-pack/solutions/observability/plugins/observability/server/lib/esql_extensions /x-pack/solutions/observability/plugins/infra/server/routes/log_analysis @elastic/obs-ux-logs-team /x-pack/solutions/observability/plugins/infra/server/services/rules @elastic/obs-ux-infra_services-team @elastic/obs-ux-logs-team /x-pack/test/common/utils/synthtrace @elastic/obs-ux-infra_services-team @elastic/obs-ux-logs-team # Assigned per https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-apm-synthtrace/kibana.jsonc#L5 +/x-pack/solutions/observability/test/common/utils/synthtrace @elastic/obs-ux-infra_services-team @elastic/obs-ux-logs-team +/x-pack/solutions/observability/test/common/utils/server_route_repository @elastic/obs-knowledge-team /x-pack/test/common/utils/server_route_repository @elastic/obs-knowledge-team /src/platform/test/functional/services/synthtrace/logs_synthtrace_es_client.ts @elastic/obs-ux-infra_services-team @elastic/obs-ux-logs-team @@ -1372,14 +1393,20 @@ x-pack/solutions/observability/plugins/observability/server/lib/esql_extensions /x-pack/test_serverless/**/test_suites/observability/custom_threshold_rule/ @elastic/obs-ux-management-team /x-pack/test_serverless/**/test_suites/observability/slos/ @elastic/obs-ux-management-team /x-pack/test_serverless/api_integration/test_suites/observability/es_query_rule @elastic/obs-ux-management-team -/x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/ @elastic/obs-ux-management-team -/x-pack/test/api_integration/deployment_agnostic/apis/observability/slo/ @elastic/obs-ux-management-team -/x-pack/test/api_integration/deployment_agnostic/services/alerting_api @elastic/obs-ux-management-team -/x-pack/test/api_integration/deployment_agnostic/services/slo_api @elastic/obs-ux-management-team -/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/ @elastic/obs-ux-management-team -/x-pack/test/api_integration/deployment_agnostic/services/synthetics_monitors @elastic/obs-ux-management-team -/x-pack/test/api_integration/deployment_agnostic/services/synthetics_private_location @elastic/obs-ux-management-team -/x-pack/test/api_integration/deployment_agnostic/apis/observability/incident_management/ @elastic/obs-ux-management-team +/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/ @elastic/obs-ux-management-team +/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/slo/ @elastic/obs-ux-management-team +/x-pack/solutions/observability/test/api_integration_deployment_agnostic/services/alerting_api @elastic/obs-ux-management-team +/x-pack/solutions/observability/test/api_integration_deployment_agnostic/services/slo_api @elastic/obs-ux-management-team +/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/ @elastic/obs-ux-management-team +/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.synthetics.index.ts @elastic/obs-ux-management-team +/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.synthetics.serverless.config.ts @elastic/obs-ux-management-team +/x-pack/solutions/observability/test/api_integration_deployment_agnostic/feature_flag_configs/serverless/oblt.synthetics.index.ts @elastic/obs-ux-management-team +/x-pack/solutions/observability/test/api_integration_deployment_agnostic/feature_flag_configs/serverless/oblt.synthetics.serverless.config.ts @elastic/obs-ux-management-team +/x-pack/solutions/observability/test/api_integration_deployment_agnostic/feature_flag_configs/stateful/oblt.synthetics.index.ts @elastic/obs-ux-management-team +/x-pack/solutions/observability/test/api_integration_deployment_agnostic/feature_flag_configs/stateful/oblt.synthetics.stateful.config.ts @elastic/obs-ux-management-team +/x-pack/solutions/observability/test/api_integration_deployment_agnostic/services/synthetics_monitors @elastic/obs-ux-management-team +/x-pack/solutions/observability/test/api_integration_deployment_agnostic/services/synthetics_private_location @elastic/obs-ux-management-team +/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/incident_management/ @elastic/obs-ux-management-team /x-pack/solutions/observability/test/api_integration_deployment_agnostic/services @elastic/obs-ux-management-team /x-pack/test/functional/page_objects/alert_controls.ts @elastic/obs-ux-management-team @@ -1443,7 +1470,7 @@ x-pack/solutions/observability/plugins/observability/server/lib/esql_extensions # obs-ux-logs-team /x-pack/test/functional/es_archives/observability_logs_explorer @elastic/obs-ux-logs-team -/x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality @elastic/obs-ux-logs-team +/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality @elastic/obs-ux-logs-team /x-pack/test_serverless/functional/test_suites/observability/config.* @elastic/obs-ux-logs-team /x-pack/test_serverless/functional/test_suites/observability/landing_page.ts @elastic/obs-ux-logs-team /x-pack/test_serverless/functional/test_suites/observability/navigation.ts @elastic/obs-ux-logs-team @@ -1483,7 +1510,9 @@ x-pack/solutions/observability/plugins/observability/server/lib/esql_extensions /x-pack/plugins/observability_solution/observability/server/ui_settings.ts @elastic/obs-docs # Streams -/x-pack/test/api_integration/deployment_agnostic/apis/observability/streams @elastic/streams-program-team +/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams @elastic/streams-program-team +/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.streams.index.ts @elastic/streams-program-team +/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.streams.serverless.config.ts @elastic/streams-program-team /x-pack/test/api_integration/fixtures/kbn_archiver/streams @elastic/streams-program-team ### END Observability Plugins @@ -1772,10 +1801,10 @@ x-pack/platform/plugins/shared/ml/server/models/data_recognizer/modules/security /x-pack/test_serverless/functional/test_suites/common/home_page/ @elastic/appex-qa /x-pack/test_serverless/**/services/ @elastic/appex-qa /src/platform/packages/shared/kbn-es/src/stateful_resources/roles.yml @elastic/appex-qa -/x-pack/test/api_integration/deployment_agnostic/ftr_provider_context.d.ts @elastic/appex-qa -/x-pack/test/api_integration/deployment_agnostic/README.md @elastic/appex-qa -/x-pack/test/api_integration/deployment_agnostic/*configs/ @elastic/appex-qa -/x-pack/test/api_integration/deployment_agnostic/services/ @elastic/appex-qa +/x-pack/solutions/observability/test/api_integration_deployment_agnostic/ftr_provider_context.d.ts @elastic/appex-qa +/x-pack/solutions/observability/test/api_integration_deployment_agnostic/README.md @elastic/appex-qa +/x-pack/platform/test/api_integration_deployment_agnostic/*configs/ @elastic/appex-qa +/x-pack/solutions/observability/test/api_integration_deployment_agnostic/services/ @elastic/appex-qa /x-pack/platform/test/api_integration_deployment_agnostic/ @elastic/appex-qa /x-pack/platform/test/kibana.jsonc @elastic/appex-qa /x-pack/platform/test/tsconfig.json @elastic/appex-qa @@ -1797,6 +1826,14 @@ x-pack/platform/plugins/shared/ml/server/models/data_recognizer/modules/security /x-pack/test/common/utils/uptime @elastic/appex-qa # temporarily due to SKA tests relocation /x-pack/platform/test/.gitignore @elastic/appex-qa /x-pack/solutions/**/test/.gitignore @elastic/appex-qa +/x-pack/solutions/observability/test/api_integration_deployment_agnostic/feature_flag_configs/serverless/oblt.index.ts @elastic/appex-qa # temporarily due to SKA tests relocation +/x-pack/solutions/observability/test/api_integration_deployment_agnostic/feature_flag_configs/serverless/oblt.serverless.config.ts @elastic/appex-qa # temporarily due to SKA tests relocation +/x-pack/solutions/observability/test/api_integration_deployment_agnostic/feature_flag_configs/stateful/oblt.index.ts @elastic/appex-qa # temporarily due to SKA tests relocation +/x-pack/solutions/observability/test/api_integration_deployment_agnostic/feature_flag_configs/stateful/oblt.stateful.config.ts @elastic/appex-qa # temporarily due to SKA tests relocation +/x-pack/platform/test/serverless @elastic/appex-qa +/x-pack/test/api_integration/deployment_agnostic @elastic/appex-qa +/x-pack/platform/test/functional/services/ml/api.ts @elastic/appex-qa # temporarily due to SKA tests relocation +/x-pack/test/api_integration/deployment_agnostic/apis/ @elastic/appex-qa # temporarily due to SKA tests relocation # Core ^/src/platform/test/api_integration/fixtures/kbn_archiver/management/saved_objects/relationships.json @elastic/kibana-core @elastic/kibana-data-discovery diff --git a/.github/paths-labeller.yml b/.github/paths-labeller.yml index 6868aa4b8af66..09b2ebd5e3a27 100644 --- a/.github/paths-labeller.yml +++ b/.github/paths-labeller.yml @@ -10,7 +10,7 @@ - 'src/platform/plugins/shared/bfetch/**/*.*' - 'Team:obs-ux-infra_services': - 'x-pack/solutions/observability/plugins/apm/**/*.*' - - 'x-pack/test/apm_api_integration/**/*.*' + - 'x-pack/solutions/observability/test/apm_api_integration/**/*.*' - 'src/platform/packages/shared/kbn-apm-synthtrace/**/*.*' - 'src/platform/packages/shared/kbn-apm-synthtrace-client/**/*.*' - 'src/platform/packages/shared/kbn-apm-utils/**/*.*' @@ -31,5 +31,5 @@ - 'packages/kbn-apm-*/**/*.*' - 'x-pack/plugins/observability_solution/**/*.*' - 'x-pack/solutions/observability/plugins/serverless_observability/**/*.*' - - 'x-pack/test/apm_api_integration/**/*.*' + - 'x-pack/solutions/observability/test/apm_api_integration/**/*.*' - 'x-pack/test/observability_*/**/*.*' diff --git a/src/dev/run_check_file_casing.ts b/src/dev/run_check_file_casing.ts index e9dfc28423213..7974e605bb79b 100644 --- a/src/dev/run_check_file_casing.ts +++ b/src/dev/run_check_file_casing.ts @@ -36,7 +36,7 @@ run(async ({ log }) => { 'x-pack/solutions/**', // ignore autogenerated snapshots - 'x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots', + 'x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots', ], }); diff --git a/x-pack/platform/plugins/shared/dataset_quality/README.md b/x-pack/platform/plugins/shared/dataset_quality/README.md index 59664f480a714..31a2fd714abb8 100755 --- a/x-pack/platform/plugins/shared/dataset_quality/README.md +++ b/x-pack/platform/plugins/shared/dataset_quality/README.md @@ -20,26 +20,26 @@ yarn jest --config x-pack/platform/plugins/shared/dataset_quality/jest.config.js ### Deployment-agnostic API tests -The deployment-agnostic API tests are located in [`x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality`](/x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/). +The deployment-agnostic API tests are located in [`x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality`](/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality/). #### Start server and run test (stateful) ```sh # start server -node scripts/functional_tests_server --config x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.stateful.config.ts +node scripts/functional_tests_server --config x-pack/solutions/observability/test/api_integration_deployment_agnostic/ion_deployment_agnostic/configs/stateful/oblt.stateful.config.ts # run tests -node scripts/functional_test_runner --config x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.stateful.config.ts --include ./x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/$ +node scripts/functional_test_runner --config x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.stateful.config.ts --include ./x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality/$ ``` #### Start server and run test (serverless) ```sh # start server -node scripts/functional_tests_server --config x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.serverless.config.ts +node scripts/functional_tests_server --config x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.serverless.config.ts # run tests -node scripts/functional_test_runner --config x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.serverless.config.ts --include ./x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/$ +node scripts/functional_test_runner --config x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.serverless.config.ts --include ./x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality/$ ``` ### API integration tests @@ -87,23 +87,27 @@ export set FLEET_PACKAGE_REGISTRY_PORT=12345 To unset the variable, and run the tests against the real endpoint again, execute ``` -unset FLEET_PACKAGE_REGISTRY_PORT +unset FLEET_PACKAGE_REGISTRY_PORT ``` ### Functional Tests #### Stateful + ##### FTR Server + ``` yarn test:ftr:server --config ./x-pack/test/functional/apps/dataset_quality/config.ts ``` ##### FTR Runner + ``` yarn test:ftr:runner --config ./x-pack/test/functional/apps/dataset_quality/config.ts --include ./x-pack/test/functional/apps/dataset_quality/index.ts ``` ##### Running Individual Tests + ``` yarn test:ftr:runner --config ./x-pack/test/functional/apps/dataset_quality/config.ts --include ./x-pack/test/functional/apps/dataset_quality/$1 ``` @@ -111,15 +115,19 @@ yarn test:ftr:runner --config ./x-pack/test/functional/apps/dataset_quality/conf #### Serverless ##### Server + ``` yarn test:ftr:server --config ./x-pack/test_serverless/functional/test_suites/observability/config.ts ``` ##### Runner + ``` yarn test:ftr:runner --config ./x-pack/test_serverless/functional/test_suites/observability/config.ts --include ./x-pack/test_serverless/functional/test_suites/observability/dataset_quality/index.ts ``` + ##### Running Individual Tests + ``` yarn test:ftr:runner --config ./x-pack/test_serverless/functional/test_suites/observability/config.ts --include ./x-pack/test_serverless/functional/test_suites/observability/dataset_quality/$1 -``` \ No newline at end of file +``` diff --git a/x-pack/platform/test/api_integration_deployment_agnostic/default_configs/common_paths.ts b/x-pack/platform/test/api_integration_deployment_agnostic/default_configs/common_paths.ts index dfd1131a9a278..27e54afe06432 100644 --- a/x-pack/platform/test/api_integration_deployment_agnostic/default_configs/common_paths.ts +++ b/x-pack/platform/test/api_integration_deployment_agnostic/default_configs/common_paths.ts @@ -10,5 +10,5 @@ import path from 'path'; export const AI_ASSISTANT_SNAPSHOT_REPO_PATH = path.resolve( REPO_ROOT, - 'x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/' + 'x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/' ); diff --git a/x-pack/solutions/observability/plugins/apm/scripts/test/dat.js b/x-pack/solutions/observability/plugins/apm/scripts/test/dat.js index b457cd4da5e76..210cd8fc7bec8 100644 --- a/x-pack/solutions/observability/plugins/apm/scripts/test/dat.js +++ b/x-pack/solutions/observability/plugins/apm/scripts/test/dat.js @@ -96,7 +96,7 @@ const cmd = [ ...(grep ? [`--grep "${grep}"`] : []), ...(updateSnapshots ? [`--updateSnapshots`] : []), ...(bail ? [`--bail`] : []), - `--config ${REPO_ROOT}/x-pack/test/api_integration/deployment_agnostic/configs/${environment}/oblt.apm.${environment}.config.ts`, + `--config ${REPO_ROOT}/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/${environment}/oblt.apm.${environment}.config.ts`, ].join(' '); console.log(`Running: "${cmd}"`); diff --git a/x-pack/solutions/observability/plugins/slo/README.md b/x-pack/solutions/observability/plugins/slo/README.md index df6872a5e9ec8..3cc354ad0fbbd 100755 --- a/x-pack/solutions/observability/plugins/slo/README.md +++ b/x-pack/solutions/observability/plugins/slo/README.md @@ -21,26 +21,26 @@ See the [kibana contributing guide](https://github.com/elastic/kibana/blob/main/
Execute this to build your plugin ui browser side so Kibana could pick up when started in development
- ## API Integration Tests -The SLO tests are located under `x-pack/test/api_integration/deployment_agnostic/apis/observability/slo` folder. In order to run the SLO tests of your interest, you can grep accordingly. Use the commands below to run all SLO tests (`grep=SLO`) on stateful or serverless. + +The SLO tests are located under `x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/slo` folder. In order to run the SLO tests of your interest, you can grep accordingly. Use the commands below to run all SLO tests (`grep=SLO`) on stateful or serverless. ### Stateful ``` # start server -node scripts/functional_tests_server --config x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.stateful.config.ts +node scripts/functional_tests_server --config x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.stateful.config.ts # run tests -node scripts/functional_test_runner --config x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.stateful.config.ts --grep=SLO +node scripts/functional_test_runner --config x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.stateful.config.ts --grep=SLO ``` ### Serverless ``` # start server -node scripts/functional_tests_server --config x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.serverless.config.ts +node scripts/functional_tests_server --config x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.serverless.config.ts # run tests -node scripts/functional_test_runner --config x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.serverless.config.ts --grep=SLO +node scripts/functional_test_runner --config x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.serverless.config.ts --grep=SLO ``` diff --git a/x-pack/solutions/observability/plugins/synthetics/README.md b/x-pack/solutions/observability/plugins/synthetics/README.md index 098f81dc4266f..f2f147c13b4a9 100644 --- a/x-pack/solutions/observability/plugins/synthetics/README.md +++ b/x-pack/solutions/observability/plugins/synthetics/README.md @@ -98,24 +98,25 @@ Run the uptime `a11y` tests: `node scripts/functional_test_runner.js --config sr ## Deployment agnostic API Integration Tests -The Synthetics tests are located under `x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics` folder. In order to run the SLO tests of your interest, you can grep accordingly. Use the commands below to run all SLO tests (`grep=SyntheticsAPITests`) on stateful or serverless. + +The Synthetics tests are located under `x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics` folder. In order to run the SLO tests of your interest, you can grep accordingly. Use the commands below to run all SLO tests (`grep=SyntheticsAPITests`) on stateful or serverless. ### Stateful ``` # start server -node scripts/functional_tests_server --config x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.stateful.config.ts +node scripts/functional_tests_server --config x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.stateful.config.ts # run tests -node scripts/functional_test_runner --config x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.stateful.config.ts --grep=SyntheticsAPITests +node scripts/functional_test_runner --config x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.stateful.config.ts --grep=SyntheticsAPITests ``` ### Serverless ``` # start server -node scripts/functional_tests_server --config x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.serverless.config.ts +node scripts/functional_tests_server --config x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.serverless.config.ts # run tests -node scripts/functional_test_runner --config x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.serverless.config.ts --grep=SyntheticsAPITests +node scripts/functional_test_runner --config x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.serverless.config.ts --grep=SyntheticsAPITests ``` diff --git a/x-pack/solutions/observability/test/alerting_api_integration/observability/custom_threshold_rule_data_view.ts b/x-pack/solutions/observability/test/alerting_api_integration/observability/custom_threshold_rule_data_view.ts index 8c78688764fa2..7ec7491b581e0 100644 --- a/x-pack/solutions/observability/test/alerting_api_integration/observability/custom_threshold_rule_data_view.ts +++ b/x-pack/solutions/observability/test/alerting_api_integration/observability/custom_threshold_rule_data_view.ts @@ -18,7 +18,6 @@ import type { FtrProviderContext } from '../ftr_provider_context'; import { createRule } from './helpers/alerting_api_helper'; import { createDataView, deleteDataView } from './helpers/data_view'; -// eslint-disable-next-line import/no-default-export export default function ({ getService }: FtrProviderContext) { const supertest = getService('supertest'); const objectRemover = new ObjectRemover(supertest); diff --git a/x-pack/solutions/observability/test/alerting_api_integration/observability/index.ts b/x-pack/solutions/observability/test/alerting_api_integration/observability/index.ts index bfae48415e5c4..c0d367e69ef3c 100644 --- a/x-pack/solutions/observability/test/alerting_api_integration/observability/index.ts +++ b/x-pack/solutions/observability/test/alerting_api_integration/observability/index.ts @@ -7,7 +7,6 @@ import type { FtrProviderContext } from '../ftr_provider_context'; -// eslint-disable-next-line import/no-default-export export default function ({ loadTestFile }: FtrProviderContext) { describe('Observability Rules', () => { describe('Rules Endpoints', () => { diff --git a/x-pack/solutions/observability/test/alerting_api_integration/observability/metric_threshold_rule.ts b/x-pack/solutions/observability/test/alerting_api_integration/observability/metric_threshold_rule.ts index a8e3abd12466f..0124bd982f215 100644 --- a/x-pack/solutions/observability/test/alerting_api_integration/observability/metric_threshold_rule.ts +++ b/x-pack/solutions/observability/test/alerting_api_integration/observability/metric_threshold_rule.ts @@ -20,7 +20,6 @@ import { import type { FtrProviderContext } from '../ftr_provider_context'; import { createIndexConnector, createRule } from './helpers/alerting_api_helper'; -// eslint-disable-next-line import/no-default-export export default function ({ getService }: FtrProviderContext) { const esClient = getService('es'); const esDeleteAllIndices = getService('esDeleteAllIndices'); diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/anonymization/anonymization.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/anonymization/anonymization.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/anonymization/anonymization.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/anonymization/anonymization.spec.ts index 6ca49db9b9b81..c70813b78fa73 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/anonymization/anonymization.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/anonymization/anonymization.spec.ts @@ -9,7 +9,7 @@ import { MessageRole, type Message } from '@kbn/observability-ai-assistant-plugi import { aiAnonymizationSettings } from '@kbn/inference-common'; import { createLlmProxy, LlmProxy, LlmResponseSimulator } from '../utils/create_llm_proxy'; import { setAdvancedSettings } from '../utils/advanced_settings'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { clearConversations } from '../utils/conversation'; export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/chat/chat.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/chat/chat.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/chat/chat.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/chat/chat.spec.ts index 121bf2a43e31f..be3c5d05ca81d 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/chat/chat.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/chat/chat.spec.ts @@ -11,7 +11,7 @@ import { PassThrough } from 'stream'; import { times } from 'lodash'; import { SupertestWithRoleScope } from '@kbn/test-suites-xpack-platform/api_integration_deployment_agnostic/services/role_scoped_supertest'; import { createLlmProxy, LlmProxy } from '../utils/create_llm_proxy'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; const SYSTEM_MESSAGE = `this is a system message`; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/complete/complete.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/complete.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/complete/complete.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/complete.spec.ts index 09edc2a559432..14c891a87a545 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/complete/complete.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/complete.spec.ts @@ -19,7 +19,7 @@ import { import { ObservabilityAIAssistantScreenContextRequest } from '@kbn/observability-ai-assistant-plugin/common/types'; import { SupertestWithRoleScope } from '@kbn/test-suites-xpack-platform/api_integration_deployment_agnostic/services/role_scoped_supertest'; import { createLlmProxy, LlmProxy } from '../utils/create_llm_proxy'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { systemMessageSorted, clearConversations, diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/complete/functions/alerts.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/functions/alerts.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/complete/functions/alerts.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/functions/alerts.spec.ts index ecb4c6dbc8c34..a7ebe3a38f649 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/complete/functions/alerts.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/functions/alerts.spec.ts @@ -17,7 +17,7 @@ import { invokeChatCompleteWithFunctionRequest, } from '../../utils/conversation'; import { createRule, deleteRules } from '../../utils/alerts'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; import { createSyntheticApmData } from '../../synthtrace_scenarios/create_synthetic_apm_data'; import { APM_ALERTS_INDEX as APM_ALERTS_INDEX_PATTERN } from '../../../apm/alerts/helpers/alerting_helper'; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/complete/functions/context.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/functions/context.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/complete/functions/context.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/functions/context.spec.ts index 84b896fe397ae..9ea6db118c26a 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/complete/functions/context.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/functions/context.spec.ts @@ -18,7 +18,7 @@ import { Instruction } from '@kbn/observability-ai-assistant-plugin/common/types import { RecalledSuggestion } from '@kbn/observability-ai-assistant-plugin/server/functions/context/utils/recall_and_score'; import { SCORE_SUGGESTIONS_FUNCTION_NAME } from '@kbn/observability-ai-assistant-plugin/server/functions/context/utils/score_suggestions'; import { KnowledgeBaseDocument, LlmProxy, createLlmProxy } from '../../utils/create_llm_proxy'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; import { addSampleDocsToInternalKb, clearKnowledgeBase } from '../../utils/knowledge_base'; import { chatComplete } from '../../utils/conversation'; import { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/complete/functions/elasticsearch.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/functions/elasticsearch.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/complete/functions/elasticsearch.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/functions/elasticsearch.spec.ts index 17331ba832d9d..67f159548566b 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/complete/functions/elasticsearch.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/functions/elasticsearch.spec.ts @@ -15,7 +15,7 @@ import { getMessageAddedEvents, invokeChatCompleteWithFunctionRequest, } from '../../utils/conversation'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) { const log = getService('log'); diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/complete/functions/execute_query.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/functions/execute_query.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/complete/functions/execute_query.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/functions/execute_query.spec.ts index f92f008204fc3..997c6999a93e6 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/complete/functions/execute_query.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/functions/execute_query.spec.ts @@ -13,7 +13,7 @@ import { ChatCompletionStreamParams } from 'openai/lib/ChatCompletionStream'; import { EsqlToRecords } from '@elastic/elasticsearch/lib/helpers'; import { LlmProxy, createLlmProxy } from '../../utils/create_llm_proxy'; import { chatComplete } from '../../utils/conversation'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; import { createSimpleSyntheticLogs } from '../../synthtrace_scenarios/simple_logs'; export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/complete/functions/get_alerts_dataset_info.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/functions/get_alerts_dataset_info.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/complete/functions/get_alerts_dataset_info.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/functions/get_alerts_dataset_info.spec.ts index c145c47467475..aa542460da42c 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/complete/functions/get_alerts_dataset_info.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/functions/get_alerts_dataset_info.spec.ts @@ -16,7 +16,7 @@ import { ChatCompletionStreamParams } from 'openai/lib/ChatCompletionStream'; import { LlmProxy, RelevantField, createLlmProxy } from '../../utils/create_llm_proxy'; import { createSyntheticApmData } from '../../synthtrace_scenarios/create_synthetic_apm_data'; import { chatComplete, getSystemMessage, systemMessageSorted } from '../../utils/conversation'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; import { APM_ALERTS_INDEX } from '../../../apm/alerts/helpers/alerting_helper'; import { createRule } from '../../utils/alerts'; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/complete/functions/get_dataset_info.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/functions/get_dataset_info.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/complete/functions/get_dataset_info.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/functions/get_dataset_info.spec.ts index 18749d09e2da4..a5a30470f3b6d 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/complete/functions/get_dataset_info.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/functions/get_dataset_info.spec.ts @@ -13,7 +13,7 @@ import { GET_RELEVANT_FIELD_NAMES_SYSTEM_MESSAGE } from '@kbn/observability-ai-a import { ChatCompletionStreamParams } from 'openai/lib/ChatCompletionStream'; import { LlmProxy, RelevantField, createLlmProxy } from '../../utils/create_llm_proxy'; import { chatComplete, getSystemMessage, systemMessageSorted } from '../../utils/conversation'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; import { createSimpleSyntheticLogs } from '../../synthtrace_scenarios/simple_logs'; export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/complete/functions/recall.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/functions/recall.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/complete/functions/recall.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/functions/recall.spec.ts index 1679b62739c2d..9e0b16488d601 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/complete/functions/recall.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/functions/recall.spec.ts @@ -7,7 +7,7 @@ import expect from '@kbn/expect'; import { first, uniq } from 'lodash'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; import { clearKnowledgeBase, addSampleDocsToInternalKb, diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/complete/functions/retrieve_elastic_doc.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/functions/retrieve_elastic_doc.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/complete/functions/retrieve_elastic_doc.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/functions/retrieve_elastic_doc.spec.ts index b68ba07ce9f61..f89a147c6057f 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/complete/functions/retrieve_elastic_doc.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/functions/retrieve_elastic_doc.spec.ts @@ -13,7 +13,7 @@ import { MessageAddEvent, MessageRole } from '@kbn/observability-ai-assistant-pl import { TINY_ELSER_INFERENCE_ID } from '../../utils/model_and_inference'; import { LlmProxy, createLlmProxy } from '../../utils/create_llm_proxy'; import { chatComplete } from '../../utils/conversation'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; import { installProductDoc, uninstallProductDoc } from '../../utils/product_doc_base'; import { deployTinyElserAndSetupKb, diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/complete/functions/summarize.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/functions/summarize.spec.ts similarity index 98% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/complete/functions/summarize.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/functions/summarize.spec.ts index 8d4d468226a0e..796b9a393acf0 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/complete/functions/summarize.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/functions/summarize.spec.ts @@ -8,7 +8,7 @@ import { MessageRole } from '@kbn/observability-ai-assistant-plugin/common'; import expect from '@kbn/expect'; import { LlmProxy, createLlmProxy } from '../../utils/create_llm_proxy'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; import { invokeChatCompleteWithFunctionRequest } from '../../utils/conversation'; import { deployTinyElserAndSetupKb, diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/complete/functions/title_conversation.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/functions/title_conversation.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/complete/functions/title_conversation.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/functions/title_conversation.spec.ts index 31b4d00d308bd..a1e76ffac020f 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/complete/functions/title_conversation.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/functions/title_conversation.spec.ts @@ -14,7 +14,7 @@ import { import { MessageRole } from '@kbn/observability-ai-assistant-plugin/common'; import { LlmProxy, createLlmProxy } from '../../utils/create_llm_proxy'; import { chatComplete, clearConversations } from '../../utils/conversation'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) { const log = getService('log'); diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/complete/functions/visualize_query.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/functions/visualize_query.spec.ts similarity index 98% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/complete/functions/visualize_query.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/functions/visualize_query.spec.ts index e872e6e178fd5..2e914af478527 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/complete/functions/visualize_query.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/functions/visualize_query.spec.ts @@ -13,7 +13,7 @@ import { getMessageAddedEvents, invokeChatCompleteWithFunctionRequest, } from '../../utils/conversation'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) { const es = getService('es'); diff --git a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/product_docs/index.xml b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/product_docs/index.xml new file mode 100644 index 0000000000000..b690a69175c7d --- /dev/null +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/product_docs/index.xml @@ -0,0 +1,16 @@ + + + kibana-ai-assistant-kb-artifacts + + kb-product-doc-kibana-0.0.zip + + + kb-product-doc-elasticsearch-0.0.zip + + + kb-product-doc-observability-0.0.zip + + + kb-product-doc-security-0.0.zip + + \ No newline at end of file diff --git a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/product_docs/kb-product-doc-elasticsearch-0.0.zip b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/product_docs/kb-product-doc-elasticsearch-0.0.zip new file mode 100644 index 0000000000000000000000000000000000000000..7f3ede30e98b05dfc03da5b9fe5e30c983ceaa8a GIT binary patch literal 626 zcmWIWW@Zs#VBp|jXb+he<-C8{VipDl1|}eu0OI8Qypq(s5`8GGYp9o(l2x3aw|X5b zLja0S!Sb%Xu0S2pK+Froxruq1X{p5}dSKEpkh%Seamb@p==NPod;H@x z(4NOYr$X#2D9Fr9F9zGUb)sX}VFMo5@0P6}tc=-Tr1oU5cD*vqc+wrSDfjlOY-x2^ zFw<2$>cwl@lr_=p4=$Zp7*JwekmYnS#{OvY6~?0+SKmIk#>lWE;^u_2(vio?c^>4* zEW0NeclPYVz42PVXB{(j-pFFsRTuXA`ivh9O)?jQXKlFO(tcsn--NI!PrDqmvM$=R zZ~C=DxNo{vrl#lGXY-GkITu^!watEV_Kl?L%1=`NrF4Hd#NGZUZ$6_nsHx^PQ{$g_ zXVX<{>^8&&7}VxZZ(UsX?{40z-^>Btj7%cTxMK(y1YoeF5k%pNFLYDTV+&#i1H+O= lDFBPdY6O}KsplXpmb@{qz4pGxJ=VA!OvN000#gAknhe)>q<%Bq=ih zU?u?oumb=9SAW0Y$9};w|ASI;(td8^G!&{ZTHiCM#^+!We?Bz}SHvSu9`V zyn^PDpWBk%Xsk@pe8mOoCsA_QI2UqNx>vnczPjIc->1C@W$qZbiG#dT$NA=@YtU)XMQ!I~ z(POrKj=e&ePtd!(+h>(UOAgC)9kb5G(=F(CsFp8X&rZGHsUMU#*X}L9gcR z;wG&?_l@#caxw$UbDO73qBRd}jiNH#}w(4WcwH0wpEmpxyi`+a4CeBNESb*Un= z7S>*l@1;M0hlO)g5qFDnrv12g^)uh@Camr9j&8m9nWcWY2gOQZl=pBJ$B4~>qqWn_ zN|~%sUZg9gaeYhb7qqJoel{&V(M41mGxZM>znVS1yjX3749QA|xGkoO^{tCBoYmW@ zY5;ww>273>q19jP(N9}Z^yS}Zi!u{ax!vte>!phV+VOa1an=ECZ5^}nTZWS0cRgBHBH?jBKD*$%-DiRo-UUeVvMb+ zGaUu*yw-U`}2O15d-obYv~=G+5QqJfzv$$X@CxVF!IyU<5`va}z34P8XZrP)c* zKxP<)Ga;_K#;w7LKiZl6kqCU57OQ&4*l?Nu%9b%;-3RTNC-Fl|*5@!kh;*O5K1m2t zFq*reX0)N{qCN6`u(E``{>`bO0nLi*OR6zp&x2AYr`VTsLqnp86zN!1HV4nbJLQ+I zyTR698SC}ufurgZ6bLMNn{O5aM&6jB%rj|851A)0wjS|%-{3J=XkR|Q-EXcWUY|jZ zy{)&Xrx!iU{xZ`b`6)E)%kW*;TubWu8v*{z)&V5)?4lL!1xTOlsvZ#1jLQB2=hOF3 zLgVm;J!A3<+{a?(wtxh)>%NP*nkGU1ui;_qlZ|0i2vuY=%HTkx%-~43j zI>D(xt;x6dk*8UG7)zN}$@5C!{v7hAf%OK|wlf0dyckO&_`Cul;W2jGnkA(d@nXcu z&BmfPB`ZO};!fHUE^H#0kvtd5w`23Kr+`N#Zkb*h**zORkmw*6#M~@%&F^?n!AWvcR0ra#AaiOCpd~K_1G$OGnnI~jYR_5n2XtfzRKDnTx5kke}Ec-ps zy-PyTqYs_J31H6rMdhkf+rilqs15>^c#tum`vKZ>f5V5))-Bk!G9ma29&E`yWi5?f zOie_{?z5WZH1Q^e?Q{+0JfvJdEHC_m`U@u|Dds{h;-!`wM4!Gcs1#7?rmb1;A;rIC zO~Nvjv#s2dQ~35!`cMMDR?ptTju++aEGq(?wl_@ga<#9W1CL z)q~GesBKwf!5UuTOL`;!_L4#k>ct4A!nE| z*XnZ+w_&+cz)p|l$vHB_4n#@FtFWYzdiV+HBD6Mww{h=O+a?vX?uxg{&mk|FUzj{I zPP!~zp;Y$#2C;)b(H60?%v-FG8NPWdzaPamiHYQ_2xMdbrXRBml_t8dS)a`zt)Ft_ zOa0lU4;%=e1uaVWDE#|);X^?AtY;5wk)ez7EDhfT_>KKB{OJ@fEjk|?5YnTzfT4DG z+qOkcSs}XfqJ-U`dAF(8&kW4L79=p6S6dxiDiq&zt5n-fhU~U>GT*X)V_RyRcw!O0FuaQSYZ7Eei2V^-V97M0ew?=Dv>0JOd z3q*4yExA)k^;tc6)BTZaVqIw|Cmx%BmbtNYN46erEl-?x^<6oN8}=!5e|d<~^T z@fEYd_&3+6C@0HgV;<40EJPosw}Tr}Xu0)hHIs4XV`2fcBh|Jwsa-s`0)i)zM?2HX zCN)m{;YRzvHkAza20Odu9|PC(j6}~{oaP|9toOA}?6ue>17XaAG8QU$#a9E&h+imY z$Ie0Jet~QIgG;Y^6ZK^g3RJ6lX%H)tH9AjX7%OFeypRvRxQO=5TX)y;-^w=OEy>CF3RdcU;tR-cX#2-yrx5IiI0ww#Do{%< z2j(+0e2ih=9>^Yr2$!WY+FX0r39$hwd1yH$i6w3LNmjQ~*5^vT4GJ-51!4I!1N*Kn z@yk*EgB_| zfUsSU#5aL=FTEBg=3jl)PNP_Nd)i+7&xw+ksI@`ZTom=_VUiovKjwZlBQ{>mz3MZI~pp-v)^j%VK zyp59C-JdEWi@S7(vTGY`YS?f}b4pbB|6+xW-QYoVaJ*c%3EdE}qsTA2ee7OWqKk0b zb6|kYHD`Y@%1_ddp&#?z=4@p}yzXi+qPo514_eb=q**eoV~aK)1$XYpD_l2@(RHqO zq+xu`<_A@v+BZ`)DmR+e3Gyt@gU{X7;f=}ASiH&PW2)RGHp>`m)zGwStgCyYq=RS} zOEaaXT%k%3wmy=h%3Zim?)xF;q;7$MlBE7j2u`L;O^?9|lM4aOcR*!3Y83jxRnuyT zp7G`%f{@Ldj9azOx$zwvEH4>5J0kNUhoeq72%fW`!nJV$ z;y})k%l!D^P9hg}iU-mR=_N46s0Z3`8L`&%Nm*;A@7$qoBU&z~5PF2Zh@hM*`gM5K zS-hVVf#$w>(2%@m^4P%YHErth8XUukI()2i4?QfOej{b3z*`k6Zqt(UuL{{;h3y(f za_oIlb*msvjCBew*Z`Tig4r`8uXKaB@I?o0GMQK#`f<2SRUn7r*ue_zng<9vCzCnr{7Mg8MAa?V5r zKkxQ>9ygH1S^6wxrsUXDYWXvJ9FKJxUX5VJE*ov^({kVeU{;$2Zgmj4bRXW8gWVFz z4y>&O|7O?K__MhM>ICh$+|;Tv;iS>w*o#mpZ>6#%Ayp`zE7{|R6}?ruk)>h)73jbq z2JrY=Z)f;=Ons*d14Ber9TV>-&%sIjorXCogth;%d|vrjwM0*c_?H;X-i2q0RsjlK z>~5Q`JYU1|4K;87RU5)Dp=xTG`SqhJhv8hD0*^)qhXB7Bn+3MwAzR7h$~Gj+nPo#| zO}J`9?H_wdr zUxl`}0Z$zblkS&${@j$a%}4;5FzGrf-?&+I$6*_q)*!4#JjfTUO?~!tOHKf$U;c7E z!fMHkwOQx5=bS!6)3|($hgOv5q*8T?%fz@0D#?t6!0y?hS>?iEL2&|!wMhxm%-d7= zba@Ytlvl&tH*P=d9mx<4|7DkkF~3DapINawNzXC8dhpGLQcx_B!%nSf?prp%BiK*%U-I1N0~8qax*^zChIB?AA5bnB$uW9kK!>{B+HoN4Mh2+^vh~prl2` z)OwP=&+El4=*!ok#2EuC>Dk_D2LvMxY+|%mueWX>EtjG-1p$qHD6x_hFLmlZoZc? zxcpSj7n0M!Gq4l}=@3HUMW^X+hO$gi;VR3Z=`a$g_e)O@>#|7ZC(N*oJHs8W5c2qVd8{cJA1ps5gpA`TIQpz{p155 z1$p4f-Z^U=e{@^c^RX#=Dv#aECf>xTCL*^6T(vsk}q4 zo{vU}?RO;6?HjiG7d1aQ$v$;?NS$ei6VlpQ7*(Fc1Jd>$zaJ(fdrSLYa*RvG304(& zv({F~%39Ca{h02|NA$6dMRs2HE=BscdmD{%%UYS?rGMwUEbwRCSf z_aMw!E2Fa>zwx`ubTy~V#`^&nndL+w=C&}YsE@9xMxi>(R1BRwg(7k=hEqG9-ZvtB zJ>~P~p|+C|)4=%}|Kfsaggvf`H!?ITDym+3axL#D>aWm?79`YR0Yh|HFiH5UXumH_1j1{TX>vSYq(us&Bsl zYumZ~13$oh@*2dWY_3z$Y)K#cWc$NydtPF|TM3h#?yh7$C7H{WC*plCNt6ZMe@!@6`aRM-Oeq7j>Rnte zoBmsFRF~?rrv4`{viwtYf6CX{&&&NWG+6rYu&54aZfa_Xlo>aYybh5PpZxOG0%2|{ zKcnzX!4yUE`3CDoRrc-N6JcCstQ$fhi=eNjp4W%l3}XZpDS}DfREOTuP3-{MxN2G_;6QZIUFY@R(l?a zpB0QKYB!MslOrFT&F7s&$8t|u6f`csO#FtpaC(rvk*w+MJq1og{H|t6%N6$$yVrnw z_X(&CRrO0KT%XwC(5*S(yyBEPx$B6&x}-WB!K!6x02)%Rg=U?;Zd^d5qGZ(C^<&`zQ6Ega1Ej a>A$G|&jwQn1?Au0WPfh=AIxR>`}JRv(BxzQ literal 0 HcmV?d00001 diff --git a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/product_docs/kb-product-doc-observability-0.0.zip b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/product_docs/kb-product-doc-observability-0.0.zip new file mode 100644 index 0000000000000000000000000000000000000000..97c1408a442ebfd4e73897691803ea3e49962766 GIT binary patch literal 626 zcmWIWW@Zs#VBp|jXb+he<-C8{VipDl1|}eu0OI8Qypq(s5`8GGYp9o(l2x3aw|X5b zLja1-ule4cu0S2pK+Froxruq1X{p5}dSK-w^m??Lgw}>#vzYZq1$&U?eUM( zKzkkooeHt9pdd3Zy%=oY)`^Z?hYfgKzgxC`urg+Uk=m2J+V#pb<4JeSrrg`BvZd8w z!Aw{2s28toQ`SVYKe%*aVL*v>L6+0S82h8mR~V0STz&iC8Y9Dwh?^76N=F_m=XsDL zv+SN^+}X1a_r`1eo^{OBc_WKiS6$fe>oa~dG|5~Hp0(kAOZ$aQe-px{JneGK%DQON zzUkKr;lAlwnVOz!pUppF=3H!@*Eajf**B7|D?ds7m(u;=5O@2Zy!njQpr)GFOpSly zolRG*vD*+AU{ISsy>)Tjzq@&>elrJnGct)V99`FdQtH4^3q9MSWl?^1#41{}t^a4f@4*;db+e!cc literal 0 HcmV?d00001 diff --git a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/product_docs/kb-product-doc-security-0.0.zip b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/product_docs/kb-product-doc-security-0.0.zip new file mode 100644 index 0000000000000000000000000000000000000000..76e81a2a04dd2ab4f7c6b07a924179f8c7360c47 GIT binary patch literal 621 zcmWIWW@Zs#VBp|jXb+he<-C8{VipDl1|}eu0OI8Qypq(s5`8GGYp9o(l2x3aw|X5b zLja0S<5V7J2cV8HAm#<)+{C=hwAA7fJ+Sg;K>-0?r}aTr7NYMncCK6q15fYBA> z3&sJL7*C3dJY7CTZTb(@XUm#Wx`HQrcN=+Y1*%LeiFzfeRd|&N&8kajkAIv7TJad@ zN{Cej1(|v2#bB$pPIT-#Y{29C-LmzAl`;E^)Sm3su2-fRPr73^<=$SEEv*g4S!KD)m14^t5vYal)*dJ}a!g!S9>e~m`7#Vg%+?;S$I`UXK&x0J9W%nfG z&Ypd^H(u-atYfCm8(GY{>cW0spYfxiN#oOnkx7IZcjN$r01TEif+$>3g>DLZL_y48U|7;<1!ST` g8@g8XfJbOu3f77g4FTS)Y#?c7Alw6_XETC$02%SsM*si- literal 0 HcmV?d00001 diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/connectors/connectors.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/connectors/connectors.spec.ts similarity index 98% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/connectors/connectors.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/connectors/connectors.spec.ts index 012bbcfb899ba..68646829b9bcb 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/connectors/connectors.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/connectors/connectors.spec.ts @@ -6,7 +6,7 @@ */ import expect from '@kbn/expect'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) { const observabilityAIAssistantAPIClient = getService('observabilityAIAssistantApi'); diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/conversations/conversations.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/conversations/conversations.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/conversations/conversations.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/conversations/conversations.spec.ts index 693ad15d02ba0..4564a288e4029 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/conversations/conversations.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/conversations/conversations.spec.ts @@ -11,8 +11,8 @@ import { type ConversationUpdateRequest, Conversation, } from '@kbn/observability-ai-assistant-plugin/common/types'; -import type { SupertestReturnType } from '../../../../services/observability_ai_assistant_api'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { SupertestReturnType } from '../../../services/observability_ai_assistant_api'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { clearConversations, conversationCreate, createConversation } from '../utils/conversation'; export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/distributed_lock_manager/distributed_lock_manager.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/distributed_lock_manager/distributed_lock_manager.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/distributed_lock_manager/distributed_lock_manager.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/distributed_lock_manager/distributed_lock_manager.spec.ts index 30c9e6af6fee3..3950ae45444dd 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/distributed_lock_manager/distributed_lock_manager.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/distributed_lock_manager/distributed_lock_manager.spec.ts @@ -27,7 +27,7 @@ import { setupLockManagerIndex, } from '@kbn/lock-manager/src/setup_lock_manager_index'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { getLoggerMock } from '../utils/kibana_mocks'; import { dateAsTimestamp, durationAsMs, sleep } from '../utils/time'; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/index.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/index.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/index.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/index.ts index 6a294e1e02421..0d5bf3ed666d1 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/index.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; export default function aiAssistantApiIntegrationTests({ loadTestFile, diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/index_assets/index_assets.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/index_assets/index_assets.spec.ts similarity index 98% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/index_assets/index_assets.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/index_assets/index_assets.spec.ts index 09fc4761817bd..7827a80755f8a 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/index_assets/index_assets.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/index_assets/index_assets.spec.ts @@ -7,7 +7,7 @@ import expect from '@kbn/expect'; import { resourceNames } from '@kbn/observability-ai-assistant-plugin/server/service'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { createOrUpdateIndexAssets, restoreIndexAssets } from '../utils/index_assets'; export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/knowledge_base_8.10_upgrade_test.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/knowledge_base_8.10_upgrade_test.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/knowledge_base_8.10_upgrade_test.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/knowledge_base_8.10_upgrade_test.spec.ts index fd4af3c215212..f0fae699a54f3 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/knowledge_base_8.10_upgrade_test.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/knowledge_base_8.10_upgrade_test.spec.ts @@ -8,7 +8,7 @@ import expect from '@kbn/expect'; import * as semver from 'semver'; import { KnowledgeBaseState } from '@kbn/observability-ai-assistant-plugin/common'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { getKbIndexCreatedVersion } from '../utils/knowledge_base'; import { TINY_ELSER_INFERENCE_ID, diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/knowledge_base_8.16_upgrade_test.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/knowledge_base_8.16_upgrade_test.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/knowledge_base_8.16_upgrade_test.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/knowledge_base_8.16_upgrade_test.spec.ts index e740662cbc113..30a339bfc7e38 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/knowledge_base_8.16_upgrade_test.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/knowledge_base_8.16_upgrade_test.spec.ts @@ -14,7 +14,7 @@ import { import { sortBy } from 'lodash'; import { resourceNames } from '@kbn/observability-ai-assistant-plugin/server/service'; import { ElasticsearchClient } from '@kbn/core/server'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { getKnowledgeBaseEntriesFromEs, getKnowledgeBaseEntriesFromApi, diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/knowledge_base_8.18_upgrade_test.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/knowledge_base_8.18_upgrade_test.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/knowledge_base_8.18_upgrade_test.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/knowledge_base_8.18_upgrade_test.spec.ts index 58edda98c4e4d..f84c1ef61f165 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/knowledge_base_8.18_upgrade_test.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/knowledge_base_8.18_upgrade_test.spec.ts @@ -7,7 +7,7 @@ import expect from '@kbn/expect'; import { LEGACY_CUSTOM_INFERENCE_ID } from '@kbn/observability-ai-assistant-plugin/common/preconfigured_inference_ids'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { getKbIndexCreatedVersion, getKnowledgeBaseEntriesFromApi } from '../utils/knowledge_base'; import { createOrUpdateIndexAssets, diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/knowledge_base_basic_operations.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/knowledge_base_basic_operations.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/knowledge_base_basic_operations.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/knowledge_base_basic_operations.spec.ts index 43717db7f9434..63eb5f83b06e9 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/knowledge_base_basic_operations.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/knowledge_base_basic_operations.spec.ts @@ -11,7 +11,7 @@ import { KnowledgeBaseEntryRole, } from '@kbn/observability-ai-assistant-plugin/common'; import { orderBy, size, toPairs } from 'lodash'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { clearKnowledgeBase, getKnowledgeBaseEntriesFromEs, diff --git a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/knowledge_base_bulk_import.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/knowledge_base_bulk_import.spec.ts new file mode 100644 index 0000000000000..7b7834b9731f5 --- /dev/null +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/knowledge_base_bulk_import.spec.ts @@ -0,0 +1,58 @@ +/* + * 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. + */ + +import expect from '@kbn/expect'; +import { ELSER_ON_ML_NODE_INFERENCE_ID } from '@kbn/observability-ai-assistant-plugin/common/preconfigured_inference_ids'; +import { + clearKnowledgeBase, + getKnowledgeBaseEntriesFromEs, + setupKnowledgeBase, + waitForKnowledgeBaseReady, +} from '../utils/knowledge_base'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; + +export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) { + const es = getService('es'); + const observabilityAIAssistantAPIClient = getService('observabilityAIAssistantApi'); + + describe('Knowledge base: Bulk import operation with real ELSER model', function () { + // This test is intentionally skipped in both serverless and stateful + // since it is not meant to be run on CI but only as a manual test + before(async () => { + await setupKnowledgeBase(getService, ELSER_ON_ML_NODE_INFERENCE_ID); + await waitForKnowledgeBaseReady(getService); + }); + + after(async () => { + await clearKnowledgeBase(es); + }); + + describe('when importing a large number of entries', () => { + it('handles a large number of entries gracefully', async () => { + const entries = Array.from({ length: 2000 }, (_, i) => ({ + id: `my_doc_${i}`, + title: `My title ${i}`, + text: `My content ${i}`, + })); + + const { status } = await observabilityAIAssistantAPIClient.editor({ + endpoint: 'POST /internal/observability_ai_assistant/kb/entries/import', + params: { + body: { + entries, + }, + }, + }); + + expect(status).to.be(200); + + const hits = await getKnowledgeBaseEntriesFromEs(es, 2000); + expect(hits.length).to.be(2000); + }); + }); + }); +} diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/knowledge_base_change_model_from_elser_to_e5.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/knowledge_base_change_model_from_elser_to_e5.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/knowledge_base_change_model_from_elser_to_e5.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/knowledge_base_change_model_from_elser_to_e5.spec.ts index 3bc8900d65546..de6432fca305c 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/knowledge_base_change_model_from_elser_to_e5.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/knowledge_base_change_model_from_elser_to_e5.spec.ts @@ -10,7 +10,7 @@ import { getInferenceIdFromWriteIndex } from '@kbn/observability-ai-assistant-pl import { KnowledgeBaseEntry } from '@kbn/observability-ai-assistant-plugin/common'; import { resourceNames } from '@kbn/observability-ai-assistant-plugin/server/service'; import { isArray, isObject } from 'lodash'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { addSampleDocsToInternalKb, getConcreteWriteIndexFromAlias, diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/knowledge_base_reindex_concurrency.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/knowledge_base_reindex_concurrency.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/knowledge_base_reindex_concurrency.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/knowledge_base_reindex_concurrency.spec.ts index a7f268dc26b77..d1eb120c97e84 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/knowledge_base_reindex_concurrency.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/knowledge_base_reindex_concurrency.spec.ts @@ -8,7 +8,7 @@ import expect from '@kbn/expect'; import { times } from 'lodash'; import { resourceNames } from '@kbn/observability-ai-assistant-plugin/server/service'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { deleteKbIndices, addSampleDocsToInternalKb, diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/knowledge_base_setup.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/knowledge_base_setup.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/knowledge_base_setup.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/knowledge_base_setup.spec.ts index 389bf18a952a9..61e8e961c4cdc 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/knowledge_base_setup.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/knowledge_base_setup.spec.ts @@ -8,7 +8,7 @@ import expect from '@kbn/expect'; import { resourceNames } from '@kbn/observability-ai-assistant-plugin/server/service'; import { getInferenceIdFromWriteIndex } from '@kbn/observability-ai-assistant-plugin/server/service/knowledge_base_service/get_inference_id_from_write_index'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { getComponentTemplate, restoreIndexAssets } from '../utils/index_assets'; import { TINY_ELSER_INFERENCE_ID, diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/knowledge_base_status.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/knowledge_base_status.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/knowledge_base_status.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/knowledge_base_status.spec.ts index 0fb48f361ffc4..0e50c1047e620 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/knowledge_base_status.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/knowledge_base_status.spec.ts @@ -7,7 +7,7 @@ import expect from '@kbn/expect'; import { KnowledgeBaseState } from '@kbn/observability-ai-assistant-plugin/common'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { teardownTinyElserModelAndInferenceEndpoint, deleteInferenceEndpoint, diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/knowledge_base_user_instructions.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/knowledge_base_user_instructions.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/knowledge_base_user_instructions.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/knowledge_base_user_instructions.spec.ts index 71d90ad36620f..f7f579a11a4eb 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/knowledge_base_user_instructions.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/knowledge_base_user_instructions.spec.ts @@ -11,7 +11,7 @@ import { Message, MessageRole } from '@kbn/observability-ai-assistant-plugin/com import { CONTEXT_FUNCTION_NAME } from '@kbn/observability-ai-assistant-plugin/server/functions/context/context'; import { Instruction } from '@kbn/observability-ai-assistant-plugin/common/types'; import pRetry from 'p-retry'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { clearKnowledgeBase } from '../utils/knowledge_base'; import { LlmProxy, createLlmProxy } from '../utils/create_llm_proxy'; import { clearConversations, getConversationCreatedEvent } from '../utils/conversation'; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/knowledge_base_warmup_model.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/knowledge_base_warmup_model.spec.ts similarity index 98% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/knowledge_base_warmup_model.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/knowledge_base_warmup_model.spec.ts index 1c9ce539e59f1..d55f8999314da 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/knowledge_base_warmup_model.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/knowledge_base_warmup_model.spec.ts @@ -6,7 +6,7 @@ */ import expect from '@kbn/expect'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { TINY_ELSER_INFERENCE_ID, teardownTinyElserModelAndInferenceEndpoint, diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.10/index-0 b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.10/index-0 similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.10/index-0 rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.10/index-0 diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.10/index.latest b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.10/index.latest similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.10/index.latest rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.10/index.latest diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.10/indices/oYscBShISaWpDm7n1KXkCA/0/index-KxGoXW9rQlmlCfPaW8lMYA b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.10/indices/oYscBShISaWpDm7n1KXkCA/0/index-KxGoXW9rQlmlCfPaW8lMYA similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.10/indices/oYscBShISaWpDm7n1KXkCA/0/index-KxGoXW9rQlmlCfPaW8lMYA rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.10/indices/oYscBShISaWpDm7n1KXkCA/0/index-KxGoXW9rQlmlCfPaW8lMYA diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.10/indices/oYscBShISaWpDm7n1KXkCA/0/snap-9Wej6Q4gRZWSblPzNrtLOQ.dat b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.10/indices/oYscBShISaWpDm7n1KXkCA/0/snap-9Wej6Q4gRZWSblPzNrtLOQ.dat similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.10/indices/oYscBShISaWpDm7n1KXkCA/0/snap-9Wej6Q4gRZWSblPzNrtLOQ.dat rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.10/indices/oYscBShISaWpDm7n1KXkCA/0/snap-9Wej6Q4gRZWSblPzNrtLOQ.dat diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.10/indices/oYscBShISaWpDm7n1KXkCA/meta-3cLp9JQBDFLNeO2pjufJ.dat b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.10/indices/oYscBShISaWpDm7n1KXkCA/meta-3cLp9JQBDFLNeO2pjufJ.dat similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.10/indices/oYscBShISaWpDm7n1KXkCA/meta-3cLp9JQBDFLNeO2pjufJ.dat rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.10/indices/oYscBShISaWpDm7n1KXkCA/meta-3cLp9JQBDFLNeO2pjufJ.dat diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.10/meta-9Wej6Q4gRZWSblPzNrtLOQ.dat b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.10/meta-9Wej6Q4gRZWSblPzNrtLOQ.dat similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.10/meta-9Wej6Q4gRZWSblPzNrtLOQ.dat rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.10/meta-9Wej6Q4gRZWSblPzNrtLOQ.dat diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.10/snap-9Wej6Q4gRZWSblPzNrtLOQ.dat b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.10/snap-9Wej6Q4gRZWSblPzNrtLOQ.dat similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.10/snap-9Wej6Q4gRZWSblPzNrtLOQ.dat rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.10/snap-9Wej6Q4gRZWSblPzNrtLOQ.dat diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/index-2 b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/index-2 similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/index-2 rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/index-2 diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/index.latest b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/index.latest similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/index.latest rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/index.latest diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__06CPqevQQOmvowG1MpCD-g b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__06CPqevQQOmvowG1MpCD-g similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__06CPqevQQOmvowG1MpCD-g rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__06CPqevQQOmvowG1MpCD-g diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__4vijD3jIRDKIsqLVeCyiRg b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__4vijD3jIRDKIsqLVeCyiRg similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__4vijD3jIRDKIsqLVeCyiRg rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__4vijD3jIRDKIsqLVeCyiRg diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__67_8A2HNTvS9VX_pNYgoGw b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__67_8A2HNTvS9VX_pNYgoGw similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__67_8A2HNTvS9VX_pNYgoGw rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__67_8A2HNTvS9VX_pNYgoGw diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__BLiiHnFWQhW5EoLYh86Csg b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__BLiiHnFWQhW5EoLYh86Csg similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__BLiiHnFWQhW5EoLYh86Csg rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__BLiiHnFWQhW5EoLYh86Csg diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__BWt56U-gTom2lEcvFItpdg b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__BWt56U-gTom2lEcvFItpdg similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__BWt56U-gTom2lEcvFItpdg rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__BWt56U-gTom2lEcvFItpdg diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__D420iyS_RrOpKLE5V4CKYA b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__D420iyS_RrOpKLE5V4CKYA similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__D420iyS_RrOpKLE5V4CKYA rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__D420iyS_RrOpKLE5V4CKYA diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__D_1rlwiZSf26cF3O5bxszQ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__D_1rlwiZSf26cF3O5bxszQ similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__D_1rlwiZSf26cF3O5bxszQ rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__D_1rlwiZSf26cF3O5bxszQ diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__FxtJJJycSD2Seyxdr6QVGw b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__FxtJJJycSD2Seyxdr6QVGw similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__FxtJJJycSD2Seyxdr6QVGw rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__FxtJJJycSD2Seyxdr6QVGw diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__GwPjXn70RheLT-KpbFv81w b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__GwPjXn70RheLT-KpbFv81w similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__GwPjXn70RheLT-KpbFv81w rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__GwPjXn70RheLT-KpbFv81w diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__H34FA1J7SoWVKoGOWJlSiw b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__H34FA1J7SoWVKoGOWJlSiw similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__H34FA1J7SoWVKoGOWJlSiw rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__H34FA1J7SoWVKoGOWJlSiw diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__LAUFvO8FTlaqxCpF7pLXRw b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__LAUFvO8FTlaqxCpF7pLXRw similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__LAUFvO8FTlaqxCpF7pLXRw rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__LAUFvO8FTlaqxCpF7pLXRw diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__Lw5ZKbaITR64_ormwZVmog b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__Lw5ZKbaITR64_ormwZVmog similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__Lw5ZKbaITR64_ormwZVmog rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__Lw5ZKbaITR64_ormwZVmog diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__MiOlmmuaQLus8qTMapK-HA b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__MiOlmmuaQLus8qTMapK-HA similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__MiOlmmuaQLus8qTMapK-HA rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__MiOlmmuaQLus8qTMapK-HA diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__PCbIJy9NR66eWvkmj0W2yA b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__PCbIJy9NR66eWvkmj0W2yA similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__PCbIJy9NR66eWvkmj0W2yA rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__PCbIJy9NR66eWvkmj0W2yA diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__PSVIIb94R6WGZknZiAJvGg b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__PSVIIb94R6WGZknZiAJvGg similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__PSVIIb94R6WGZknZiAJvGg rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__PSVIIb94R6WGZknZiAJvGg diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__REtuRhUpTfSBtRs_dN0fZg b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__REtuRhUpTfSBtRs_dN0fZg similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__REtuRhUpTfSBtRs_dN0fZg rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__REtuRhUpTfSBtRs_dN0fZg diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__Rl_c6BJPTGW7E5uuo5eDIw b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__Rl_c6BJPTGW7E5uuo5eDIw similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__Rl_c6BJPTGW7E5uuo5eDIw rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__Rl_c6BJPTGW7E5uuo5eDIw diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__SPQW2ou3T02QJxsmOrrvMg b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__SPQW2ou3T02QJxsmOrrvMg similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__SPQW2ou3T02QJxsmOrrvMg rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__SPQW2ou3T02QJxsmOrrvMg diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__SfcedHiHRXaOxmmxYtbFlw b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__SfcedHiHRXaOxmmxYtbFlw similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__SfcedHiHRXaOxmmxYtbFlw rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__SfcedHiHRXaOxmmxYtbFlw diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__TpwosEuPRm-uCXdsyY4hFw b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__TpwosEuPRm-uCXdsyY4hFw similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__TpwosEuPRm-uCXdsyY4hFw rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__TpwosEuPRm-uCXdsyY4hFw diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__VTFzLU52RuiM9HxDBWOPhA b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__VTFzLU52RuiM9HxDBWOPhA similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__VTFzLU52RuiM9HxDBWOPhA rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__VTFzLU52RuiM9HxDBWOPhA diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__YBl88oxKQiSI1qHr2GLwxQ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__YBl88oxKQiSI1qHr2GLwxQ similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__YBl88oxKQiSI1qHr2GLwxQ rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__YBl88oxKQiSI1qHr2GLwxQ diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/___mIOvmULQBWV2zkBoDVveA b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/___mIOvmULQBWV2zkBoDVveA similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/___mIOvmULQBWV2zkBoDVveA rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/___mIOvmULQBWV2zkBoDVveA diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__aG94RvZxT8Ksa-xz2fgEvg b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__aG94RvZxT8Ksa-xz2fgEvg similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__aG94RvZxT8Ksa-xz2fgEvg rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__aG94RvZxT8Ksa-xz2fgEvg diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__aRTsRTBPQpSlnI2YORTeYA b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__aRTsRTBPQpSlnI2YORTeYA similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__aRTsRTBPQpSlnI2YORTeYA rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__aRTsRTBPQpSlnI2YORTeYA diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__kRTD6xS5Qxin-dxmKsTBMw b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__kRTD6xS5Qxin-dxmKsTBMw similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__kRTD6xS5Qxin-dxmKsTBMw rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__kRTD6xS5Qxin-dxmKsTBMw diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__l7M6Slx7T5CDnEKFqR8-gg b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__l7M6Slx7T5CDnEKFqR8-gg similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__l7M6Slx7T5CDnEKFqR8-gg rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__l7M6Slx7T5CDnEKFqR8-gg diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__m0R_-B8CSsG44znmiNNN2Q b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__m0R_-B8CSsG44znmiNNN2Q similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__m0R_-B8CSsG44znmiNNN2Q rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__m0R_-B8CSsG44znmiNNN2Q diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__oodLbOo3TDKZc57aEYPLCw b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__oodLbOo3TDKZc57aEYPLCw similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__oodLbOo3TDKZc57aEYPLCw rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__oodLbOo3TDKZc57aEYPLCw diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__rgBY_HmwRe2Yl7mgBTfiEw b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__rgBY_HmwRe2Yl7mgBTfiEw similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__rgBY_HmwRe2Yl7mgBTfiEw rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__rgBY_HmwRe2Yl7mgBTfiEw diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__tNe8csu0QoO6dTqllqk_dA b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__tNe8csu0QoO6dTqllqk_dA similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__tNe8csu0QoO6dTqllqk_dA rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__tNe8csu0QoO6dTqllqk_dA diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__ucs8kEFbS3SLJlPbej4NLw b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__ucs8kEFbS3SLJlPbej4NLw similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__ucs8kEFbS3SLJlPbej4NLw rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/__ucs8kEFbS3SLJlPbej4NLw diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/index-FWDT04_LTIaFE_BxwPeJfA b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/index-FWDT04_LTIaFE_BxwPeJfA similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/index-FWDT04_LTIaFE_BxwPeJfA rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/index-FWDT04_LTIaFE_BxwPeJfA diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/snap-y1zcTBUTQFuKFwMMbi7VvQ.dat b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/snap-y1zcTBUTQFuKFwMMbi7VvQ.dat similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/snap-y1zcTBUTQFuKFwMMbi7VvQ.dat rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/0/snap-y1zcTBUTQFuKFwMMbi7VvQ.dat diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/meta-ZOmqhpYBNSJu_urmZ8Mp.dat b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/meta-ZOmqhpYBNSJu_urmZ8Mp.dat similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/meta-ZOmqhpYBNSJu_urmZ8Mp.dat rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/indices/2MSR7bXrSyyoo2ZmErlBkg/meta-ZOmqhpYBNSJu_urmZ8Mp.dat diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/meta-y1zcTBUTQFuKFwMMbi7VvQ.dat b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/meta-y1zcTBUTQFuKFwMMbi7VvQ.dat similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/meta-y1zcTBUTQFuKFwMMbi7VvQ.dat rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/meta-y1zcTBUTQFuKFwMMbi7VvQ.dat diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/snap-y1zcTBUTQFuKFwMMbi7VvQ.dat b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/snap-y1zcTBUTQFuKFwMMbi7VvQ.dat similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/snap-y1zcTBUTQFuKFwMMbi7VvQ.dat rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.16/snap-y1zcTBUTQFuKFwMMbi7VvQ.dat diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.18/index-0 b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.18/index-0 similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.18/index-0 rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.18/index-0 diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.18/index.latest b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.18/index.latest similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.18/index.latest rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.18/index.latest diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.18/indices/xqR66eHHSniUBARvrCJl_w/0/__fd1J8ir-QFu4E0UfWCe62A b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.18/indices/xqR66eHHSniUBARvrCJl_w/0/__fd1J8ir-QFu4E0UfWCe62A similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.18/indices/xqR66eHHSniUBARvrCJl_w/0/__fd1J8ir-QFu4E0UfWCe62A rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.18/indices/xqR66eHHSniUBARvrCJl_w/0/__fd1J8ir-QFu4E0UfWCe62A diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.18/indices/xqR66eHHSniUBARvrCJl_w/0/__oE6vUpmtRsOKre8fj4wmPQ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.18/indices/xqR66eHHSniUBARvrCJl_w/0/__oE6vUpmtRsOKre8fj4wmPQ similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.18/indices/xqR66eHHSniUBARvrCJl_w/0/__oE6vUpmtRsOKre8fj4wmPQ rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.18/indices/xqR66eHHSniUBARvrCJl_w/0/__oE6vUpmtRsOKre8fj4wmPQ diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.18/indices/xqR66eHHSniUBARvrCJl_w/0/index-E0OyraKORESn_utIfSkkyg b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.18/indices/xqR66eHHSniUBARvrCJl_w/0/index-E0OyraKORESn_utIfSkkyg similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.18/indices/xqR66eHHSniUBARvrCJl_w/0/index-E0OyraKORESn_utIfSkkyg rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.18/indices/xqR66eHHSniUBARvrCJl_w/0/index-E0OyraKORESn_utIfSkkyg diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.18/indices/xqR66eHHSniUBARvrCJl_w/0/snap-oHvKVUVfQ4W501XyBty3_Q.dat b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.18/indices/xqR66eHHSniUBARvrCJl_w/0/snap-oHvKVUVfQ4W501XyBty3_Q.dat similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.18/indices/xqR66eHHSniUBARvrCJl_w/0/snap-oHvKVUVfQ4W501XyBty3_Q.dat rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.18/indices/xqR66eHHSniUBARvrCJl_w/0/snap-oHvKVUVfQ4W501XyBty3_Q.dat diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.18/indices/xqR66eHHSniUBARvrCJl_w/meta-qUpWgZYBfn3I2UYp5TrQ.dat b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.18/indices/xqR66eHHSniUBARvrCJl_w/meta-qUpWgZYBfn3I2UYp5TrQ.dat similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.18/indices/xqR66eHHSniUBARvrCJl_w/meta-qUpWgZYBfn3I2UYp5TrQ.dat rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.18/indices/xqR66eHHSniUBARvrCJl_w/meta-qUpWgZYBfn3I2UYp5TrQ.dat diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.18/meta-oHvKVUVfQ4W501XyBty3_Q.dat b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.18/meta-oHvKVUVfQ4W501XyBty3_Q.dat similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.18/meta-oHvKVUVfQ4W501XyBty3_Q.dat rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.18/meta-oHvKVUVfQ4W501XyBty3_Q.dat diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.18/snap-oHvKVUVfQ4W501XyBty3_Q.dat b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.18/snap-oHvKVUVfQ4W501XyBty3_Q.dat similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.18/snap-oHvKVUVfQ4W501XyBty3_Q.dat rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/snapshots/snapshot_kb_8.18/snap-oHvKVUVfQ4W501XyBty3_Q.dat diff --git a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/local/index.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/local/index.ts new file mode 100644 index 0000000000000..8d462f749292b --- /dev/null +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/local/index.ts @@ -0,0 +1,16 @@ +/* + * 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. + */ + +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; + +export default function aiAssistantApiIntegrationTests({ + loadTestFile, +}: DeploymentAgnosticFtrProviderContext) { + describe('observability AI Assistant local-only tests', function () { + loadTestFile(require.resolve('../knowledge_base/knowledge_base_bulk_import.spec.ts')); + }); +} diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/public_complete/public_complete.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/public_complete/public_complete.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/public_complete/public_complete.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/public_complete/public_complete.spec.ts index 73c8742422876..b79779413d4a1 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/public_complete/public_complete.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/public_complete/public_complete.spec.ts @@ -16,7 +16,7 @@ import { } from '@kbn/observability-ai-assistant-plugin/common/conversation_complete'; import { type Instruction } from '@kbn/observability-ai-assistant-plugin/common/types'; import { createLlmProxy, LlmProxy } from '../utils/create_llm_proxy'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { decodeEvents } from '../utils/conversation'; export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/synthtrace_scenarios/create_synthetic_apm_data.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/synthtrace_scenarios/create_synthetic_apm_data.ts similarity index 94% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/synthtrace_scenarios/create_synthetic_apm_data.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/synthtrace_scenarios/create_synthetic_apm_data.ts index 6efd0a566b4d6..98bcd3f8ce42b 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/synthtrace_scenarios/create_synthetic_apm_data.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/synthtrace_scenarios/create_synthetic_apm_data.ts @@ -7,7 +7,7 @@ import moment from 'moment'; import { apm, timerange } from '@kbn/apm-synthtrace-client'; -import { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export const createSyntheticApmData = async ({ getService, diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/synthtrace_scenarios/simple_logs.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/synthtrace_scenarios/simple_logs.ts similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/synthtrace_scenarios/simple_logs.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/synthtrace_scenarios/simple_logs.ts diff --git a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/utils/advanced_settings.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/utils/advanced_settings.ts new file mode 100644 index 0000000000000..a0a60ced56f62 --- /dev/null +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/utils/advanced_settings.ts @@ -0,0 +1,26 @@ +/* + * 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. + */ + +import { + ELASTIC_HTTP_VERSION_HEADER, + X_ELASTIC_INTERNAL_ORIGIN_REQUEST, +} from '@kbn/core-http-common'; + +import type SuperTest from 'supertest'; + +export const setAdvancedSettings = async ( + supertest: SuperTest.Agent, + settings: Record +) => { + return supertest + .post('/internal/kibana/settings') + .set('kbn-xsrf', 'true') + .set(ELASTIC_HTTP_VERSION_HEADER, '1') + .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana') + .send({ changes: settings }) + .expect(200); +}; diff --git a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/utils/alerts.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/utils/alerts.ts new file mode 100644 index 0000000000000..cebb8f50befc0 --- /dev/null +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/utils/alerts.ts @@ -0,0 +1,81 @@ +/* + * 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. + */ + +import { InternalRequestHeader, RoleCredentials } from '@kbn/ftr-common-functional-services'; +import { ApmRuleType } from '@kbn/rule-data-utils'; +import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { APM_ALERTS_INDEX, ApmAlertFields } from '../../apm/alerts/helpers/alerting_helper'; + +export const createRule = async ({ + getService, + roleAuthc, + data, +}: { + getService: DeploymentAgnosticFtrProviderContext['getService']; + roleAuthc: RoleCredentials; + internalReqHeader: InternalRequestHeader; + data?: any; +}) => { + const alertingApi = getService('alertingApi'); + const logger = getService('log'); + + try { + const createdRule = await alertingApi.createRule({ + ruleTypeId: data?.ruleTypeId || ApmRuleType.TransactionErrorRate, + name: data?.ruleName || 'APM transaction error rate', + consumer: data?.consumer || 'apm', + schedule: { interval: data?.interval || '1m' }, + tags: data?.tags || ['apm'], + params: { + environment: data?.environment || 'production', + threshold: data?.threshold || 1, + windowSize: data?.windowSize || 1, + windowUnit: data?.windowUnit || 'h', + }, + roleAuthc, + }); + + const ruleId = createdRule.id as string; + + await alertingApi.waitForDocumentInIndex({ + indexName: data?.indexName || APM_ALERTS_INDEX, + ruleId, + docCountTarget: data?.docCountTarget || 1, + }); + + return ruleId; + } catch (e) { + logger.error(`Failed to create alerting rule: ${e}`); + throw e; + } +}; + +export const runRule = async ({ + getService, + roleAuthc, + ruleId, +}: { + getService: DeploymentAgnosticFtrProviderContext['getService']; + roleAuthc: RoleCredentials; + internalReqHeader: InternalRequestHeader; + ruleId: string; +}) => { + const alertingApi = getService('alertingApi'); + return alertingApi.runRule(roleAuthc, ruleId); +}; + +export const deleteRules = async ({ + getService, + roleAuthc, +}: { + getService: DeploymentAgnosticFtrProviderContext['getService']; + roleAuthc: RoleCredentials; + internalReqHeader: InternalRequestHeader; +}) => { + const alertingApi = getService('alertingApi'); + return alertingApi.deleteRules({ roleAuthc }); +}; diff --git a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/utils/conversation.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/utils/conversation.ts new file mode 100644 index 0000000000000..3c35a20c3319e --- /dev/null +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/utils/conversation.ts @@ -0,0 +1,225 @@ +/* + * 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. + */ +import expect from '@kbn/expect'; +import { Client } from '@elastic/elasticsearch'; +import { + ConversationCreateEvent, + ConversationUpdateEvent, + Message, + MessageAddEvent, + MessageRole, + StreamingChatResponseEvent, + StreamingChatResponseEventType, + type ConversationCreateRequest, +} from '@kbn/observability-ai-assistant-plugin/common'; +import { Readable } from 'stream'; +import type { AssistantScope } from '@kbn/ai-assistant-common'; +import { ObservabilityAIAssistantScreenContextRequest } from '@kbn/observability-ai-assistant-plugin/common/types'; +import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import type { ObservabilityAIAssistantApiClient } from '../../../services/observability_ai_assistant_api'; + +export function decodeEvents(body: Readable | string) { + return String(body) + .split('\n') + .map((line) => line.trim()) + .filter(Boolean) + .map((line) => JSON.parse(line) as StreamingChatResponseEvent); +} + +export function getMessageAddedEvents(body: Readable | string) { + return decodeEvents(body).filter( + (event): event is MessageAddEvent => event.type === 'messageAdd' + ); +} + +export async function invokeChatCompleteWithFunctionRequest({ + connectorId, + observabilityAIAssistantAPIClient, + functionCall, + scopes, +}: { + connectorId: string; + observabilityAIAssistantAPIClient: ObservabilityAIAssistantApiClient; + functionCall: Message['message']['function_call']; + scopes?: AssistantScope[]; +}) { + const { status, body } = await observabilityAIAssistantAPIClient.editor({ + endpoint: 'POST /internal/observability_ai_assistant/chat/complete', + params: { + body: { + messages: [ + { + '@timestamp': new Date().toISOString(), + message: { + role: MessageRole.User, + content: 'Hello from user', + }, + }, + { + '@timestamp': new Date().toISOString(), + message: { + role: MessageRole.Assistant, + content: '', + function_call: functionCall, + }, + }, + ], + connectorId, + persist: false, + screenContexts: [], + scopes: scopes || ['observability' as AssistantScope], + }, + }, + }); + + expect(status).to.be(200); + + return body; +} + +export async function chatComplete({ + userPrompt, + screenContexts = [], + connectorId, + persist = false, + observabilityAIAssistantAPIClient, +}: { + userPrompt: string; + screenContexts?: ObservabilityAIAssistantScreenContextRequest[]; + connectorId: string; + persist?: boolean; + observabilityAIAssistantAPIClient: ObservabilityAIAssistantApiClient; +}) { + const { status, body } = await observabilityAIAssistantAPIClient.editor({ + endpoint: 'POST /internal/observability_ai_assistant/chat/complete', + params: { + body: { + messages: [ + { + '@timestamp': new Date().toISOString(), + message: { + role: MessageRole.User, + content: userPrompt, + }, + }, + ], + connectorId, + persist, + screenContexts, + scopes: ['observability' as const], + }, + }, + }); + + expect(status).to.be(200); + const messageEvents = decodeEvents(body); + const messageAddedEvents = getMessageAddedEvents(body); + const conversationCreateEvent = getConversationCreatedEvent(body); + return { messageAddedEvents, conversationCreateEvent, messageEvents, status }; +} + +// order of instructions can vary, so we sort to compare them +export function systemMessageSorted(message: string) { + return message + .split('\n\n') + .map((line) => line.trim()) + .sort(); +} + +export async function getSystemMessage( + getService: DeploymentAgnosticFtrProviderContext['getService'] +) { + const apiClient = getService('observabilityAIAssistantApi'); + + const { body } = await apiClient.editor({ + endpoint: 'GET /internal/observability_ai_assistant/functions', + params: { + query: { + scopes: ['observability'], + }, + }, + }); + + return body.systemMessage; +} + +export async function clearConversations(es: Client) { + const KB_INDEX = '.kibana-observability-ai-assistant-conversations-*'; + + return es.deleteByQuery({ + index: KB_INDEX, + conflicts: 'proceed', + query: { match_all: {} }, + refresh: true, + }); +} + +export function getConversationCreatedEvent(body: Readable | string) { + const decodedEvents = decodeEvents(body); + const conversationCreatedEvent = decodedEvents.find( + (event) => event.type === StreamingChatResponseEventType.ConversationCreate + ) as ConversationCreateEvent; + + return conversationCreatedEvent; +} + +export function getConversationUpdatedEvent(body: Readable | string) { + const decodedEvents = decodeEvents(body); + const conversationUpdatedEvent = decodedEvents.find( + (event) => event.type === StreamingChatResponseEventType.ConversationUpdate + ) as ConversationUpdateEvent; + + if (!conversationUpdatedEvent) { + throw new Error( + `No conversation updated event found: ${JSON.stringify(decodedEvents, null, 2)}` + ); + } + + return conversationUpdatedEvent; +} + +export const conversationCreate: ConversationCreateRequest = { + '@timestamp': new Date().toISOString(), + conversation: { + title: 'My title', + }, + labels: {}, + numeric_labels: {}, + systemMessage: 'this is a system message', + messages: [ + { + '@timestamp': new Date().toISOString(), + message: { + role: MessageRole.User, + content: 'My message', + }, + }, + ], + public: false, + archived: false, +}; + +export async function createConversation({ + observabilityAIAssistantAPIClient, + user = 'editor', + isPublic = false, +}: { + observabilityAIAssistantAPIClient: ObservabilityAIAssistantApiClient; + user?: 'admin' | 'editor' | 'viewer'; + isPublic?: boolean; +}) { + const response = await observabilityAIAssistantAPIClient[user]({ + endpoint: 'POST /internal/observability_ai_assistant/conversation', + params: { + body: { + conversation: { ...conversationCreate, public: isPublic }, + }, + }, + }); + + return response; +} diff --git a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/utils/create_llm_proxy.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/utils/create_llm_proxy.ts new file mode 100644 index 0000000000000..4612490b29efd --- /dev/null +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/utils/create_llm_proxy.ts @@ -0,0 +1,424 @@ +/* + * 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. + */ + +import { ToolingLog } from '@kbn/tooling-log'; +import getPort from 'get-port'; +import { v4 as uuidv4 } from 'uuid'; +import http, { type Server } from 'http'; +import { isString, once, pull, isFunction, last, first } from 'lodash'; +import { TITLE_CONVERSATION_FUNCTION_NAME } from '@kbn/observability-ai-assistant-plugin/server/service/client/operators/get_generated_title'; +import pRetry from 'p-retry'; +import type { ChatCompletionChunkToolCall } from '@kbn/inference-common'; +import { ChatCompletionStreamParams } from 'openai/lib/ChatCompletionStream'; +import { SCORE_SUGGESTIONS_FUNCTION_NAME } from '@kbn/observability-ai-assistant-plugin/server/functions/context/utils/score_suggestions'; +import { SELECT_RELEVANT_FIELDS_NAME } from '@kbn/observability-ai-assistant-plugin/server/functions/get_dataset_info/get_relevant_field_names'; +import { MessageRole } from '@kbn/observability-ai-assistant-plugin/common'; +import { createOpenAiChunk } from './create_openai_chunk'; + +type Request = http.IncomingMessage; +type Response = http.ServerResponse & { req: http.IncomingMessage }; + +type LLMMessage = string[] | ToolMessage | string | undefined; + +type RequestHandler = ( + request: Request, + response: Response, + requestBody: ChatCompletionStreamParams +) => void; + +interface RequestInterceptor { + name: string; + when: (body: ChatCompletionStreamParams) => boolean; +} + +export interface ToolMessage { + content?: string; + tool_calls?: ChatCompletionChunkToolCall[]; +} + +export interface RelevantField { + id: string; + name: string; +} + +export interface KnowledgeBaseDocument { + id: string; + text: string; +} + +export interface LlmResponseSimulator { + requestBody: ChatCompletionStreamParams; + status: (code: number) => void; + next: (msg: string | ToolMessage) => Promise; + error: (error: any) => Promise; + complete: () => Promise; + rawWrite: (chunk: string) => Promise; + rawEnd: () => Promise; +} + +export class LlmProxy { + server: Server; + interval: NodeJS.Timeout; + interceptors: Array = []; + interceptedRequests: Array<{ + requestBody: ChatCompletionStreamParams; + matchingInterceptorName: string | undefined; + }> = []; + + constructor(private readonly port: number, private readonly log: ToolingLog) { + this.interval = setInterval(() => this.log.debug(`LLM proxy listening on port ${port}`), 5000); + + this.server = http + .createServer() + .on('request', async (request, response) => { + const requestBody = await getRequestBody(request); + + const matchingInterceptor = this.interceptors.find(({ when }) => when(requestBody)); + this.interceptedRequests.push({ + requestBody, + matchingInterceptorName: matchingInterceptor?.name, + }); + if (matchingInterceptor) { + this.log.info(`Handling interceptor "${matchingInterceptor.name}"`); + matchingInterceptor.handle(request, response, requestBody); + + this.log.debug(`Removing interceptor "${matchingInterceptor.name}"`); + pull(this.interceptors, matchingInterceptor); + return; + } + + const errorMessage = `No interceptors found to handle request: ${request.method} ${request.url}`; + const availableInterceptorNames = this.interceptors.map(({ name }) => name); + this.log.warning( + `Available interceptors: ${JSON.stringify(availableInterceptorNames, null, 2)}` + ); + + this.log.warning( + `${errorMessage}. Messages: ${JSON.stringify(requestBody.messages, null, 2)}` + ); + response.writeHead(500, { + 'Elastic-Interceptor': 'Interceptor not found', + }); + response.write(sseEvent({ errorMessage, availableInterceptorNames })); + response.end(); + }) + .on('error', (error) => { + this.log.error(`LLM proxy encountered an error: ${error}`); + }) + .listen(port); + } + + getPort() { + return this.port; + } + + clear() { + this.interceptors = []; + this.interceptedRequests = []; + } + + close() { + this.log.debug(`Closing LLM Proxy on port ${this.port}`); + clearInterval(this.interval); + this.server.close(); + this.clear(); + } + + waitForAllInterceptorsToHaveBeenCalled() { + return pRetry( + async () => { + if (this.interceptors.length === 0) { + return; + } + + const unsettledInterceptors = this.interceptors.map((i) => i.name); + this.log.debug( + `Waiting for the following interceptors to be called: ${JSON.stringify( + unsettledInterceptors + )}` + ); + if (this.interceptors.length > 0) { + throw new Error( + `Interceptors were not called: ${unsettledInterceptors.map((name) => `\n - ${name}`)}` + ); + } + }, + { retries: 5, maxTimeout: 1000 } + ).catch((error) => { + this.clear(); + throw error; + }); + } + + interceptWithResponse( + msg: string | string[], + { + name, + }: { + name?: string; + } = {} + ) { + return this.intercept( + `interceptWithResponse: "${ + name ?? isString(msg) ? msg.slice(0, 80) : `${msg.length} chunks` + }"`, + // @ts-expect-error + (body) => body.tool_choice?.function?.name === undefined, + msg + ).completeAfterIntercept(); + } + + interceptWithFunctionRequest({ + name, + arguments: argumentsCallback, + when = () => true, + interceptorName, + }: { + name: string; + arguments: (body: ChatCompletionStreamParams) => string; + when?: RequestInterceptor['when']; + interceptorName?: string; + }) { + return this.intercept( + interceptorName ?? `interceptWithFunctionRequest: "${name}"`, + when, + // @ts-expect-error + (body) => { + return { + content: '', + tool_calls: [ + { + function: { + name, + arguments: argumentsCallback(body), + }, + index: 0, + id: `call_${uuidv4()}`, + }, + ], + }; + } + ).completeAfterIntercept(); + } + + interceptSelectRelevantFieldsToolChoice({ + from = 0, + to = 5, + }: { from?: number; to?: number } = {}) { + let relevantFields: RelevantField[] = []; + const simulator = this.interceptWithFunctionRequest({ + name: SELECT_RELEVANT_FIELDS_NAME, + when: (requestBody) => + // @ts-expect-error + requestBody.tool_choice?.function?.name === SELECT_RELEVANT_FIELDS_NAME, + arguments: (requestBody) => { + const messageWithFieldIds = last(requestBody.messages); + const matches = (messageWithFieldIds?.content as string).match(/\{[\s\S]*?\}/g)!; + relevantFields = matches + .slice(from, to) + .map((jsonStr) => JSON.parse(jsonStr) as RelevantField); + + return JSON.stringify({ fieldIds: relevantFields.map(({ id }) => id) }); + }, + }); + + return { + simulator, + getRelevantFields: async () => { + await simulator; + return relevantFields; + }, + }; + } + + interceptScoreToolChoice(log: ToolingLog) { + function extractDocumentsToScore(source: string): KnowledgeBaseDocument[] { + const [, raw] = source.match(/\s*(\[[\s\S]*?\])\s*<\/DocumentsToScore>/i)!; + const jsonString = raw.trim().replace(/\\"/g, '"'); + const documentsToScore = JSON.parse(jsonString); + log.debug(`Extracted documents to score: ${JSON.stringify(documentsToScore, null, 2)}`); + return documentsToScore; + } + + let documentsToScore: KnowledgeBaseDocument[] = []; + + const simulator = this.interceptWithFunctionRequest({ + name: SCORE_SUGGESTIONS_FUNCTION_NAME, + when: (requestBody) => + // @ts-expect-error + requestBody.tool_choice?.function?.name === SCORE_SUGGESTIONS_FUNCTION_NAME, + arguments: (requestBody) => { + const systemMessage = first(requestBody.messages)?.content as string; + const userMessage = last(requestBody.messages)?.content as string; + log.debug(`interceptScoreSuggestionsToolChoice: ${userMessage}`); + documentsToScore = extractDocumentsToScore(systemMessage); + const scores = documentsToScore + .map((doc: KnowledgeBaseDocument) => `${doc.id},7`) + .join(';'); + + return JSON.stringify({ scores }); + }, + }); + + return { + simulator, + getDocumentsToScore: async () => { + await simulator; + return documentsToScore; + }, + }; + } + + interceptTitle(title: string) { + return this.interceptWithFunctionRequest({ + name: TITLE_CONVERSATION_FUNCTION_NAME, + interceptorName: `Title: "${title}"`, + arguments: () => JSON.stringify({ title }), + // @ts-expect-error + when: (body) => body.tool_choice?.function?.name === TITLE_CONVERSATION_FUNCTION_NAME, + }); + } + + interceptQueryRewrite(rewrittenQuery: string) { + return this.intercept( + `interceptQueryRewrite: "${rewrittenQuery}"`, + (body) => { + const systemMessageContent = body.messages.find((msg) => msg.role === MessageRole.System) + ?.content as string; + return systemMessageContent.includes('You are a retrieval query-rewriting assistant'); + }, + rewrittenQuery + ).completeAfterIntercept(); + } + + intercept( + name: string, + when: RequestInterceptor['when'], + responseChunks?: LLMMessage | ((body: ChatCompletionStreamParams) => LLMMessage) + ): { + waitForIntercept: () => Promise; + completeAfterIntercept: () => Promise; + } { + const waitForInterceptPromise = Promise.race([ + new Promise((outerResolve) => { + this.interceptors.push({ + name, + when, + handle: (request, response, requestBody) => { + function write(chunk: string) { + return new Promise((resolve) => response.write(chunk, () => resolve())); + } + function end() { + return new Promise((resolve) => response.end(resolve)); + } + + const simulator: LlmResponseSimulator = { + requestBody, + status: once((status: number) => { + response.writeHead(status, { + 'Elastic-Interceptor': name.replace(/[^\x20-\x7E]/g, ' '), // Keeps only alphanumeric characters and spaces + 'Content-Type': 'text/event-stream', + 'Cache-Control': 'no-cache', + Connection: 'keep-alive', + }); + }), + next: (msg) => { + simulator.status(200); + const chunk = createOpenAiChunk(msg); + return write(sseEvent(chunk)); + }, + rawWrite: (chunk: string) => { + simulator.status(200); + return write(chunk); + }, + rawEnd: async () => { + await end(); + }, + complete: async () => { + this.log.debug(`Completed intercept for "${name}"`); + await write('data: [DONE]\n\n'); + await end(); + }, + error: async (error) => { + await write(`data: ${JSON.stringify({ error })}\n\n`); + await end(); + }, + }; + + outerResolve(simulator); + }, + }); + }), + new Promise((_, reject) => { + setTimeout(() => reject(new Error(`Interceptor "${name}" timed out after 30000ms`)), 30000); + }), + ]); + + return { + waitForIntercept: () => waitForInterceptPromise, + completeAfterIntercept: async () => { + const simulator = await waitForInterceptPromise; + + function getParsedChunks(): Array { + const llmMessage = isFunction(responseChunks) + ? responseChunks(simulator.requestBody) + : responseChunks; + + if (!llmMessage) { + return []; + } + + if (Array.isArray(llmMessage)) { + return llmMessage; + } + + if (isString(llmMessage)) { + return llmMessage.split(' ').map((token, i) => (i === 0 ? token : ` ${token}`)); + } + + return [llmMessage]; + } + + const parsedChunks = getParsedChunks(); + for (const chunk of parsedChunks) { + await simulator.next(chunk); + } + + await simulator.complete(); + return simulator; + }, + } as any; + } +} + +export async function createLlmProxy(log: ToolingLog) { + const port = await getPort({ port: getPort.makeRange(9000, 9100) }); + log.debug(`Starting LLM Proxy on port ${port}`); + return new LlmProxy(port, log); +} + +async function getRequestBody(request: http.IncomingMessage): Promise { + return new Promise((resolve, reject) => { + let data = ''; + + request.on('data', (chunk) => { + data += chunk.toString(); + }); + + request.on('close', () => { + resolve(JSON.parse(data)); + }); + + request.on('error', (error) => { + reject(error); + }); + }); +} + +function sseEvent(chunk: unknown) { + return `data: ${JSON.stringify(chunk)}\n\n`; +} diff --git a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/utils/create_openai_chunk.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/utils/create_openai_chunk.ts new file mode 100644 index 0000000000000..b5cdc3591f397 --- /dev/null +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/utils/create_openai_chunk.ts @@ -0,0 +1,28 @@ +/* + * 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. + */ + +import { v4 } from 'uuid'; +import type OpenAI from 'openai'; +import { ToolMessage } from './create_llm_proxy'; + +export function createOpenAiChunk(msg: string | ToolMessage): OpenAI.ChatCompletionChunk { + msg = typeof msg === 'string' ? { content: msg } : msg; + + return { + id: v4(), + object: 'chat.completion.chunk', + created: 0, + model: 'gpt-4', + choices: [ + { + delta: msg, + index: 0, + finish_reason: null, + }, + ], + }; +} diff --git a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/utils/index_assets.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/utils/index_assets.ts new file mode 100644 index 0000000000000..b403653139b67 --- /dev/null +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/utils/index_assets.ts @@ -0,0 +1,89 @@ +/* + * 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. + */ + +import expect from '@kbn/expect'; +import { Client } from '@elastic/elasticsearch'; +import { + getResourceName, + resourceNames, +} from '@kbn/observability-ai-assistant-plugin/server/service'; +import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import type { ObservabilityAIAssistantApiClient } from '../../../services/observability_ai_assistant_api'; +import { TINY_ELSER_INFERENCE_ID } from './model_and_inference'; +import { getConcreteWriteIndexFromAlias } from './knowledge_base'; + +export async function runStartupMigrations( + observabilityAIAssistantAPIClient: ObservabilityAIAssistantApiClient +) { + const { status } = await observabilityAIAssistantAPIClient.editor({ + endpoint: 'POST /internal/observability_ai_assistant/kb/migrations/startup', + }); + expect(status).to.be(200); +} + +export async function createOrUpdateIndexAssets( + observabilityAIAssistantAPIClient: ObservabilityAIAssistantApiClient +) { + const { status } = await observabilityAIAssistantAPIClient.editor({ + endpoint: 'POST /internal/observability_ai_assistant/index_assets', + params: { + query: { + inference_id: TINY_ELSER_INFERENCE_ID, + }, + }, + }); + expect(status).to.be(200); +} + +export async function deleteIndexAssets( + getService: DeploymentAgnosticFtrProviderContext['getService'] +) { + const es = getService('es'); + const log = getService('log'); + + // delete write indices + const response = await es.indices.get({ index: getResourceName('*') }); + const indicesToDelete = Object.keys(response); + + if (indicesToDelete.length > 0) { + log.debug(`Deleting indices: ${indicesToDelete.join(', ')}`); + try { + await Promise.all( + indicesToDelete.map(async (index) => es.indices.delete({ index, ignore_unavailable: true })) + ); + } catch (err) { + log.error(`Failed to delete indices: ${err}`); + } + } + + await es.indices.deleteIndexTemplate({ name: getResourceName('*') }, { ignore: [404] }); + await es.cluster.deleteComponentTemplate({ name: getResourceName('*') }, { ignore: [404] }); +} + +export async function restoreIndexAssets( + getService: DeploymentAgnosticFtrProviderContext['getService'] +) { + const observabilityAIAssistantAPIClient = getService('observabilityAIAssistantApi'); + const retry = getService('retry'); + const es = getService('es'); + const log = getService('log'); + + await retry.try(async () => { + log.debug('Restoring index assets'); + await deleteIndexAssets(getService); + await createOrUpdateIndexAssets(observabilityAIAssistantAPIClient); + expect(await getConcreteWriteIndexFromAlias(es)).to.be(resourceNames.concreteWriteIndexName.kb); + }); +} + +export async function getComponentTemplate(es: Client) { + const res = await es.cluster.getComponentTemplate({ + name: resourceNames.componentTemplate.kb, + }); + + return res.component_templates[0]; +} diff --git a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/utils/kibana_mocks.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/utils/kibana_mocks.ts new file mode 100644 index 0000000000000..0968b5429fed6 --- /dev/null +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/utils/kibana_mocks.ts @@ -0,0 +1,38 @@ +/* + * 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. + */ + +import { Client } from '@elastic/elasticsearch'; +import { CoreSetup } from '@kbn/core/server'; +import { Logger } from '@kbn/logging'; +import { ObservabilityAIAssistantConfig } from '@kbn/observability-ai-assistant-plugin/server/config'; +import { ObservabilityAIAssistantPluginStartDependencies } from '@kbn/observability-ai-assistant-plugin/server/types'; +import { ToolingLog } from '@kbn/tooling-log'; + +export function getLoggerMock(toolingLog: ToolingLog) { + return { + debug: (...args: any[]) => toolingLog.debug(...args), + error: (errorOrMessage: Error) => toolingLog.error(errorOrMessage), + info: (...args: any[]) => toolingLog.info(...args), + warn: (...args: any[]) => toolingLog.warning(...args), + fatal: (...args: any[]) => toolingLog.warning(...args), + trace: (...args: any[]) => toolingLog.debug(...args), + get: () => getLoggerMock(toolingLog), + } as unknown as Logger; +} + +export function getCoreMock(es: Client) { + return { + getStartServices: async () => [{ elasticsearch: { client: { asInternalUser: es } } }], + } as unknown as CoreSetup; +} + +export function getConfigMock(config: Partial) { + return { + enableKnowledgeBase: true, + ...config, + } as ObservabilityAIAssistantConfig; +} diff --git a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/utils/knowledge_base.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/utils/knowledge_base.ts new file mode 100644 index 0000000000000..b3bf641049f6f --- /dev/null +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/utils/knowledge_base.ts @@ -0,0 +1,297 @@ +/* + * 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. + */ + +import { Client } from '@elastic/elasticsearch'; +import { + Instruction, + KnowledgeBaseEntry, + KnowledgeBaseState, +} from '@kbn/observability-ai-assistant-plugin/common/types'; +import { resourceNames } from '@kbn/observability-ai-assistant-plugin/server/service'; +import expect from '@kbn/expect'; +import pRetry from 'p-retry'; +import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { setAdvancedSettings } from './advanced_settings'; +import { TINY_ELSER_INFERENCE_ID } from './model_and_inference'; +import type { ObservabilityAIAssistantApiClient } from '../../../services/observability_ai_assistant_api'; + +export async function clearKnowledgeBase(es: Client) { + return pRetry( + () => { + return es.deleteByQuery({ + index: resourceNames.indexPatterns.kb, + conflicts: 'proceed', + query: { match_all: {} }, + refresh: true, + }); + }, + { retries: 5 } + ); +} + +export async function waitForKnowledgeBaseIndex( + getService: DeploymentAgnosticFtrProviderContext['getService'], + expectedIndex: string +) { + const retry = getService('retry'); + const es = getService('es'); + + await retry.try(async () => { + const currentIndex = await getConcreteWriteIndexFromAlias(es); + expect(currentIndex).to.be(expectedIndex); + }); +} + +export async function getKnowledgeBaseStatus( + observabilityAIAssistantAPIClient: ObservabilityAIAssistantApiClient +) { + return observabilityAIAssistantAPIClient.editor({ + endpoint: 'GET /internal/observability_ai_assistant/kb/status', + }); +} + +export async function waitForKnowledgeBaseReady( + getService: DeploymentAgnosticFtrProviderContext['getService'] +) { + const retry = getService('retry'); + const log = getService('log'); + const observabilityAIAssistantAPIClient = getService('observabilityAIAssistantApi'); + + await retry.tryForTime(5 * 60 * 1000, async () => { + log.debug(`Waiting for knowledge base to be ready...`); + const { body, status } = await getKnowledgeBaseStatus(observabilityAIAssistantAPIClient); + + const { kbState, isReIndexing, concreteWriteIndex, currentInferenceId } = body; + if (status !== 200 || kbState !== KnowledgeBaseState.READY) { + log.warning(`Knowledge base is not ready yet: + Status code: ${status} + State: ${kbState} + isReIndexing: ${isReIndexing} + concreteWriteIndex: ${concreteWriteIndex} + currentInferenceId: ${currentInferenceId}`); + } + + expect(status).to.be(200); + expect(kbState).to.be(KnowledgeBaseState.READY); + expect(isReIndexing).to.be(false); + log.info(`Knowledge base is in ready state.`); + }); +} + +export async function setupKnowledgeBase( + getService: DeploymentAgnosticFtrProviderContext['getService'], + inferenceId: string +) { + const observabilityAIAssistantAPIClient = getService('observabilityAIAssistantApi'); + const log = getService('log'); + + const statusResult = await getKnowledgeBaseStatus(observabilityAIAssistantAPIClient); + + log.debug( + `Setting up knowledge base with inferenceId = "${inferenceId}", concreteWriteIndex = ${statusResult.body.concreteWriteIndex}, currentInferenceId = ${statusResult.body.currentInferenceId}, isReIndexing = ${statusResult.body.isReIndexing}` + ); + const { body, status } = await observabilityAIAssistantAPIClient.admin({ + endpoint: 'POST /internal/observability_ai_assistant/kb/setup', + params: { + query: { inference_id: inferenceId, wait_until_complete: true }, + }, + }); + + if (status !== 200) { + log.warning(`Failed to setup knowledge base: + Status code: ${status} + Body: ${JSON.stringify(body, null, 2)}`); + } + + return { body, status }; +} + +export async function addSampleDocsToInternalKb( + getService: DeploymentAgnosticFtrProviderContext['getService'], + sampleDocs: Array +) { + const observabilityAIAssistantAPIClient = getService('observabilityAIAssistantApi'); + const es = getService('es'); + const log = getService('log'); + const retry = getService('retry'); + + await observabilityAIAssistantAPIClient.editor({ + endpoint: 'POST /internal/observability_ai_assistant/kb/entries/import', + params: { + body: { + entries: sampleDocs, + }, + }, + }); + + await refreshKbIndex(es); + + await retry.try(async () => { + const itemsInKb = await getKnowledgeBaseEntriesFromEs(es); + log.debug( + `Waiting for at least ${sampleDocs.length} docs to be available for search in KB. Currently ${itemsInKb.length} docs available.` + ); + expect(itemsInKb.length >= sampleDocs.length).to.be(true); + }); +} + +// refresh the index to make sure the documents are searchable +export function refreshKbIndex(es: Client) { + return es.indices.refresh({ index: resourceNames.indexPatterns.kb }); +} + +export async function addSampleDocsToCustomIndex( + getService: DeploymentAgnosticFtrProviderContext['getService'], + sampleDocs: Array, + customSearchConnectorIndex: string +) { + const es = getService('es'); + const supertest = getService('supertest'); + const log = getService('log'); + + // create index with semantic_text mapping for `text` field + log.info('Creating custom index with sample animal docs...'); + await es.indices.create({ + index: customSearchConnectorIndex, + mappings: { + properties: { + title: { type: 'text' }, + text: { type: 'semantic_text', inference_id: TINY_ELSER_INFERENCE_ID }, + }, + }, + }); + + log.info('Indexing sample animal docs...'); + // ingest sampleDocs + await Promise.all( + sampleDocs.map(async (doc) => { + const { id, ...restDoc } = doc; + return es.index({ + refresh: 'wait_for', + index: customSearchConnectorIndex, + id, + body: restDoc, + }); + }) + ); + + // update the advanced settings (`observability:aiAssistantSearchConnectorIndexPattern`) to include the custom index + await setAdvancedSettings(supertest, { + 'observability:aiAssistantSearchConnectorIndexPattern': customSearchConnectorIndex, + }); +} + +export async function getKbIndices(es: Client) { + const res = await es.cat.indices({ + index: resourceNames.indexPatterns.kb, + format: 'json', + h: 'index', + }); + + return res.map(({ index }) => index!); +} + +export async function deleteKbIndices(es: Client) { + const index = await getKbIndices(es); + if (index.length > 0) { + await es.indices.delete({ index, ignore_unavailable: true }); + } +} + +export async function getConcreteWriteIndexFromAlias(es: Client) { + const response = await es.indices.getAlias({ index: resourceNames.writeIndexAlias.kb }); + const writeIndex = Object.entries(response).find( + ([index, aliasInfo]) => aliasInfo.aliases[resourceNames.writeIndexAlias.kb]?.is_write_index + )?.[0]; + + if (!writeIndex) { + throw new Error(`Could not find write index for alias ${resourceNames.writeIndexAlias.kb}`); + } + + return writeIndex; +} + +export async function getKbIndexCreatedVersion(es: Client) { + const indexSettings = await es.indices.getSettings({ + index: resourceNames.writeIndexAlias.kb, + human: true, + }); + + const { settings } = Object.values(indexSettings)[0]; + const createdVersion = settings?.index?.version?.created_string; + if (!createdVersion) { + throw new Error(`Could not find created version for index ${resourceNames.writeIndexAlias.kb}`); + } + return createdVersion; +} + +export async function reIndexKnowledgeBase( + observabilityAIAssistantAPIClient: ObservabilityAIAssistantApiClient +) { + return observabilityAIAssistantAPIClient.admin({ + endpoint: 'POST /internal/observability_ai_assistant/kb/reindex', + }); +} + +interface SemanticTextField { + semantic_text: string; + _inference_fields: { + semantic_text: { + inference: { + inference_id: string; + chunks: { + semantic_text: Array<{ + embeddings: + | Record // sparse embedding + | number[]; // dense embedding; + }>; + }; + }; + }; + }; +} + +export async function getKnowledgeBaseEntriesFromEs(es: Client, size = 1000) { + const res = await es.search({ + size, + index: resourceNames.writeIndexAlias.kb, + // Add fields parameter to include inference metadata + fields: ['_inference_fields'], + query: { + match_all: {}, + }, + }); + + return res.hits.hits; +} + +export async function addKnowledgeBaseEntryToEs(es: Client, entry: KnowledgeBaseEntry) { + const result = await es.index({ + index: resourceNames.writeIndexAlias.kb, + document: entry, + refresh: true, + }); + + return result; +} + +export function getKnowledgeBaseEntriesFromApi({ + observabilityAIAssistantAPIClient, + query = '', + sortBy = 'title', + sortDirection = 'asc', +}: { + observabilityAIAssistantAPIClient: ObservabilityAIAssistantApiClient; + query?: string; + sortBy?: string; + sortDirection?: 'asc' | 'desc'; +}) { + return observabilityAIAssistantAPIClient.editor({ + endpoint: 'GET /internal/observability_ai_assistant/kb/entries', + params: { query: { query, sortBy, sortDirection } }, + }); +} diff --git a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/utils/model_and_inference.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/utils/model_and_inference.ts new file mode 100644 index 0000000000000..a434be04f3745 --- /dev/null +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/utils/model_and_inference.ts @@ -0,0 +1,273 @@ +/* + * 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. + */ + +import { Client, errors } from '@elastic/elasticsearch'; +import { ToolingLog } from '@kbn/tooling-log'; +import { InferenceTaskType } from '@elastic/elasticsearch/lib/api/types'; +import pRetry, { AbortError } from 'p-retry'; +import pTimeout, { TimeoutError } from 'p-timeout'; +import { SUPPORTED_TRAINED_MODELS } from '@kbn/test-suites-xpack-platform/functional/services/ml/api'; +import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { setupKnowledgeBase, waitForKnowledgeBaseReady } from './knowledge_base'; + +// tiny models +export const TINY_ELSER_MODEL_ID = SUPPORTED_TRAINED_MODELS.TINY_ELSER.name; +export const TINY_TEXT_EMBEDDING_MODEL_ID = SUPPORTED_TRAINED_MODELS.TINY_TEXT_EMBEDDING.name; + +// tiny inference endpoints +export const TINY_ELSER_INFERENCE_ID = 'pt_tiny_elser_inference_id'; +export const TINY_TEXT_EMBEDDING_INFERENCE_ID = 'pt_tiny_text_embedding_inference_id'; + +export async function importModel( + getService: DeploymentAgnosticFtrProviderContext['getService'], + { + modelId, + }: { + modelId: typeof TINY_ELSER_MODEL_ID | typeof TINY_TEXT_EMBEDDING_MODEL_ID; + } +) { + const ml = getService('ml'); + const log = getService('log'); + + const config = ml.api.getTrainedModelConfig(modelId); + await ml.api.assureMlStatsIndexExists(); + + try { + await ml.api.importTrainedModel(modelId, modelId, config); + log.info(`Model "${modelId}" imported successfully.`); + } catch (error) { + if ( + error.message.includes('resource_already_exists_exception') || + error.message.includes( + 'the model id is the same as the deployment id of a current model deployment' + ) + ) { + log.info(`Model "${modelId}" is already imported. Skipping import.`); + return; + } + + log.error(`Could not import model "${modelId}": ${error}`); + throw error; + } +} + +export async function startModelDeployment( + getService: DeploymentAgnosticFtrProviderContext['getService'], + { + modelId, + }: { + modelId: typeof TINY_ELSER_MODEL_ID | typeof TINY_TEXT_EMBEDDING_MODEL_ID; + } +) { + const ml = getService('ml'); + const log = getService('log'); + + try { + await ml.api.startTrainedModelDeploymentES(modelId); + } catch (error) { + if ( + error.message.includes( + 'Could not start model deployment because an existing deployment with the same id' + ) + ) { + log.info(`Model "${modelId}" is already started. Skipping starting deployment.`); + return; + } + + throw error; + } +} + +export async function setupTinyElserModelAndInferenceEndpoint( + getService: DeploymentAgnosticFtrProviderContext['getService'] +) { + await retryOnTimeout(() => importModel(getService, { modelId: TINY_ELSER_MODEL_ID })); + await retryOnTimeout(() => + createTinyElserInferenceEndpoint(getService, { inferenceId: TINY_ELSER_INFERENCE_ID }) + ); +} + +export async function teardownTinyElserModelAndInferenceEndpoint( + getService: DeploymentAgnosticFtrProviderContext['getService'] +) { + await deleteModel(getService, { modelId: TINY_ELSER_MODEL_ID }); + await deleteInferenceEndpoint(getService, { inferenceId: TINY_ELSER_INFERENCE_ID }); +} + +export function createTinyElserInferenceEndpoint( + getService: DeploymentAgnosticFtrProviderContext['getService'], + { inferenceId }: { inferenceId: string } +) { + const es = getService('es'); + const log = getService('log'); + + return createInferenceEndpoint({ + es, + log, + modelId: TINY_ELSER_MODEL_ID, + inferenceId, + taskType: 'sparse_embedding', + }); +} + +export function createTinyTextEmbeddingInferenceEndpoint( + getService: DeploymentAgnosticFtrProviderContext['getService'], + { inferenceId }: { inferenceId: string } +) { + const es = getService('es'); + const log = getService('log'); + + return createInferenceEndpoint({ + es, + log, + modelId: TINY_TEXT_EMBEDDING_MODEL_ID, + inferenceId, + taskType: 'text_embedding', + }); +} + +export async function deployTinyElserAndSetupKb( + getService: DeploymentAgnosticFtrProviderContext['getService'] +) { + await setupTinyElserModelAndInferenceEndpoint(getService); + + const { status, body } = await setupKnowledgeBase(getService, TINY_ELSER_INFERENCE_ID); + await waitForKnowledgeBaseReady(getService); + + return { status, body }; +} + +export async function deleteInferenceEndpoint( + getService: DeploymentAgnosticFtrProviderContext['getService'], + { + inferenceId, + }: { + inferenceId: string; + } +) { + const es = getService('es'); + const log = getService('log'); + + try { + await es.inference.delete({ inference_id: inferenceId, force: true }); + log.info(`Inference endpoint "${inferenceId}" deleted.`); + } catch (e) { + if (e.message.includes('resource_not_found_exception')) { + log.debug(`Inference endpoint "${inferenceId}" was already deleted. Skipping deletion.`); + return; + } + + log.error(`Could not delete inference endpoint "${inferenceId}": ${e}`); + throw e; + } +} + +export async function createInferenceEndpoint({ + es, + log, + inferenceId, + modelId, + taskType, +}: { + es: Client; + log: ToolingLog; + inferenceId: string; + modelId: string; + taskType?: InferenceTaskType; +}) { + return pRetry( + async () => { + try { + const res = await es.inference.put({ + inference_id: inferenceId, + task_type: taskType, + inference_config: { + service: 'elasticsearch', + service_settings: { + model_id: modelId, + adaptive_allocations: { enabled: true, min_number_of_allocations: 1 }, + num_threads: 1, + }, + task_settings: {}, + }, + }); + + log.info(`Inference endpoint ${inferenceId} created.`); + return res; + } catch (error) { + if ( + error instanceof errors.ResponseError && + (error.body?.error?.type === 'resource_not_found_exception' || + error.body?.error?.type === 'status_exception') + ) { + log.debug(`Inference endpoint "${inferenceId}" already exists. Skipping creation.`); + return; + } + + log.error(`Error creating inference endpoint "${inferenceId}": ${error}`); + throw error; + } + }, + { retries: 2 } + ); +} + +export async function deleteModel( + getService: DeploymentAgnosticFtrProviderContext['getService'], + { + modelId, + }: { + modelId: typeof TINY_ELSER_MODEL_ID | typeof TINY_TEXT_EMBEDDING_MODEL_ID; + } +) { + const log = getService('log'); + const ml = getService('ml'); + + try { + await ml.api.stopTrainedModelDeploymentES(modelId, true); + await ml.api.deleteTrainedModelES(modelId); + await ml.testResources.cleanMLSavedObjects(); + log.info(`Knowledge base model deleted.`); + } catch (e) { + if (e.message.includes('resource_not_found_exception')) { + log.debug(`Knowledge base model was already deleted.`); + } else { + log.error(`Could not delete knowledge base model: ${e}`); + } + } +} + +export async function stopTinyElserModel( + getService: DeploymentAgnosticFtrProviderContext['getService'] +) { + const log = getService('log'); + const ml = getService('ml'); + + try { + await ml.api.stopTrainedModelDeploymentES(TINY_ELSER_INFERENCE_ID, true); + log.info(`Knowledge base model (${TINY_ELSER_MODEL_ID}) stopped.`); + } catch (e) { + log.error(`Could not stop knowledge base model (${TINY_ELSER_MODEL_ID}): ${e}`); + } +} + +async function retryOnTimeout(fn: () => Promise, timeout = 60_000): Promise { + return pRetry( + async () => { + try { + return await pTimeout(fn(), { milliseconds: timeout }); + } catch (err: any) { + if (!(err instanceof TimeoutError)) { + throw new AbortError(err); // don't retry on non-timeout errors + } + + throw err; // retry on timeout errors + } + }, + { retries: 2, minTimeout: 5_000, maxTimeout: 5_000 } + ); +} diff --git a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/utils/observability_ai_assistant_api_client.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/utils/observability_ai_assistant_api_client.ts new file mode 100644 index 0000000000000..e54e0660caa53 --- /dev/null +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/utils/observability_ai_assistant_api_client.ts @@ -0,0 +1,168 @@ +/* + * 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. + */ + +import type { + APIReturnType, + ObservabilityAIAssistantAPIClientRequestParamsOf, + ObservabilityAIAssistantAPIEndpoint, +} from '@kbn/observability-ai-assistant-plugin/public'; +import { formatRequest } from '@kbn/server-route-repository'; +import supertest from 'supertest'; +import { Subtract } from 'utility-types'; +import { format, UrlObject } from 'url'; +import { kbnTestConfig } from '@kbn/test'; + +export function getScopedApiClient(kibanaServer: UrlObject, username: string) { + const { password } = kbnTestConfig.getUrlParts(); + const baseUrlWithAuth = format({ + ...kibanaServer, + auth: `${username}:${password}`, + }); + + return createObservabilityAIAssistantApiClient(supertest(baseUrlWithAuth)); +} + +export type ObservabilityAIAssistantApiClient = ReturnType< + typeof createObservabilityAIAssistantApiClient +>; +export function createObservabilityAIAssistantApiClient(st: supertest.Agent) { + return ( + options: { + type?: 'form-data'; + endpoint: TEndpoint; + } & ObservabilityAIAssistantAPIClientRequestParamsOf & { + params?: { query?: { _inspect?: boolean } }; + } + ): SupertestReturnType => { + const { endpoint, type } = options; + + const params = 'params' in options ? (options.params as Record) : {}; + + const { method, pathname, version } = formatRequest(endpoint, params.path); + const url = format({ pathname, query: params?.query }); + + const headers: Record = { 'kbn-xsrf': 'foo' }; + + if (version) { + headers['Elastic-Api-Version'] = version; + } + + let res: supertest.Test; + if (type === 'form-data') { + const fields: Array<[string, any]> = Object.entries(params.body); + const formDataRequest = st[method](url) + .set(headers) + .set('Content-type', 'multipart/form-data'); + + for (const field of fields) { + void formDataRequest.field(field[0], field[1]); + } + + res = formDataRequest; + } else if (params.body) { + res = st[method](url).send(params.body).set(headers); + } else { + res = st[method](url).set(headers); + } + + return res as unknown as SupertestReturnType; + }; +} + +export type ObservabilityAIAssistantAPIClient = ReturnType< + typeof createObservabilityAIAssistantApiClient +>; + +type WithoutPromise> = Subtract>; + +// this is a little intense, but without it, method overrides are lost +// e.g., { +// end(one:string) +// end(one:string, two:string) +// } +// would lose the first signature. This keeps up to eight signatures. +type OverloadedParameters = T extends { + (...args: infer A1): any; + (...args: infer A2): any; + (...args: infer A3): any; + (...args: infer A4): any; + (...args: infer A5): any; + (...args: infer A6): any; + (...args: infer A7): any; + (...args: infer A8): any; +} + ? A1 | A2 | A3 | A4 | A5 | A6 | A7 | A8 + : T extends { + (...args: infer A1): any; + (...args: infer A2): any; + (...args: infer A3): any; + (...args: infer A4): any; + (...args: infer A5): any; + (...args: infer A6): any; + (...args: infer A7): any; + } + ? A1 | A2 | A3 | A4 | A5 | A6 | A7 + : T extends { + (...args: infer A1): any; + (...args: infer A2): any; + (...args: infer A3): any; + (...args: infer A4): any; + (...args: infer A5): any; + (...args: infer A6): any; + } + ? A1 | A2 | A3 | A4 | A5 | A6 + : T extends { + (...args: infer A1): any; + (...args: infer A2): any; + (...args: infer A3): any; + (...args: infer A4): any; + (...args: infer A5): any; + } + ? A1 | A2 | A3 | A4 | A5 + : T extends { + (...args: infer A1): any; + (...args: infer A2): any; + (...args: infer A3): any; + (...args: infer A4): any; + } + ? A1 | A2 | A3 | A4 + : T extends { + (...args: infer A1): any; + (...args: infer A2): any; + (...args: infer A3): any; + } + ? A1 | A2 | A3 + : T extends { + (...args: infer A1): any; + (...args: infer A2): any; + } + ? A1 | A2 + : T extends (...args: infer A) => any + ? A + : any; + +type OverrideReturnType any, TNextReturnType> = ( + ...args: OverloadedParameters +) => WithoutPromise> & TNextReturnType; + +type OverwriteThisMethods, TNextReturnType> = TNextReturnType & { + [key in keyof T]: T[key] extends (...args: infer TArgs) => infer TReturnType + ? TReturnType extends Promise + ? OverrideReturnType + : (...args: TArgs) => TReturnType + : T[key]; +}; + +export type SupertestReturnType = + OverwriteThisMethods< + WithoutPromise, + Promise<{ + text: string; + status: number; + body: APIReturnType; + }> + >; diff --git a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/utils/product_doc_base.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/utils/product_doc_base.ts new file mode 100644 index 0000000000000..97cdf016ee785 --- /dev/null +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/utils/product_doc_base.ts @@ -0,0 +1,37 @@ +/* + * 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. + */ + +import { + ELASTIC_HTTP_VERSION_HEADER, + X_ELASTIC_INTERNAL_ORIGIN_REQUEST, +} from '@kbn/core-http-common'; + +import type SuperTest from 'supertest'; + +export async function installProductDoc(supertest: SuperTest.Agent, inferenceId: string) { + return supertest + .post('/internal/product_doc_base/install') + .set(ELASTIC_HTTP_VERSION_HEADER, '1') + .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana') + .set('kbn-xsrf', 'foo') + .send({ + inferenceId, + }) + .expect(200); +} + +export async function uninstallProductDoc(supertest: SuperTest.Agent, inferenceId: string) { + return supertest + .post('/internal/product_doc_base/uninstall') + .set(ELASTIC_HTTP_VERSION_HEADER, '1') + .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana') + .set('kbn-xsrf', 'foo') + .send({ + inferenceId, + }) + .expect(200); +} diff --git a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/utils/sample_docs.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/utils/sample_docs.ts new file mode 100644 index 0000000000000..892b99079bc98 --- /dev/null +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/utils/sample_docs.ts @@ -0,0 +1,52 @@ +/* + * 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. + */ + +export const animalSampleDocs = [ + { + id: 'animal_elephants_social_structure', + title: 'Elephants and Their Social Structure', + text: 'Elephants are highly social animals that live in matriarchal herds led by the oldest female. These animals communicate through low-frequency sounds, called infrasound, that travel long distances. They are known for their intelligence, strong memory, and deep emotional bonds with each other.', + }, + { + id: 'animal_cheetah_life_speed', + title: 'The Life of a Cheetah', + text: 'Cheetahs are the fastest land animals, capable of reaching speeds up to 60 miles per hour in short bursts. They rely on their speed to catch prey, such as gazelles. Unlike other big cats, cheetahs cannot roar, but they make distinctive chirping sounds, especially when communicating with their cubs.', + }, + { + id: 'animal_whale_migration_patterns', + title: 'Whales and Their Migration Patterns', + text: 'Whales are known for their long migration patterns, traveling thousands of miles between feeding and breeding grounds.', + }, + { + id: 'animal_giraffe_habitat_feeding', + title: 'Giraffes: Habitat and Feeding Habits', + text: 'Giraffes are the tallest land animals, with long necks that help them reach leaves high up in trees. They live in savannas and grasslands, where they feed on leaves, twigs, and fruits from acacia trees.', + }, + { + id: 'animal_penguin_antarctic_adaptations', + title: 'Penguins and Their Antarctic Adaptations', + text: 'Penguins are flightless birds that have adapted to life in the cold Antarctic environment. They have a thick layer of blubber to keep warm, and their wings have evolved into flippers for swimming in the icy waters.', + }, +]; + +export const technicalSampleDocs = [ + { + id: 'technical_db_outage_slow_queries', + title: 'Database Outage: Slow Query Execution', + text: 'At 03:15 AM UTC, the production database experienced a significant outage, leading to slow query execution and increased response times across multiple services. A surge in database load was detected, with 90% of queries exceeding 2 seconds. A detailed log analysis pointed to locking issues within the transaction queue and inefficient index usage.', + }, + { + id: 'technical_api_gateway_timeouts', + title: 'Service Timeout: API Gateway Bottleneck', + text: 'At 10:45 AM UTC, the API Gateway encountered a timeout issue, causing a 500 error for all incoming requests. Detailed traces indicated a significant bottleneck at the gateway level, where requests stalled while waiting for upstream service responses. The upstream service was overwhelmed due to a sudden spike in inbound traffic and failed to release resources promptly.', + }, + { + id: 'technical_cache_misses_thirdparty_api', + title: 'Cache Misses and Increased Latency: Third-Party API Failure', + text: 'At 04:30 PM UTC, a dramatic increase in cache misses and latency was observed. The failure of a third-party API prevented critical data from being cached, leading to unnecessary re-fetching of resources from external sources. This caused significant delays in response times, with up to 10-second delays in some key services.', + }, +]; diff --git a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/utils/snapshots.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/utils/snapshots.ts new file mode 100644 index 0000000000000..e0543a5246dbe --- /dev/null +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/utils/snapshots.ts @@ -0,0 +1,52 @@ +/* + * 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. + */ + +import { Client } from '@elastic/elasticsearch'; +import { resourceNames } from '@kbn/observability-ai-assistant-plugin/server/service'; +import { ToolingLog } from '@kbn/tooling-log'; +import path from 'path'; +import { AI_ASSISTANT_SNAPSHOT_REPO_PATH } from '@kbn/test-suites-xpack-platform/api_integration_deployment_agnostic/default_configs/common_paths'; + +export async function restoreKbSnapshot({ + log, + es, + snapshotFolderName, + snapshotName, +}: { + log: ToolingLog; + es: Client; + snapshotFolderName: string; + snapshotName: string; +}) { + const snapshotLocation = path.join(AI_ASSISTANT_SNAPSHOT_REPO_PATH, snapshotFolderName); + + const snapshotRepoName = `my_repo_${snapshotFolderName}`; + log.debug(`Creating snapshot repository "${snapshotRepoName}" from "${snapshotLocation}"`); + await es.snapshot.createRepository({ + name: snapshotFolderName, + repository: { + type: 'fs', + settings: { location: snapshotLocation }, + }, + }); + + try { + log.debug(`Restoring snapshot of "${resourceNames.concreteWriteIndexName.kb}"`); + await es.snapshot.restore({ + repository: snapshotFolderName, + snapshot: snapshotName, + wait_for_completion: true, + indices: resourceNames.concreteWriteIndexName.kb, + }); + } catch (error) { + log.error(`Error restoring snapshot: ${error.message}`); + throw error; + } finally { + log.debug(`Deleting snapshot repository "${snapshotFolderName}"`); + await es.snapshot.deleteRepository({ name: snapshotFolderName }); + } +} diff --git a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/utils/tasks.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/utils/tasks.ts new file mode 100644 index 0000000000000..17dfd6dc37457 --- /dev/null +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/utils/tasks.ts @@ -0,0 +1,32 @@ +/* + * 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. + */ + +import { Client } from '@elastic/elasticsearch'; +import { getActiveReindexingTaskId } from '@kbn/observability-ai-assistant-plugin/server/service/knowledge_base_service/reindex_knowledge_base'; +import pRetry from 'p-retry'; + +export async function waitForIndexTaskToComplete(es: Client) { + await pRetry( + async () => { + const taskId = await getActiveReindexingTaskId({ asInternalUser: es }); + if (!taskId) { + throw new Error('Waiting for reindexing task to start'); + } + }, + { retries: 50, factor: 1, minTimeout: 500 } + ); + + await pRetry( + async () => { + const taskId = await getActiveReindexingTaskId({ asInternalUser: es }); + if (taskId) { + throw new Error('Waiting for reindexing task to complete'); + } + }, + { retries: 10, factor: 1, minTimeout: 500 } + ); +} diff --git a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/utils/time.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/utils/time.ts new file mode 100644 index 0000000000000..d91b60d9f991a --- /dev/null +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/utils/time.ts @@ -0,0 +1,20 @@ +/* + * 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. + */ + +import { duration, unitOfTime } from 'moment'; + +export function durationAsMs(value: number, unit: unitOfTime.DurationConstructor) { + return duration(value, unit).asMilliseconds(); +} + +export function dateAsTimestamp(value: string) { + return new Date(value).getTime(); +} + +export function sleep(value: number) { + return new Promise((resolve) => setTimeout(resolve, value)); +} diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/burn_rate/burn_rate_rule.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/burn_rate/burn_rate_rule.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/burn_rate/burn_rate_rule.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/burn_rate/burn_rate_rule.ts index f77ad2808cdfd..a7848409e8b1f 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/burn_rate/burn_rate_rule.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/burn_rate/burn_rate_rule.ts @@ -8,7 +8,7 @@ import { v4 as uuidv4 } from 'uuid'; import { cleanup, Dataset, generate, PartialConfig } from '@kbn/data-forge'; import { RoleCredentials, InternalRequestHeader } from '@kbn/ftr-common-functional-services'; import expect from '@kbn/expect'; -import { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; const RULE_TYPE_ID = 'slo.rules.burnRate'; const DATA_VIEW = 'kbn-data-forge-fake_hosts.fake_hosts-*'; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/burn_rate/consumers_and_privileges.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/burn_rate/consumers_and_privileges.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/burn_rate/consumers_and_privileges.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/burn_rate/consumers_and_privileges.ts index 32da9cae6cdef..8c84d20759de3 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/burn_rate/consumers_and_privileges.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/burn_rate/consumers_and_privileges.ts @@ -8,7 +8,7 @@ import { v4 as uuidv4 } from 'uuid'; import { cleanup, Dataset, generate, PartialConfig } from '@kbn/data-forge'; import { RoleCredentials, InternalRequestHeader } from '@kbn/ftr-common-functional-services'; import expect from '@kbn/expect'; -import { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; const RULE_TYPE_ID = 'slo.rules.burnRate'; const DATA_VIEW = 'kbn-data-forge-fake_hosts.fake_hosts-*'; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/burn_rate/index.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/burn_rate/index.ts similarity index 86% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/burn_rate/index.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/burn_rate/index.ts index f64ac241a5261..fce18bf1b37f6 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/burn_rate/index.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/burn_rate/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) { describe('SLO Burn rate rule', () => { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/custom_threshold/avg_pct_fired.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/custom_threshold/avg_pct_fired.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/custom_threshold/avg_pct_fired.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/custom_threshold/avg_pct_fired.ts index f8f4a8a7df66b..0658f6f127084 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/custom_threshold/avg_pct_fired.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/custom_threshold/avg_pct_fired.ts @@ -15,7 +15,7 @@ import { parseSearchParams } from '@kbn/share-plugin/common/url_service'; import { COMPARATORS } from '@kbn/alerting-comparators'; import { kbnTestConfig } from '@kbn/test'; import type { InternalRequestHeader, RoleCredentials } from '@kbn/ftr-common-functional-services'; -import { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { ISO_DATE_REGEX } from './constants'; import { ActionDocument, LogsExplorerLocatorParsedParams } from './types'; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/custom_threshold/avg_pct_no_data.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/custom_threshold/avg_pct_no_data.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/custom_threshold/avg_pct_no_data.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/custom_threshold/avg_pct_no_data.ts index f439bb2fedca9..419d95fbe751b 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/custom_threshold/avg_pct_no_data.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/custom_threshold/avg_pct_no_data.ts @@ -14,7 +14,7 @@ import { parseSearchParams } from '@kbn/share-plugin/common/url_service'; import { COMPARATORS } from '@kbn/alerting-comparators'; import { kbnTestConfig } from '@kbn/test'; import type { InternalRequestHeader, RoleCredentials } from '@kbn/ftr-common-functional-services'; -import { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { ISO_DATE_REGEX } from './constants'; import { ActionDocument, LogsExplorerLocatorParsedParams } from './types'; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/custom_threshold/avg_ticks_fired.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/custom_threshold/avg_ticks_fired.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/custom_threshold/avg_ticks_fired.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/custom_threshold/avg_ticks_fired.ts index 852363b0d8593..a4161c1349376 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/custom_threshold/avg_ticks_fired.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/custom_threshold/avg_ticks_fired.ts @@ -15,7 +15,7 @@ import { OBSERVABILITY_THRESHOLD_RULE_TYPE_ID } from '@kbn/rule-data-utils'; import { parseSearchParams } from '@kbn/share-plugin/common/url_service'; import { kbnTestConfig } from '@kbn/test'; import type { InternalRequestHeader, RoleCredentials } from '@kbn/ftr-common-functional-services'; -import { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { ISO_DATE_REGEX } from './constants'; import { ActionDocument, LogsExplorerLocatorParsedParams } from './types'; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/custom_threshold/cardinality_runtime_field_fired.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/custom_threshold/cardinality_runtime_field_fired.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/custom_threshold/cardinality_runtime_field_fired.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/custom_threshold/cardinality_runtime_field_fired.ts index adffe171c4b37..fc45f0c43a3ee 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/custom_threshold/cardinality_runtime_field_fired.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/custom_threshold/cardinality_runtime_field_fired.ts @@ -15,7 +15,7 @@ import { parseSearchParams } from '@kbn/share-plugin/common/url_service'; import { COMPARATORS } from '@kbn/alerting-comparators'; import { kbnTestConfig } from '@kbn/test'; import type { InternalRequestHeader, RoleCredentials } from '@kbn/ftr-common-functional-services'; -import { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { ISO_DATE_REGEX } from './constants'; import { ActionDocument, LogsExplorerLocatorParsedParams } from './types'; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/custom_threshold/constants.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/custom_threshold/constants.ts similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/custom_threshold/constants.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/custom_threshold/constants.ts diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/custom_threshold/consumers_and_privileges.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/custom_threshold/consumers_and_privileges.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/custom_threshold/consumers_and_privileges.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/custom_threshold/consumers_and_privileges.ts index df82d653f7c1c..b0ecd8dac5b30 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/custom_threshold/consumers_and_privileges.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/custom_threshold/consumers_and_privileges.ts @@ -11,7 +11,7 @@ import { Aggregators } from '@kbn/observability-plugin/common/custom_threshold_r import { OBSERVABILITY_THRESHOLD_RULE_TYPE_ID } from '@kbn/rule-data-utils'; import { COMPARATORS } from '@kbn/alerting-comparators'; import type { InternalRequestHeader, RoleCredentials } from '@kbn/ftr-common-functional-services'; -import { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export default function ({ getService }: DeploymentAgnosticFtrProviderContext) { const esClient = getService('es'); diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/custom_threshold/custom_eq_avg_bytes_fired.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/custom_threshold/custom_eq_avg_bytes_fired.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/custom_threshold/custom_eq_avg_bytes_fired.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/custom_threshold/custom_eq_avg_bytes_fired.ts index 5eb9f4cc21738..ffa4badeb558d 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/custom_threshold/custom_eq_avg_bytes_fired.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/custom_threshold/custom_eq_avg_bytes_fired.ts @@ -19,7 +19,7 @@ import { FIRED_ACTIONS_ID } from '@kbn/observability-plugin/server/lib/rules/cus import { OBSERVABILITY_THRESHOLD_RULE_TYPE_ID } from '@kbn/rule-data-utils'; import { kbnTestConfig } from '@kbn/test'; import type { InternalRequestHeader, RoleCredentials } from '@kbn/ftr-common-functional-services'; -import { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { ActionDocument } from './types'; export default function ({ getService }: DeploymentAgnosticFtrProviderContext) { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/custom_threshold/documents_count_fired.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/custom_threshold/documents_count_fired.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/custom_threshold/documents_count_fired.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/custom_threshold/documents_count_fired.ts index 97451b1930afc..f3cee7b28474d 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/custom_threshold/documents_count_fired.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/custom_threshold/documents_count_fired.ts @@ -15,7 +15,7 @@ import { parseSearchParams } from '@kbn/share-plugin/common/url_service'; import { COMPARATORS } from '@kbn/alerting-comparators'; import { kbnTestConfig } from '@kbn/test'; import type { InternalRequestHeader, RoleCredentials } from '@kbn/ftr-common-functional-services'; -import { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { ISO_DATE_REGEX } from './constants'; import { ActionDocument, LogsExplorerLocatorParsedParams } from './types'; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/custom_threshold/group_by_fired.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/custom_threshold/group_by_fired.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/custom_threshold/group_by_fired.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/custom_threshold/group_by_fired.ts index 6fd6ce4a9a58b..9b062c092166c 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/custom_threshold/group_by_fired.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/custom_threshold/group_by_fired.ts @@ -19,7 +19,7 @@ import { FIRED_ACTIONS_ID } from '@kbn/observability-plugin/server/lib/rules/cus import { OBSERVABILITY_THRESHOLD_RULE_TYPE_ID } from '@kbn/rule-data-utils'; import { COMPARATORS } from '@kbn/alerting-comparators'; import type { InternalRequestHeader, RoleCredentials } from '@kbn/ftr-common-functional-services'; -import { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { ActionDocument } from './types'; export default function ({ getService }: DeploymentAgnosticFtrProviderContext) { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/custom_threshold/helpers/syntrace.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/custom_threshold/helpers/syntrace.ts similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/custom_threshold/helpers/syntrace.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/custom_threshold/helpers/syntrace.ts diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/custom_threshold/index.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/custom_threshold/index.ts similarity index 92% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/custom_threshold/index.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/custom_threshold/index.ts index b8dbf335485c2..cbc01055ce6b7 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/custom_threshold/index.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/custom_threshold/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) { describe('Custom Threshold rule', () => { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/custom_threshold/p99_pct_fired.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/custom_threshold/p99_pct_fired.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/custom_threshold/p99_pct_fired.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/custom_threshold/p99_pct_fired.ts index 5d6cfb49f86f0..fbda3d520edf3 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/custom_threshold/p99_pct_fired.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/custom_threshold/p99_pct_fired.ts @@ -15,7 +15,7 @@ import { parseSearchParams } from '@kbn/share-plugin/common/url_service'; import { COMPARATORS } from '@kbn/alerting-comparators'; import { kbnTestConfig } from '@kbn/test'; import type { InternalRequestHeader, RoleCredentials } from '@kbn/ftr-common-functional-services'; -import { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { ISO_DATE_REGEX } from './constants'; import { ActionDocument, LogsExplorerLocatorParsedParams } from './types'; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/custom_threshold/rate_bytes_fired.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/custom_threshold/rate_bytes_fired.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/custom_threshold/rate_bytes_fired.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/custom_threshold/rate_bytes_fired.ts index a39a86661a2a3..181f2c07e91e0 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/custom_threshold/rate_bytes_fired.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/custom_threshold/rate_bytes_fired.ts @@ -13,7 +13,7 @@ import { COMPARATORS } from '@kbn/alerting-comparators'; import { FIRED_ACTIONS_ID } from '@kbn/observability-plugin/server/lib/rules/custom_threshold/constants'; import { OBSERVABILITY_THRESHOLD_RULE_TYPE_ID } from '@kbn/rule-data-utils'; import { kbnTestConfig } from '@kbn/test'; -import { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { ActionDocument } from './types'; export default function ({ getService }: DeploymentAgnosticFtrProviderContext) { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/custom_threshold/types.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/custom_threshold/types.ts similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/custom_threshold/types.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/custom_threshold/types.ts diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/es_query/consumers_and_privileges.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/es_query/consumers_and_privileges.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/es_query/consumers_and_privileges.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/es_query/consumers_and_privileges.ts index e09f866ec602d..1e144d6ede64b 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/es_query/consumers_and_privileges.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/es_query/consumers_and_privileges.ts @@ -7,7 +7,7 @@ import expect from '@kbn/expect'; import { RoleCredentials, InternalRequestHeader } from '@kbn/ftr-common-functional-services'; -import { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; const RULE_TYPE_ID = '.es-query'; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/es_query/index.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/es_query/index.ts similarity index 88% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/es_query/index.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/es_query/index.ts index a4974278d91b9..3154951580dc0 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/es_query/index.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/es_query/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) { describe('ElasticSearch query rule', () => { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/es_query/query_dsl.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/es_query/query_dsl.ts similarity index 98% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/es_query/query_dsl.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/es_query/query_dsl.ts index 58d082497faef..ad7a8d0ffeffe 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/es_query/query_dsl.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/es_query/query_dsl.ts @@ -7,7 +7,7 @@ import expect from '@kbn/expect'; import { RoleCredentials, InternalRequestHeader } from '@kbn/ftr-common-functional-services'; -import { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export default function ({ getService }: DeploymentAgnosticFtrProviderContext) { const esClient = getService('es'); diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/es_query/query_dsl_with_group_by.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/es_query/query_dsl_with_group_by.ts similarity index 98% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/es_query/query_dsl_with_group_by.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/es_query/query_dsl_with_group_by.ts index 1ac679da7a708..29ccc5c2f87b6 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/es_query/query_dsl_with_group_by.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/es_query/query_dsl_with_group_by.ts @@ -8,7 +8,7 @@ import expect from '@kbn/expect'; import { cleanup, generate, Dataset, PartialConfig } from '@kbn/data-forge'; import { RoleCredentials, InternalRequestHeader } from '@kbn/ftr-common-functional-services'; -import { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { ActionDocument } from './types'; export default function ({ getService }: DeploymentAgnosticFtrProviderContext) { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/es_query/types.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/es_query/types.ts similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/es_query/types.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/es_query/types.ts diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/index.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/index.ts similarity index 86% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/index.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/index.ts index 6455d07e28f9f..1154e0fd82723 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/index.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) { describe('Observability Alerting', () => { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/synthetics/alert_on_no_data.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/synthetics/alert_on_no_data.ts similarity index 97% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/synthetics/alert_on_no_data.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/synthetics/alert_on_no_data.ts index 93aa6e2945a36..3cb9b6703d8ef 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/synthetics/alert_on_no_data.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/synthetics/alert_on_no_data.ts @@ -7,9 +7,9 @@ import expect from '@kbn/expect'; import moment from 'moment'; import { SYNTHETICS_API_URLS } from '@kbn/synthetics-plugin/common/constants'; -import { waitForDocumentInIndex } from '../../../../../../common/utils/observability/alerting_wait_for_helpers'; -import { RoleCredentials, SupertestWithRoleScopeType } from '../../../../services'; -import { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import { waitForDocumentInIndex } from '../../../../alerting_api_integration/observability/helpers/alerting_wait_for_helpers'; +import { RoleCredentials, SupertestWithRoleScopeType } from '../../../services'; +import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { SyntheticsRuleHelper, SYNTHETICS_ALERT_ACTION_INDEX, diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/synthetics/custom_status_rule.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/synthetics/custom_status_rule.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/synthetics/custom_status_rule.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/synthetics/custom_status_rule.ts index 2dc4c767d92d1..ae3a8d6e63373 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/synthetics/custom_status_rule.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/synthetics/custom_status_rule.ts @@ -8,9 +8,9 @@ import expect from '@kbn/expect'; import moment from 'moment-timezone'; import { SYNTHETICS_API_URLS } from '@kbn/synthetics-plugin/common/constants'; import type { SyntheticsMonitorStatusRuleParams as StatusRuleParams } from '@kbn/response-ops-rule-params/synthetics_monitor_status'; -import { waitForDocumentInIndex } from '../../../../../../common/utils/observability/alerting_wait_for_helpers'; -import { RoleCredentials, SupertestWithRoleScopeType } from '../../../../services'; -import { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import { waitForDocumentInIndex } from '../../../../alerting_api_integration/observability/helpers/alerting_wait_for_helpers'; +import { RoleCredentials, SupertestWithRoleScopeType } from '../../../services'; +import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { SyntheticsRuleHelper, SYNTHETICS_ALERT_ACTION_INDEX, diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/synthetics/data.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/synthetics/data.ts similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/synthetics/data.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/synthetics/data.ts diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/synthetics/synthetics_default_rule.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/synthetics/synthetics_default_rule.ts similarity index 97% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/synthetics/synthetics_default_rule.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/synthetics/synthetics_default_rule.ts index 3f803b8280ac7..55e52f455fd30 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/synthetics/synthetics_default_rule.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/synthetics/synthetics_default_rule.ts @@ -9,8 +9,8 @@ import expect from '@kbn/expect'; import { SYNTHETICS_API_URLS } from '@kbn/synthetics-plugin/common/constants'; import type { SanitizedRule } from '@kbn/alerting-plugin/common'; import { omit } from 'lodash'; -import { SupertestWithRoleScopeType } from '../../../../services'; -import { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import { SupertestWithRoleScopeType } from '../../../services'; +import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { statusRule, tlsRule } from './data'; export default function ({ getService }: DeploymentAgnosticFtrProviderContext) { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/synthetics/synthetics_rule_helper.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/synthetics/synthetics_rule_helper.ts similarity index 98% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/synthetics/synthetics_rule_helper.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/synthetics/synthetics_rule_helper.ts index ff067ede16a69..6604a939e57d8 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/synthetics/synthetics_rule_helper.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/alerting/synthetics/synthetics_rule_helper.ts @@ -16,8 +16,8 @@ import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/type import { SYNTHETICS_API_URLS } from '@kbn/synthetics-plugin/common/constants'; import expect from '@kbn/expect'; import { SupertestWithRoleScope } from '@kbn/test-suites-xpack-platform/api_integration_deployment_agnostic/services/role_scoped_supertest'; -import { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; -import { AlertingApiProvider } from '../../../../services/alerting_api'; +import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { AlertingApiProvider } from '../../../services/alerting_api'; export const SYNTHETICS_ALERT_ACTION_INDEX = 'alert-action-synthetics'; export const SYNTHETICS_DOCS_INDEX = 'synthetics-http-default'; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/agent_explorer/agent_explorer.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/agent_explorer/agent_explorer.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/agent_explorer/agent_explorer.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/agent_explorer/agent_explorer.spec.ts index 28471d2055926..b86c8633ec20c 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/agent_explorer/agent_explorer.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/agent_explorer/agent_explorer.spec.ts @@ -10,7 +10,7 @@ import { APIClientRequestParamsOf } from '@kbn/apm-plugin/public/services/rest/c import { RecursivePartial } from '@kbn/apm-plugin/typings/common'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; import { keyBy } from 'lodash'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) { const apmApiClient = getService('apmApi'); diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/agent_explorer/index.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/agent_explorer/index.ts similarity index 95% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/agent_explorer/index.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/agent_explorer/index.ts index ae05cb6b89cbe..7931760fbdaf6 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/agent_explorer/index.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/agent_explorer/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) { describe('agent_explorer', () => { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/agent_explorer/latest_agent_versions.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/agent_explorer/latest_agent_versions.spec.ts similarity index 98% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/agent_explorer/latest_agent_versions.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/agent_explorer/latest_agent_versions.spec.ts index aa099ca66d23b..e8c207673d0ee 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/agent_explorer/latest_agent_versions.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/agent_explorer/latest_agent_versions.spec.ts @@ -6,7 +6,7 @@ */ import { ElasticApmAgentLatestVersion } from '@kbn/apm-plugin/common/agent_explorer'; import expect from '@kbn/expect'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) { const apmApiClient = getService('apmApi'); diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/alerts/error_count_threshold.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/alerts/error_count_threshold.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/alerts/error_count_threshold.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/alerts/error_count_threshold.spec.ts index d72f0c8c82b9e..1279b8ed89519 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/alerts/error_count_threshold.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/alerts/error_count_threshold.spec.ts @@ -11,8 +11,8 @@ import { apm, timerange } from '@kbn/apm-synthtrace-client'; import expect from '@kbn/expect'; import { omit } from 'lodash'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; -import type { RoleCredentials } from '../../../../services'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { RoleCredentials } from '../../../services'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { fetchServiceInventoryAlertCounts, fetchServiceTabAlertCount, diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/alerts/generate_data.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/alerts/generate_data.ts similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/alerts/generate_data.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/alerts/generate_data.ts diff --git a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/alerts/helpers/alerting_helper.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/alerts/helpers/alerting_helper.ts new file mode 100644 index 0000000000000..0ba09db2aa429 --- /dev/null +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/alerts/helpers/alerting_helper.ts @@ -0,0 +1,96 @@ +/* + * 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. + */ + +import { ParsedTechnicalFields } from '@kbn/rule-registry-plugin/common'; +import { ApmDocumentType } from '@kbn/apm-plugin/common/document_type'; +import { RollupInterval } from '@kbn/apm-plugin/common/rollup'; +import { ObservabilityApmAlert } from '@kbn/alerts-as-data-utils'; +import type { ApmApiClient } from '../../../../services/apm_api'; + +export const APM_ALERTS_INDEX = '.alerts-observability.apm.alerts-*'; +export const APM_ACTION_VARIABLE_INDEX = 'apm-index-connector-test'; + +function getTimerange() { + return { + start: new Date(Date.now() - 24 * 60 * 60 * 1000).toISOString(), + end: new Date(Date.now() + 5 * 60 * 1000).toISOString(), + }; +} + +export async function fetchServiceInventoryAlertCounts(apmApiClient: ApmApiClient) { + const timerange = getTimerange(); + const serviceInventoryResponse = await apmApiClient.readUser({ + endpoint: 'GET /internal/apm/services', + params: { + query: { + ...timerange, + environment: 'ENVIRONMENT_ALL', + kuery: '', + probability: 1, + documentType: ApmDocumentType.ServiceTransactionMetric, + rollupInterval: RollupInterval.SixtyMinutes, + useDurationSummary: true, + }, + }, + }); + + return serviceInventoryResponse.body.items.reduce>((acc, item) => { + return { ...acc, [item.serviceName]: item.alertsCount ?? 0 }; + }, {}); +} + +export async function fetchServiceTabAlertCount({ + apmApiClient, + serviceName, +}: { + apmApiClient: ApmApiClient; + serviceName: string; +}) { + const timerange = getTimerange(); + const alertsCountReponse = await apmApiClient.readUser({ + endpoint: 'GET /internal/apm/services/{serviceName}/alerts_count', + params: { + path: { + serviceName, + }, + query: { + ...timerange, + environment: 'ENVIRONMENT_ALL', + }, + }, + }); + + return alertsCountReponse.body.alertsCount; +} + +export function getIndexAction({ + actionId, + actionVariables, +}: { + actionId: string; + actionVariables: Array<{ name: string }>; +}) { + return { + group: 'threshold_met', + id: actionId, + params: { + documents: [ + actionVariables.reduce>((acc, actionVariable) => { + acc[actionVariable.name] = `{{context.${actionVariable.name}}}`; + return acc; + }, {}), + ], + }, + frequency: { + notify_when: 'onActionGroupChange', + throttle: null, + summary: false, + }, + }; +} + +export type ApmAlertFields = ParsedTechnicalFields & ObservabilityApmAlert; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/alerts/index.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/alerts/index.ts similarity index 96% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/alerts/index.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/alerts/index.ts index 3796b4253e60e..c0236978d8d89 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/alerts/index.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/alerts/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) { describe('alerts', () => { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/alerts/preview_chart_error_count.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/alerts/preview_chart_error_count.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/alerts/preview_chart_error_count.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/alerts/preview_chart_error_count.spec.ts index 38bf9d4eade4d..0a2366c439aff 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/alerts/preview_chart_error_count.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/alerts/preview_chart_error_count.spec.ts @@ -14,7 +14,7 @@ import { SERVICE_NAME, } from '@kbn/observability-shared-plugin/common'; import { generateLongIdWithSeed } from '@kbn/apm-synthtrace-client/src/lib/utils/generate_id'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { generateErrorData } from './generate_data'; export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/alerts/preview_chart_error_rate.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/alerts/preview_chart_error_rate.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/alerts/preview_chart_error_rate.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/alerts/preview_chart_error_rate.spec.ts index 167b114e755c3..fa49e4e943be3 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/alerts/preview_chart_error_rate.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/alerts/preview_chart_error_rate.spec.ts @@ -14,7 +14,7 @@ import { import type { PreviewChartResponseItem } from '@kbn/apm-plugin/server/routes/alerts/route'; import expect from '@kbn/expect'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { generateErrorData } from './generate_data'; export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/alerts/preview_chart_transaction_duration.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/alerts/preview_chart_transaction_duration.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/alerts/preview_chart_transaction_duration.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/alerts/preview_chart_transaction_duration.spec.ts index af7f83c393a68..efd03aa1f440d 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/alerts/preview_chart_transaction_duration.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/alerts/preview_chart_transaction_duration.spec.ts @@ -14,7 +14,7 @@ import { import type { PreviewChartResponseItem } from '@kbn/apm-plugin/server/routes/alerts/route'; import expect from '@kbn/expect'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { generateLatencyData } from './generate_data'; export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/alerts/transaction_duration.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/alerts/transaction_duration.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/alerts/transaction_duration.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/alerts/transaction_duration.spec.ts index cd78b76ea0d6d..a58e4a292a3e3 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/alerts/transaction_duration.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/alerts/transaction_duration.spec.ts @@ -12,8 +12,8 @@ import { apm, timerange } from '@kbn/apm-synthtrace-client'; import expect from '@kbn/expect'; import { omit } from 'lodash'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; -import type { RoleCredentials } from '../../../../services'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { RoleCredentials } from '../../../services'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { fetchServiceInventoryAlertCounts, fetchServiceTabAlertCount, diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/alerts/transaction_error_rate.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/alerts/transaction_error_rate.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/alerts/transaction_error_rate.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/alerts/transaction_error_rate.spec.ts index 23273a8648989..c40e46bf3803a 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/alerts/transaction_error_rate.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/alerts/transaction_error_rate.spec.ts @@ -11,8 +11,8 @@ import { apm, timerange } from '@kbn/apm-synthtrace-client'; import expect from '@kbn/expect'; import { omit } from 'lodash'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; -import type { RoleCredentials } from '../../../../services'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { RoleCredentials } from '../../../services'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { fetchServiceInventoryAlertCounts, fetchServiceTabAlertCount, diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/cold_start/cold_start.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/cold_start/cold_start.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/cold_start/cold_start.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/cold_start/cold_start.spec.ts index 0e2c89aa4336b..4ea7c89ad0590 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/cold_start/cold_start.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/cold_start/cold_start.spec.ts @@ -15,7 +15,7 @@ import { } from '@kbn/apm-plugin/public/services/rest/create_call_apm_api'; import { RecursivePartial } from '@kbn/apm-plugin/typings/common'; import { isFiniteNumber } from '@kbn/apm-plugin/common/utils/is_finite_number'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; type ColdStartRate = APIReturnType<'GET /internal/apm/services/{serviceName}/transactions/charts/coldstart_rate'>; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/cold_start/cold_start_by_transaction_name.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/cold_start/cold_start_by_transaction_name.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/cold_start/cold_start_by_transaction_name.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/cold_start/cold_start_by_transaction_name.spec.ts index a2aa3a7d11546..69df41d4106ff 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/cold_start/cold_start_by_transaction_name.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/cold_start/cold_start_by_transaction_name.spec.ts @@ -15,7 +15,7 @@ import { } from '@kbn/apm-plugin/public/services/rest/create_call_apm_api'; import { RecursivePartial } from '@kbn/apm-plugin/typings/common'; import { isFiniteNumber } from '@kbn/apm-plugin/common/utils/is_finite_number'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; type ColdStartRate = APIReturnType<'GET /internal/apm/services/{serviceName}/transactions/charts/coldstart_rate_by_transaction_name'>; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/cold_start/index.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/cold_start/index.ts similarity index 95% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/cold_start/index.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/cold_start/index.ts index 108340514a0c2..277ad81100d26 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/cold_start/index.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/cold_start/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) { describe('cold_start', () => { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/constants/archiver.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/constants/archiver.ts similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/constants/archiver.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/constants/archiver.ts diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/constants/archives_metadata.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/constants/archives_metadata.ts similarity index 71% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/constants/archives_metadata.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/constants/archives_metadata.ts index 37a5dc2aa9a6f..d6d5bf710552e 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/constants/archives_metadata.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/constants/archives_metadata.ts @@ -5,6 +5,6 @@ * 2.0. */ -import archivesMetadata from '../../../../../../apm_api_integration/common/fixtures/es_archiver/archives_metadata'; +import archivesMetadata from '../../../../apm_api_integration/common/fixtures/es_archiver/archives_metadata'; export default archivesMetadata; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/correlations/failed_transactions.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/correlations/failed_transactions.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/correlations/failed_transactions.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/correlations/failed_transactions.spec.ts index 549f48009197f..5d4409330b2b7 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/correlations/failed_transactions.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/correlations/failed_transactions.spec.ts @@ -11,7 +11,7 @@ import type { FailedTransactionsCorrelationsResponse } from '@kbn/apm-plugin/com import { EVENT_OUTCOME } from '@kbn/apm-plugin/common/es_fields/apm'; import { EventOutcome } from '@kbn/apm-plugin/common/event_outcome'; import { LatencyDistributionChartType } from '@kbn/apm-plugin/common/latency_distribution_chart_types'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { ARCHIVER_ROUTES } from '../constants/archiver'; // These tests go through the full sequence of queries required diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/correlations/field_candidates.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/correlations/field_candidates.spec.ts similarity index 98% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/correlations/field_candidates.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/correlations/field_candidates.spec.ts index 8db9a7df05fd3..13e6c5a888666 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/correlations/field_candidates.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/correlations/field_candidates.spec.ts @@ -6,7 +6,7 @@ */ import expect from '@kbn/expect'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { ARCHIVER_ROUTES } from '../constants/archiver'; export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/correlations/field_value_pairs.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/correlations/field_value_pairs.spec.ts similarity index 98% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/correlations/field_value_pairs.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/correlations/field_value_pairs.spec.ts index 9fcd438421b6a..51d870d8cb2b8 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/correlations/field_value_pairs.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/correlations/field_value_pairs.spec.ts @@ -6,7 +6,7 @@ */ import expect from '@kbn/expect'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { ARCHIVER_ROUTES } from '../constants/archiver'; export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/correlations/index.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/correlations/index.ts similarity index 96% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/correlations/index.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/correlations/index.ts index ffa54dbe7bb5c..9bd5b2be53741 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/correlations/index.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/correlations/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) { describe('correlations', () => { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/correlations/latency.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/correlations/latency.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/correlations/latency.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/correlations/latency.spec.ts index e0080806f6a0e..4f22abd427b2c 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/correlations/latency.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/correlations/latency.spec.ts @@ -14,7 +14,7 @@ import type { LatencyCorrelationsResponse, } from '@kbn/apm-plugin/common/correlations/latency_correlations/types'; import { LatencyDistributionChartType } from '@kbn/apm-plugin/common/latency_distribution_chart_types'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { ARCHIVER_ROUTES } from '../constants/archiver'; // These tests go through the full sequence of queries required diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/correlations/p_values.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/correlations/p_values.spec.ts similarity index 98% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/correlations/p_values.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/correlations/p_values.spec.ts index ba6e3384cec93..871d23259b987 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/correlations/p_values.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/correlations/p_values.spec.ts @@ -6,7 +6,7 @@ */ import expect from '@kbn/expect'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { ARCHIVER_ROUTES } from '../constants/archiver'; export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/correlations/significant_correlations.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/correlations/significant_correlations.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/correlations/significant_correlations.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/correlations/significant_correlations.spec.ts index e1f968d178868..77d7ee9fbe46c 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/correlations/significant_correlations.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/correlations/significant_correlations.spec.ts @@ -6,7 +6,7 @@ */ import expect from '@kbn/expect'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { ARCHIVER_ROUTES } from '../constants/archiver'; export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/custom_dashboards/api_helper.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/custom_dashboards/api_helper.ts similarity index 96% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/custom_dashboards/api_helper.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/custom_dashboards/api_helper.ts index 0c75efa8ad9b1..2edff41eea952 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/custom_dashboards/api_helper.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/custom_dashboards/api_helper.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ApmApiProvider } from '../../../../services/apm_api'; +import { ApmApiProvider } from '../../../services/apm_api'; export type ApmApiClient = ReturnType; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/custom_dashboards/custom_dashboards.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/custom_dashboards/custom_dashboards.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/custom_dashboards/custom_dashboards.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/custom_dashboards/custom_dashboards.spec.ts index 51013ff171bbd..5d763514c989f 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/custom_dashboards/custom_dashboards.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/custom_dashboards/custom_dashboards.spec.ts @@ -8,7 +8,7 @@ import expect from '@kbn/expect'; import { apm, timerange } from '@kbn/apm-synthtrace-client'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { getServiceDashboardApi, getLinkServiceDashboardApi, diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/custom_dashboards/index.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/custom_dashboards/index.ts similarity index 94% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/custom_dashboards/index.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/custom_dashboards/index.ts index a46024ff1ab10..5753c63e688e7 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/custom_dashboards/index.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/custom_dashboards/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) { describe('custom_dashboards', () => { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/data_view/index.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/data_view/index.ts similarity index 94% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/data_view/index.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/data_view/index.ts index c81b643e62638..85f131ef1792c 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/data_view/index.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/data_view/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) { describe('data_view', () => { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/data_view/static.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/data_view/static.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/data_view/static.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/data_view/static.spec.ts index f7cf8e97c59fd..53b1d0f5371a5 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/data_view/static.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/data_view/static.spec.ts @@ -16,8 +16,8 @@ import { SupertestWithRoleScope } from '@kbn/test-suites-xpack-platform/api_inte import { SupertestReturnType, ApmApiError, -} from '../../../../../../apm_api_integration/common/apm_api_supertest'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +} from '../../../../apm_api_integration/common/apm_api_supertest'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) { const apmApiClient = getService('apmApi'); diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/dependencies/dependency_metrics.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/dependencies/dependency_metrics.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/dependencies/dependency_metrics.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/dependencies/dependency_metrics.spec.ts index 2821807ef2c2c..c4db6a3a6263e 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/dependencies/dependency_metrics.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/dependencies/dependency_metrics.spec.ts @@ -10,8 +10,8 @@ import { isFiniteNumber } from '@kbn/apm-plugin/common/utils/is_finite_number'; import { Coordinate } from '@kbn/apm-plugin/typings/timeseries'; import { ENVIRONMENT_ALL } from '@kbn/apm-plugin/common/environment_filter_values'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; -import { SupertestReturnType } from '../../../../services/apm_api'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import { SupertestReturnType } from '../../../services/apm_api'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { roundNumber } from '../utils/common'; import { generateOperationData, generateOperationDataConfig } from './generate_operation_data'; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/dependencies/generate_data.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/dependencies/generate_data.ts similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/dependencies/generate_data.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/dependencies/generate_data.ts diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/dependencies/generate_operation_data.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/dependencies/generate_operation_data.ts similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/dependencies/generate_operation_data.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/dependencies/generate_operation_data.ts diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/dependencies/index.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/dependencies/index.ts similarity index 96% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/dependencies/index.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/dependencies/index.ts index 617f9bcae89b1..e6609391a8eeb 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/dependencies/index.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/dependencies/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) { describe('custom_dashboards', () => { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/dependencies/metadata.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/dependencies/metadata.spec.ts similarity index 98% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/dependencies/metadata.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/dependencies/metadata.spec.ts index 849cb15290589..68f94f17e7459 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/dependencies/metadata.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/dependencies/metadata.spec.ts @@ -6,7 +6,7 @@ */ import expect from '@kbn/expect'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { dataConfig, generateData } from './generate_data'; export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/dependencies/top_dependencies.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/dependencies/top_dependencies.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/dependencies/top_dependencies.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/dependencies/top_dependencies.spec.ts index 2c9da160d30e8..5decad51d792e 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/dependencies/top_dependencies.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/dependencies/top_dependencies.spec.ts @@ -8,7 +8,7 @@ import expect from '@kbn/expect'; import { APIReturnType } from '@kbn/apm-plugin/public/services/rest/create_call_apm_api'; import { NodeType, DependencyNode } from '@kbn/apm-plugin/common/connections'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { dataConfig, generateData } from './generate_data'; import { roundNumber } from '../utils/common'; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/dependencies/top_operations.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/dependencies/top_operations.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/dependencies/top_operations.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/dependencies/top_operations.spec.ts index 10863eca07cf8..08f23f771472d 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/dependencies/top_operations.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/dependencies/top_operations.spec.ts @@ -11,7 +11,7 @@ import { ValuesType } from 'utility-types'; import { DependencyOperation } from '@kbn/apm-plugin/server/routes/dependencies/get_top_dependency_operations'; import { meanBy } from 'lodash'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { roundNumber } from '../utils/common'; import { generateOperationData, generateOperationDataConfig } from './generate_operation_data'; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/dependencies/top_spans.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/dependencies/top_spans.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/dependencies/top_spans.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/dependencies/top_spans.spec.ts index fb571a704484f..491c3a52ca943 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/dependencies/top_spans.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/dependencies/top_spans.spec.ts @@ -9,7 +9,7 @@ import { ENVIRONMENT_ALL } from '@kbn/apm-plugin/common/environment_filter_value import { apm, timerange } from '@kbn/apm-synthtrace-client'; import { omit, uniq } from 'lodash'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) { const apmApiClient = getService('apmApi'); diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/dependencies/upstream_services.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/dependencies/upstream_services.spec.ts similarity index 98% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/dependencies/upstream_services.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/dependencies/upstream_services.spec.ts index 99e6da8f321d7..31ed1a7efe4ae 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/dependencies/upstream_services.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/dependencies/upstream_services.spec.ts @@ -7,7 +7,7 @@ import expect from '@kbn/expect'; import { ServiceNode } from '@kbn/apm-plugin/common/connections'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { generateData } from './generate_data'; export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/diagnostics/apm_events.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/diagnostics/apm_events.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/diagnostics/apm_events.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/diagnostics/apm_events.spec.ts index 4ca60e15fa190..d3784d277a38b 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/diagnostics/apm_events.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/diagnostics/apm_events.spec.ts @@ -10,7 +10,7 @@ import { apm, timerange } from '@kbn/apm-synthtrace-client'; import { APIReturnType } from '@kbn/apm-plugin/public/services/rest/create_call_apm_api'; import { sumBy } from 'lodash'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) { const apmApiClient = getService('apmApi'); diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/diagnostics/data_streams.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/diagnostics/data_streams.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/diagnostics/data_streams.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/diagnostics/data_streams.spec.ts index 1d37c668e91f5..3b75413e4f331 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/diagnostics/data_streams.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/diagnostics/data_streams.spec.ts @@ -8,7 +8,7 @@ import expect from '@kbn/expect'; import { apm, timerange } from '@kbn/apm-synthtrace-client'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) { const apmApiClient = getService('apmApi'); diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/diagnostics/index.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/diagnostics/index.ts similarity index 96% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/diagnostics/index.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/diagnostics/index.ts index 192771d3fc75e..37a688d8f3f37 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/diagnostics/index.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/diagnostics/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) { describe('diagnostics', () => { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/diagnostics/index_pattern_settings.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/diagnostics/index_pattern_settings.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/diagnostics/index_pattern_settings.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/diagnostics/index_pattern_settings.spec.ts index 8235e2a179d4c..a71a7f43be515 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/diagnostics/index_pattern_settings.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/diagnostics/index_pattern_settings.spec.ts @@ -9,7 +9,7 @@ import expect from '@kbn/expect'; import { apm, timerange } from '@kbn/apm-synthtrace-client'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; import { uniq } from 'lodash'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) { const apmApiClient = getService('apmApi'); diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/diagnostics/index_templates.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/diagnostics/index_templates.spec.ts similarity index 98% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/diagnostics/index_templates.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/diagnostics/index_templates.spec.ts index aa45a93a3ce73..c82b2b645fa3f 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/diagnostics/index_templates.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/diagnostics/index_templates.spec.ts @@ -8,7 +8,7 @@ import expect from '@kbn/expect'; import { apm, timerange } from '@kbn/apm-synthtrace-client'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) { const apmApiClient = getService('apmApi'); diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/diagnostics/indices.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/diagnostics/indices.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/diagnostics/indices.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/diagnostics/indices.spec.ts index af0249d2a3359..54c5ecb48380e 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/diagnostics/indices.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/diagnostics/indices.spec.ts @@ -9,7 +9,7 @@ import expect from '@kbn/expect'; import { apm, timerange } from '@kbn/apm-synthtrace-client'; import { omit } from 'lodash'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) { const apmApiClient = getService('apmApi'); diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/diagnostics/privileges.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/diagnostics/privileges.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/diagnostics/privileges.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/diagnostics/privileges.spec.ts index fa46ff08cc8ed..30674f36ba1ef 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/diagnostics/privileges.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/diagnostics/privileges.spec.ts @@ -7,7 +7,7 @@ import { APIReturnType } from '@kbn/apm-plugin/public/services/rest/create_call_apm_api'; import expect from '@kbn/expect'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) { const apmApiClient = getService('apmApi'); diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/environment/get_environment.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/environment/get_environment.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/environment/get_environment.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/environment/get_environment.spec.ts index bc3d95e42cadc..4113a23077f7a 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/environment/get_environment.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/environment/get_environment.spec.ts @@ -7,7 +7,7 @@ import expect from '@kbn/expect'; import { apm, timerange } from '@kbn/apm-synthtrace-client'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; async function generateData({ apmSynthtraceEsClient, diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/environment/index.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/environment/index.ts similarity index 94% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/environment/index.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/environment/index.ts index e48a8f88d74c4..aeaf24473467d 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/environment/index.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/environment/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) { describe('environment', () => { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/error_rate/index.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/error_rate/index.ts similarity index 94% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/error_rate/index.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/error_rate/index.ts index 04ed9b3be1ff0..86046b4573ce1 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/error_rate/index.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/error_rate/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) { describe('error_rate', () => { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/error_rate/service_apis.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/error_rate/service_apis.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/error_rate/service_apis.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/error_rate/service_apis.spec.ts index 6a8bca2eefaca..8beeaaa9a87cc 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/error_rate/service_apis.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/error_rate/service_apis.spec.ts @@ -13,7 +13,7 @@ import { isFiniteNumber } from '@kbn/apm-plugin/common/utils/is_finite_number'; import { ApmDocumentType } from '@kbn/apm-plugin/common/document_type'; import { RollupInterval } from '@kbn/apm-plugin/common/rollup'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; const GO_PROD_LIST_RATE = 75; const GO_PROD_LIST_ERROR_RATE = 25; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/error_rate/service_maps.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/error_rate/service_maps.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/error_rate/service_maps.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/error_rate/service_maps.spec.ts index c45f3fd9457d8..20147584b3c3a 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/error_rate/service_maps.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/error_rate/service_maps.spec.ts @@ -11,7 +11,7 @@ import { meanBy } from 'lodash'; import { ApmDocumentType } from '@kbn/apm-plugin/common/document_type'; import { RollupInterval } from '@kbn/apm-plugin/common/rollup'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; const GO_PROD_LIST_RATE = 75; const GO_PROD_LIST_ERROR_RATE = 25; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/errors/distribution.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/errors/distribution.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/errors/distribution.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/errors/distribution.spec.ts index 3c80c8df83018..19a9815671925 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/errors/distribution.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/errors/distribution.spec.ts @@ -13,7 +13,7 @@ import { import type { RecursivePartial } from '@kbn/apm-plugin/typings/common'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client'; import { config, generateData } from './generate_data'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { isFiniteNumber } from '../utils/common'; type ErrorsDistribution = diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/errors/error_group_list.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/errors/error_group_list.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/errors/error_group_list.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/errors/error_group_list.spec.ts index c99cbfd3df280..2a185c1e3c4d6 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/errors/error_group_list.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/errors/error_group_list.spec.ts @@ -12,7 +12,7 @@ import type { } from '@kbn/apm-plugin/public/services/rest/create_call_apm_api'; import type { RecursivePartial } from '@kbn/apm-plugin/typings/common'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; type ErrorGroups = APIReturnType<'GET /internal/apm/services/{serviceName}/errors/groups/main_statistics'>['errorGroups']; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/errors/generate_data.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/errors/generate_data.ts similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/errors/generate_data.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/errors/generate_data.ts diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/errors/group_id_samples.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/errors/group_id_samples.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/errors/group_id_samples.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/errors/group_id_samples.spec.ts index 764a5a9bcb4b1..bfbecd45e9a00 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/errors/group_id_samples.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/errors/group_id_samples.spec.ts @@ -10,7 +10,7 @@ import { service } from '@kbn/apm-synthtrace-client/src/lib/apm/service'; import { orderBy } from 'lodash'; import type { APIReturnType } from '@kbn/apm-plugin/public/services/rest/create_call_apm_api'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { config, generateData } from './generate_data'; type ErrorGroupSamples = diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/errors/index.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/errors/index.ts similarity index 89% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/errors/index.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/errors/index.ts index 4061edd217462..e1cafbd13f6f9 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/errors/index.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/errors/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) { describe('errors', () => { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/errors/top_erroneous_transactions/generate_data.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/errors/top_erroneous_transactions/generate_data.ts similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/errors/top_erroneous_transactions/generate_data.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/errors/top_erroneous_transactions/generate_data.ts diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/errors/top_erroneous_transactions/top_erroneous_transactions.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/errors/top_erroneous_transactions/top_erroneous_transactions.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/errors/top_erroneous_transactions/top_erroneous_transactions.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/errors/top_erroneous_transactions/top_erroneous_transactions.spec.ts index 1fb3cdadd8f67..26bc6bacaba6d 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/errors/top_erroneous_transactions/top_erroneous_transactions.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/errors/top_erroneous_transactions/top_erroneous_transactions.spec.ts @@ -12,7 +12,7 @@ import { import type { RecursivePartial } from '@kbn/apm-plugin/typings/common'; import { sumBy, first, last } from 'lodash'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; import { config, generateData } from './generate_data'; import { isFiniteNumber } from '../../utils/common'; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/errors/top_errors_for_transaction/generate_data.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/errors/top_errors_for_transaction/generate_data.ts similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/errors/top_errors_for_transaction/generate_data.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/errors/top_errors_for_transaction/generate_data.ts diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/errors/top_errors_for_transaction/top_errors_main_stats.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/errors/top_errors_for_transaction/top_errors_main_stats.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/errors/top_errors_for_transaction/top_errors_main_stats.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/errors/top_errors_for_transaction/top_errors_main_stats.spec.ts index 10088af2061d5..41e814477ce2a 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/errors/top_errors_for_transaction/top_errors_main_stats.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/errors/top_errors_for_transaction/top_errors_main_stats.spec.ts @@ -12,7 +12,7 @@ import type { import type { RecursivePartial } from '@kbn/apm-plugin/typings/common'; import moment from 'moment'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; import { config, generateData } from './generate_data'; type ErrorGroups = diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/historical_data/has_data.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/historical_data/has_data.spec.ts similarity index 98% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/historical_data/has_data.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/historical_data/has_data.spec.ts index b6eaca65cad1c..8856d615acaab 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/historical_data/has_data.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/historical_data/has_data.spec.ts @@ -9,7 +9,7 @@ import expect from '@kbn/expect'; import { apm, timerange } from '@kbn/apm-synthtrace-client'; import moment from 'moment'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) { const apmApiClient = getService('apmApi'); diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/historical_data/index.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/historical_data/index.ts similarity index 94% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/historical_data/index.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/historical_data/index.ts index 0b9c76d21d3b4..7fdb997e9c913 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/historical_data/index.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/historical_data/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) { describe('historical_data', () => { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/index.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/index.ts similarity index 98% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/index.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/index.ts index 3029b96598516..7246d5b9dcc4a 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/index.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; export default function apmApiIntegrationTests({ loadTestFile, diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/infrastructure/generate_data.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/infrastructure/generate_data.ts similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/infrastructure/generate_data.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/infrastructure/generate_data.ts diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/infrastructure/index.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/infrastructure/index.ts similarity index 94% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/infrastructure/index.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/infrastructure/index.ts index 3379e3f0fdc23..689bded614088 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/infrastructure/index.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/infrastructure/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) { describe('infrastructure', () => { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/infrastructure/infrastructure_attributes.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/infrastructure/infrastructure_attributes.spec.ts similarity index 98% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/infrastructure/infrastructure_attributes.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/infrastructure/infrastructure_attributes.spec.ts index fe9b0246c505b..7cc7bb608fbbb 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/infrastructure/infrastructure_attributes.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/infrastructure/infrastructure_attributes.spec.ts @@ -7,7 +7,7 @@ import expect from '@kbn/expect'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; import { generateData } from './generate_data'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) { const apmApiClient = getService('apmApi'); diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/onboarding/index.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/inspect/index.ts similarity index 83% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/onboarding/index.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/inspect/index.ts index ff8168725b926..d77eed7172c9a 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/onboarding/index.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/inspect/index.ts @@ -8,7 +8,7 @@ import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) { - describe('Onboarding', () => { - loadTestFile(require.resolve('./get_progress')); + describe('inspect', () => { + loadTestFile(require.resolve('./inspect.spec.ts')); }); } diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/inspect/inspect.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/inspect/inspect.spec.ts similarity index 97% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/inspect/inspect.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/inspect/inspect.spec.ts index b2f93635b79f0..9135e0f7a88af 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/inspect/inspect.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/inspect/inspect.spec.ts @@ -7,7 +7,7 @@ import expect from '@kbn/expect'; -import { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { ARCHIVER_ROUTES } from '../constants/archiver'; import archives_metadata from '../constants/archives_metadata'; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/latency/index.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/latency/index.ts similarity index 94% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/latency/index.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/latency/index.ts index 2ff9ec1896c78..4d528fc518dc8 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/latency/index.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/latency/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) { describe('latency', () => { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/latency/service_apis.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/latency/service_apis.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/latency/service_apis.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/latency/service_apis.spec.ts index 2219a873c0f2d..b6fa01e88e6f3 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/latency/service_apis.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/latency/service_apis.spec.ts @@ -13,7 +13,7 @@ import { ApmDocumentType } from '@kbn/apm-plugin/common/document_type'; import { RollupInterval } from '@kbn/apm-plugin/common/rollup'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) { const apmApiClient = getService('apmApi'); diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/latency/service_maps.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/latency/service_maps.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/latency/service_maps.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/latency/service_maps.spec.ts index e0bb69306a03f..5927f150510c2 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/latency/service_maps.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/latency/service_maps.spec.ts @@ -11,7 +11,7 @@ import { ApmDocumentType } from '@kbn/apm-plugin/common/document_type'; import { RollupInterval } from '@kbn/apm-plugin/common/rollup'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) { const apmApiClient = getService('apmApi'); diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/metrics/index.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/metrics/index.ts similarity index 90% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/metrics/index.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/metrics/index.ts index 454e3b16e9aad..3aaf3355f58d8 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/metrics/index.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/metrics/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) { describe('metrics', () => { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/metrics/memory/generate_data.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/metrics/memory/generate_data.ts similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/metrics/memory/generate_data.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/metrics/memory/generate_data.ts diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/metrics/memory/memory_metrics.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/metrics/memory/memory_metrics.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/metrics/memory/memory_metrics.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/metrics/memory/memory_metrics.spec.ts index 0bcfff6395fef..f831e0e0c497e 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/metrics/memory/memory_metrics.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/metrics/memory/memory_metrics.spec.ts @@ -8,7 +8,7 @@ import expect from '@kbn/expect'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; import { config, generateData } from './generate_data'; -import { DeploymentAgnosticFtrProviderContext } from '../../../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) { const apmApiClient = getService('apmApi'); diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/metrics/metrics_charts.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/metrics/metrics_charts.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/metrics/metrics_charts.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/metrics/metrics_charts.spec.ts index f801113fdf823..5cca55468c448 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/metrics/metrics_charts.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/metrics/metrics_charts.spec.ts @@ -8,9 +8,9 @@ import expect from '@kbn/expect'; import { first } from 'lodash'; import { GenericMetricsChart } from '@kbn/apm-plugin/server/routes/metrics/fetch_and_transform_metrics'; -import { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { ARCHIVER_ROUTES } from '../constants/archiver'; -import { SupertestReturnType } from '../../../../services/apm_api'; +import { SupertestReturnType } from '../../../services/apm_api'; type ChartResponse = SupertestReturnType<'GET /internal/apm/services/{serviceName}/metrics/charts'>; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/metrics/serverless/generate_data.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/metrics/serverless/generate_data.ts similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/metrics/serverless/generate_data.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/metrics/serverless/generate_data.ts diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/metrics/serverless/serverless_active_instances.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/metrics/serverless/serverless_active_instances.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/metrics/serverless/serverless_active_instances.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/metrics/serverless/serverless_active_instances.spec.ts index b490482b4dd52..1af8a46d49382 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/metrics/serverless/serverless_active_instances.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/metrics/serverless/serverless_active_instances.spec.ts @@ -10,7 +10,7 @@ import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; import expect from '@kbn/expect'; import { sumBy } from 'lodash'; import { config, expectedValues, generateData } from './generate_data'; -import { DeploymentAgnosticFtrProviderContext } from '../../../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) { const apmApiClient = getService('apmApi'); diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/metrics/serverless/serverless_functions_overview.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/metrics/serverless/serverless_functions_overview.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/metrics/serverless/serverless_functions_overview.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/metrics/serverless/serverless_functions_overview.spec.ts index 3acd0921d2602..94fc0ab964f47 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/metrics/serverless/serverless_functions_overview.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/metrics/serverless/serverless_functions_overview.spec.ts @@ -9,7 +9,7 @@ import { APIReturnType } from '@kbn/apm-plugin/public/services/rest/create_call_ import expect from '@kbn/expect'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; import { config, expectedValues, generateData } from './generate_data'; -import { DeploymentAgnosticFtrProviderContext } from '../../../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) { const apmApiClient = getService('apmApi'); diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/metrics/serverless/serverless_metrics_charts.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/metrics/serverless/serverless_metrics_charts.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/metrics/serverless/serverless_metrics_charts.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/metrics/serverless/serverless_metrics_charts.spec.ts index 7f1e3c2a05004..f4ec2818c5b4d 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/metrics/serverless/serverless_metrics_charts.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/metrics/serverless/serverless_metrics_charts.spec.ts @@ -13,7 +13,7 @@ import { ApmDocumentType } from '@kbn/apm-plugin/common/document_type'; import { RollupInterval } from '@kbn/apm-plugin/common/rollup'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; import { generateData, config } from './generate_data'; -import { DeploymentAgnosticFtrProviderContext } from '../../../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; function isNotNullOrZeroCoordinate(coordinate: Coordinate) { return coordinate.y !== null && coordinate.y !== 0; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/metrics/serverless/serverless_summary.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/metrics/serverless/serverless_summary.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/metrics/serverless/serverless_summary.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/metrics/serverless/serverless_summary.spec.ts index c291ffab47648..ff7315be7f297 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/metrics/serverless/serverless_summary.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/metrics/serverless/serverless_summary.spec.ts @@ -9,7 +9,7 @@ import { APIReturnType } from '@kbn/apm-plugin/public/services/rest/create_call_ import expect from '@kbn/expect'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; import { config, expectedValues, generateData } from './generate_data'; -import { DeploymentAgnosticFtrProviderContext } from '../../../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) { const apmApiClient = getService('apmApi'); diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/mobile/crashes/crash_group_list.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/mobile/crashes/crash_group_list.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/mobile/crashes/crash_group_list.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/mobile/crashes/crash_group_list.spec.ts index 1a053055617af..9ed742391ba6c 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/mobile/crashes/crash_group_list.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/mobile/crashes/crash_group_list.spec.ts @@ -12,7 +12,7 @@ import { } from '@kbn/apm-plugin/public/services/rest/create_call_apm_api'; import { RecursivePartial } from '@kbn/apm-plugin/typings/common'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; type ErrorGroups = APIReturnType<'GET /internal/apm/mobile-services/{serviceName}/crashes/groups/main_statistics'>['errorGroups']; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/mobile/crashes/distribution.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/mobile/crashes/distribution.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/mobile/crashes/distribution.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/mobile/crashes/distribution.spec.ts index b726f9df3349c..323086e71dd7f 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/mobile/crashes/distribution.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/mobile/crashes/distribution.spec.ts @@ -14,7 +14,7 @@ import { import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; import { RecursivePartial } from '@kbn/apm-plugin/typings/common'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; import { config, generateData } from './generate_data'; type ErrorsDistribution = diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/mobile/crashes/generate_data.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/mobile/crashes/generate_data.ts similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/mobile/crashes/generate_data.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/mobile/crashes/generate_data.ts diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/mobile/errors/generate_data.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/mobile/errors/generate_data.ts similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/mobile/errors/generate_data.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/mobile/errors/generate_data.ts diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/mobile/errors/group_id_samples.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/mobile/errors/group_id_samples.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/mobile/errors/group_id_samples.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/mobile/errors/group_id_samples.spec.ts index d569b3380a8c5..1d6d2bc6a8c9c 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/mobile/errors/group_id_samples.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/mobile/errors/group_id_samples.spec.ts @@ -10,7 +10,7 @@ import { service } from '@kbn/apm-synthtrace-client/src/lib/apm/service'; import { orderBy } from 'lodash'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; import { APIReturnType } from '@kbn/apm-plugin/public/services/rest/create_call_apm_api'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; import { config, generateData } from './generate_data'; type ErrorGroupSamples = diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/mobile/generate_mobile_data.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/mobile/generate_mobile_data.ts similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/mobile/generate_mobile_data.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/mobile/generate_mobile_data.ts diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/mobile/index.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/mobile/index.ts similarity index 97% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/mobile/index.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/mobile/index.ts index d54eb187b29c6..86f4a8e8db3e2 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/mobile/index.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/mobile/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) { describe('Mobile', () => { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/mobile/mobile_detailed_statistics_by_field.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/mobile/mobile_detailed_statistics_by_field.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/mobile/mobile_detailed_statistics_by_field.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/mobile/mobile_detailed_statistics_by_field.spec.ts index 134577dff9204..9796ab8cc0196 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/mobile/mobile_detailed_statistics_by_field.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/mobile/mobile_detailed_statistics_by_field.spec.ts @@ -11,7 +11,7 @@ import { isEmpty } from 'lodash'; import moment from 'moment'; import { APIReturnType } from '@kbn/apm-plugin/public/services/rest/create_call_apm_api'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { generateMobileData, SERVICE_VERSIONS } from './generate_mobile_data'; type MobileDetailedStatisticsResponse = diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/mobile/mobile_filters.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/mobile/mobile_filters.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/mobile/mobile_filters.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/mobile/mobile_filters.spec.ts index 5c8d8499d3295..c5705c5555d95 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/mobile/mobile_filters.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/mobile/mobile_filters.spec.ts @@ -10,7 +10,7 @@ import { apm, timerange } from '@kbn/apm-synthtrace-client'; import { APIReturnType } from '@kbn/apm-plugin/public/services/rest/create_call_apm_api'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; import { ENVIRONMENT_ALL } from '@kbn/apm-plugin/common/environment_filter_values'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; type MobileFilters = APIReturnType<'GET /internal/apm/services/{serviceName}/mobile/filters'>; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/mobile/mobile_http_requests_timeseries.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/mobile/mobile_http_requests_timeseries.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/mobile/mobile_http_requests_timeseries.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/mobile/mobile_http_requests_timeseries.spec.ts index 6a5a92a29b331..7206091486b32 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/mobile/mobile_http_requests_timeseries.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/mobile/mobile_http_requests_timeseries.spec.ts @@ -8,7 +8,7 @@ import expect from '@kbn/expect'; import { ENVIRONMENT_ALL } from '@kbn/apm-plugin/common/environment_filter_values'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { generateMobileData } from './generate_mobile_data'; export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/mobile/mobile_location_stats.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/mobile/mobile_location_stats.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/mobile/mobile_location_stats.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/mobile/mobile_location_stats.spec.ts index 20098e9a671ef..baeb12687fa4f 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/mobile/mobile_location_stats.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/mobile/mobile_location_stats.spec.ts @@ -10,7 +10,7 @@ import { apm, timerange } from '@kbn/apm-synthtrace-client'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; import { APIReturnType } from '@kbn/apm-plugin/public/services/rest/create_call_apm_api'; import { ENVIRONMENT_ALL } from '@kbn/apm-plugin/common/environment_filter_values'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; type MobileLocationStats = APIReturnType<'GET /internal/apm/mobile-services/{serviceName}/location/stats'>; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/mobile/mobile_main_statistics_by_field.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/mobile/mobile_main_statistics_by_field.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/mobile/mobile_main_statistics_by_field.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/mobile/mobile_main_statistics_by_field.spec.ts index 0e49624be2a9a..9f1706774f59c 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/mobile/mobile_main_statistics_by_field.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/mobile/mobile_main_statistics_by_field.spec.ts @@ -8,7 +8,7 @@ import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; import expect from '@kbn/expect'; import { apm, timerange } from '@kbn/apm-synthtrace-client'; import { ENVIRONMENT_ALL } from '@kbn/apm-plugin/common/environment_filter_values'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; const GALAXY_DURATION = 500; const HUAWEI_DURATION = 20; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/mobile/mobile_most_used_chart.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/mobile/mobile_most_used_chart.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/mobile/mobile_most_used_chart.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/mobile/mobile_most_used_chart.spec.ts index 205b5125d944b..207df9765b88f 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/mobile/mobile_most_used_chart.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/mobile/mobile_most_used_chart.spec.ts @@ -9,7 +9,7 @@ import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; import expect from '@kbn/expect'; import { APIReturnType } from '@kbn/apm-plugin/public/services/rest/create_call_apm_api'; import { ENVIRONMENT_ALL } from '@kbn/apm-plugin/common/environment_filter_values'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { generateMobileData } from './generate_mobile_data'; type MostUsedCharts = diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/mobile/mobile_sessions_timeseries.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/mobile/mobile_sessions_timeseries.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/mobile/mobile_sessions_timeseries.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/mobile/mobile_sessions_timeseries.spec.ts index c43284767b7b4..1293ec43558dd 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/mobile/mobile_sessions_timeseries.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/mobile/mobile_sessions_timeseries.spec.ts @@ -8,7 +8,7 @@ import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; import expect from '@kbn/expect'; import { ENVIRONMENT_ALL } from '@kbn/apm-plugin/common/environment_filter_values'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { generateMobileData } from './generate_mobile_data'; export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/mobile/mobile_stats.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/mobile/mobile_stats.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/mobile/mobile_stats.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/mobile/mobile_stats.spec.ts index 22281cd392951..0e1a019dfa0f4 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/mobile/mobile_stats.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/mobile/mobile_stats.spec.ts @@ -11,7 +11,7 @@ import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; import { APIReturnType } from '@kbn/apm-plugin/public/services/rest/create_call_apm_api'; import { ENVIRONMENT_ALL } from '@kbn/apm-plugin/common/environment_filter_values'; import { meanBy, sumBy } from 'lodash'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; type MobileStats = APIReturnType<'GET /internal/apm/mobile-services/{serviceName}/stats'>; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/mobile/mobile_terms_by_field.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/mobile/mobile_terms_by_field.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/mobile/mobile_terms_by_field.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/mobile/mobile_terms_by_field.spec.ts index 8dd4142109375..c75f0f6b5d472 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/mobile/mobile_terms_by_field.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/mobile/mobile_terms_by_field.spec.ts @@ -9,7 +9,7 @@ import expect from '@kbn/expect'; import { apm, timerange } from '@kbn/apm-synthtrace-client'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; import { ENVIRONMENT_ALL } from '@kbn/apm-plugin/common/environment_filter_values'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; // we generate 3 transactions per each mobile device // timerange 15min, interval 5m, rate 1 diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/observability_overview/has_data.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/observability_overview/has_data.spec.ts similarity index 98% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/observability_overview/has_data.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/observability_overview/has_data.spec.ts index 63620d514603e..c0c6d65f57c11 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/observability_overview/has_data.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/observability_overview/has_data.spec.ts @@ -7,7 +7,7 @@ import expect from '@kbn/expect'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { ARCHIVER_ROUTES } from '../constants/archiver'; export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/observability_overview/index.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/observability_overview/index.ts similarity index 95% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/observability_overview/index.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/observability_overview/index.ts index bbb35976f8175..7b1a480bf1a96 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/observability_overview/index.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/observability_overview/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) { describe('observability_overview', () => { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/observability_overview/observability_overview.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/observability_overview/observability_overview.spec.ts similarity index 98% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/observability_overview/observability_overview.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/observability_overview/observability_overview.spec.ts index 796ef08f70250..58c9ad3ed1502 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/observability_overview/observability_overview.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/observability_overview/observability_overview.spec.ts @@ -10,8 +10,8 @@ import { meanBy, sumBy } from 'lodash'; import { ApmDocumentType } from '@kbn/apm-plugin/common/document_type'; import { RollupInterval } from '@kbn/apm-plugin/common/rollup'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; -import { roundNumber } from '../../../../../../apm_api_integration/utils'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import { roundNumber } from '../../../../apm_api_integration/utils'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) { const apmApiClient = getService('apmApi'); diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/service_groups/index.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/service_groups/index.ts similarity index 95% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/service_groups/index.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/service_groups/index.ts index 458361077c208..28afe1414ea24 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/service_groups/index.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/service_groups/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) { describe('service_groups', () => { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/service_groups/save_service_group.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/service_groups/save_service_group.spec.ts similarity index 89% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/service_groups/save_service_group.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/service_groups/save_service_group.spec.ts index 1c5b617cfc486..285630f972189 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/service_groups/save_service_group.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/service_groups/save_service_group.spec.ts @@ -5,9 +5,9 @@ * 2.0. */ import expect from '@kbn/expect'; -import { ApmApiError } from '../../../../../../apm_api_integration/common/apm_api_supertest'; -import { expectToReject } from '../../../../../../apm_api_integration/common/utils/expect_to_reject'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import { ApmApiError } from '../../../../apm_api_integration/common/apm_api_supertest'; +import { expectToReject } from '../../../../apm_api_integration/common/utils/expect_to_reject'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { createServiceGroupApi, deleteAllServiceGroups, diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/service_groups/service_group_count/generate_data.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/service_groups/service_group_count/generate_data.ts similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/service_groups/service_group_count/generate_data.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/service_groups/service_group_count/generate_data.ts diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/service_groups/service_group_count/service_group_count.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/service_groups/service_group_count/service_group_count.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/service_groups/service_group_count/service_group_count.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/service_groups/service_group_count/service_group_count.spec.ts index d70d6ba0aedca..2725b7a8cb22b 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/service_groups/service_group_count/service_group_count.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/service_groups/service_group_count/service_group_count.spec.ts @@ -9,7 +9,7 @@ import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; import type { RoleCredentials } from '@kbn/ftr-common-functional-services'; import { ApmRuleType } from '@kbn/rule-data-utils'; import { AggregationType } from '@kbn/apm-plugin/common/rules/apm_rule_types'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; import { createServiceGroupApi, deleteAllServiceGroups, diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/service_groups/service_group_with_overflow/es_utils.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/service_groups/service_group_with_overflow/es_utils.ts similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/service_groups/service_group_with_overflow/es_utils.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/service_groups/service_group_with_overflow/es_utils.ts diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/service_groups/service_group_with_overflow/generate_data.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/service_groups/service_group_with_overflow/generate_data.ts similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/service_groups/service_group_with_overflow/generate_data.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/service_groups/service_group_with_overflow/generate_data.ts diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/service_groups/service_group_with_overflow/service_group_with_overflow.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/service_groups/service_group_with_overflow/service_group_with_overflow.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/service_groups/service_group_with_overflow/service_group_with_overflow.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/service_groups/service_group_with_overflow/service_group_with_overflow.spec.ts index b5cbf1ae2566c..d878a6c838eb3 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/service_groups/service_group_with_overflow/service_group_with_overflow.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/service_groups/service_group_with_overflow/service_group_with_overflow.spec.ts @@ -10,7 +10,7 @@ import { ENVIRONMENT_ALL } from '@kbn/apm-plugin/common/environment_filter_value import { ApmDocumentType } from '@kbn/apm-plugin/common/document_type'; import { RollupInterval } from '@kbn/apm-plugin/common/rollup'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; import { createServiceGroupApi, deleteAllServiceGroups } from '../service_groups_api_methods'; import { createServiceTransactionMetricsDocs } from './es_utils'; import { generateData } from './generate_data'; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/service_groups/service_groups_api_methods.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/service_groups/service_groups_api_methods.ts similarity index 96% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/service_groups/service_groups_api_methods.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/service_groups/service_groups_api_methods.ts index bd47b80e0bef3..70e26b40f9327 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/service_groups/service_groups_api_methods.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/service_groups/service_groups_api_methods.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ApmApiClient } from '../../../../services/apm_api'; +import { ApmApiClient } from '../../../services/apm_api'; export async function getServiceGroupsApi(apmApiClient: ApmApiClient) { return apmApiClient.writeUser({ diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/service_maps/index.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/service_maps/index.ts similarity index 85% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/service_maps/index.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/service_maps/index.ts index 97681cae7def9..98f4a5a12a1d2 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/service_maps/index.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/service_maps/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) { describe('service_maps', () => { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/service_maps/service_maps.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/service_maps/service_maps.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/service_maps/service_maps.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/service_maps/service_maps.spec.ts index 630c494f39036..5302b3914955d 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/service_maps/service_maps.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/service_maps/service_maps.spec.ts @@ -10,8 +10,8 @@ import expect from 'expect'; import { serviceMap, timerange, apm, ApmFields } from '@kbn/apm-synthtrace-client'; import { Readable } from 'node:stream'; import { compact } from 'lodash'; -import type { SupertestReturnType } from '../../../../../../apm_api_integration/common/apm_api_supertest'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { SupertestReturnType } from '../../../../apm_api_integration/common/apm_api_supertest'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { extractExitSpansConnections, getElements, diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/service_maps/service_maps_kuery_filter.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/service_maps/service_maps_kuery_filter.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/service_maps/service_maps_kuery_filter.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/service_maps/service_maps_kuery_filter.spec.ts index 583e109db42c5..b9dd3a7cdcaf1 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/service_maps/service_maps_kuery_filter.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/service_maps/service_maps_kuery_filter.spec.ts @@ -9,7 +9,7 @@ import { timerange, serviceMap } from '@kbn/apm-synthtrace-client'; import { APIClientRequestParamsOf } from '@kbn/apm-plugin/public/services/rest/create_call_apm_api'; import { RecursivePartial } from '@kbn/apm-plugin/typings/common'; import { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { extractExitSpansConnections, getElements, diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/service_maps/utils.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/service_maps/utils.ts similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/service_maps/utils.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/service_maps/utils.ts diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/service_nodes/get_service_nodes.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/service_nodes/get_service_nodes.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/service_nodes/get_service_nodes.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/service_nodes/get_service_nodes.spec.ts index 95f0b8defa989..70f563573e29f 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/service_nodes/get_service_nodes.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/service_nodes/get_service_nodes.spec.ts @@ -8,7 +8,7 @@ import expect from '@kbn/expect'; import { apm, timerange } from '@kbn/apm-synthtrace-client'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) { const apmApiClient = getService('apmApi'); diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/service_nodes/index.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/service_nodes/index.ts similarity index 94% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/service_nodes/index.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/service_nodes/index.ts index 18315aade3b31..d0b4563c42e97 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/service_nodes/index.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/service_nodes/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) { describe('service_nodes', () => { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/service_overview/__snapshots__/instances_detailed_statistics.spec.snap b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/service_overview/__snapshots__/instances_detailed_statistics.spec.snap similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/service_overview/__snapshots__/instances_detailed_statistics.spec.snap rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/service_overview/__snapshots__/instances_detailed_statistics.spec.snap diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/service_overview/dependencies/es_utils.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/service_overview/dependencies/es_utils.ts similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/service_overview/dependencies/es_utils.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/service_overview/dependencies/es_utils.ts diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/service_overview/dependencies/generate_data.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/service_overview/dependencies/generate_data.ts similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/service_overview/dependencies/generate_data.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/service_overview/dependencies/generate_data.ts diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/service_overview/dependencies/index.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/service_overview/dependencies/index.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/service_overview/dependencies/index.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/service_overview/dependencies/index.spec.ts index d5164a0ea90c8..91f5639311d1e 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/service_overview/dependencies/index.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/service_overview/dependencies/index.spec.ts @@ -9,7 +9,7 @@ import { DependencyNode } from '@kbn/apm-plugin/common/connections'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; import type { APIReturnType } from '@kbn/apm-plugin/public/services/rest/create_call_apm_api'; import { NodeType } from '@kbn/apm-plugin/common/connections'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; import { roundNumber } from '../../utils/common'; import { generateData, dataConfig } from './generate_data'; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/service_overview/generate_data.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/service_overview/generate_data.ts similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/service_overview/generate_data.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/service_overview/generate_data.ts diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/service_overview/get_service_node_ids.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/service_overview/get_service_node_ids.ts similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/service_overview/get_service_node_ids.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/service_overview/get_service_node_ids.ts diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/service_overview/index.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/service_overview/index.ts similarity index 96% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/service_overview/index.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/service_overview/index.ts index 5ab7be1ed1ec5..68474bea0d7d8 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/service_overview/index.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/service_overview/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) { describe('service_overview', () => { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/service_overview/instance_details.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/service_overview/instance_details.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/service_overview/instance_details.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/service_overview/instance_details.spec.ts index 94ac27b90bc5f..a85d6999b3b87 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/service_overview/instance_details.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/service_overview/instance_details.spec.ts @@ -9,7 +9,7 @@ import { omit } from 'lodash'; import type { APIReturnType } from '@kbn/apm-plugin/public/services/rest/create_call_apm_api'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client'; import { apm, timerange } from '@kbn/apm-synthtrace-client'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { getServiceNodeIds } from './get_service_node_ids'; type ServiceOverviewInstanceDetails = diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/service_overview/instances_detailed_statistics.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/service_overview/instances_detailed_statistics.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/service_overview/instances_detailed_statistics.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/service_overview/instances_detailed_statistics.spec.ts index 7fd39b650b716..e29b52dffeed4 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/service_overview/instances_detailed_statistics.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/service_overview/instances_detailed_statistics.spec.ts @@ -12,7 +12,7 @@ import { LatencyAggregationType } from '@kbn/apm-plugin/common/latency_aggregati import { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; import type { APIReturnType } from '@kbn/apm-plugin/public/services/rest/create_call_apm_api'; import { isFiniteNumber } from '@kbn/apm-plugin/common/utils/is_finite_number'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { getServiceNodeIds } from './get_service_node_ids'; import { generateServiceData } from './generate_data'; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/service_overview/instances_main_statistics.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/service_overview/instances_main_statistics.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/service_overview/instances_main_statistics.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/service_overview/instances_main_statistics.spec.ts index e0e3ba254924d..2815bb59ba066 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/service_overview/instances_main_statistics.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/service_overview/instances_main_statistics.spec.ts @@ -17,7 +17,7 @@ import { LatencyAggregationType } from '@kbn/apm-plugin/common/latency_aggregati import type { InstancesSortField } from '@kbn/apm-plugin/common/instances'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client'; import { sum } from 'lodash'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { roundNumber } from '../utils/common'; type ServiceOverviewInstancesMainStatistics = diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/services/__snapshots__/error_groups_detailed_statistics.spec.snap b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/services/__snapshots__/error_groups_detailed_statistics.spec.snap similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/services/__snapshots__/error_groups_detailed_statistics.spec.snap rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/services/__snapshots__/error_groups_detailed_statistics.spec.snap diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/services/agent.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/services/agent.spec.ts similarity index 93% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/services/agent.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/services/agent.spec.ts index 22953fced1fee..c7ac19c47c3ff 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/services/agent.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/services/agent.spec.ts @@ -6,8 +6,8 @@ */ import expect from '@kbn/expect'; -import archives_metadata from '../../../../../../apm_api_integration/common/fixtures/es_archiver/archives_metadata'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import archives_metadata from '../../../../apm_api_integration/common/fixtures/es_archiver/archives_metadata'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { ARCHIVER_ROUTES } from '../constants/archiver'; export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/services/archive_services_detailed_statistics.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/services/archive_services_detailed_statistics.spec.ts similarity index 98% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/services/archive_services_detailed_statistics.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/services/archive_services_detailed_statistics.spec.ts index 9c00ed2a471bf..ca2af33b4703c 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/services/archive_services_detailed_statistics.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/services/archive_services_detailed_statistics.spec.ts @@ -7,7 +7,7 @@ import expect from '@kbn/expect'; import { ApmDocumentType } from '@kbn/apm-plugin/common/document_type'; import { RollupInterval } from '@kbn/apm-plugin/common/rollup'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) { const apmApiClient = getService('apmApi'); diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/services/derived_annotations.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/services/derived_annotations.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/services/derived_annotations.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/services/derived_annotations.spec.ts index 272ddb876573f..99bb04e899fdf 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/services/derived_annotations.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/services/derived_annotations.spec.ts @@ -9,7 +9,7 @@ import expect from '@kbn/expect'; import { APIReturnType } from '@kbn/apm-plugin/public/services/rest/create_call_apm_api'; import { RoleCredentials } from '@kbn/ftr-common-functional-services'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export default function annotationApiTests({ getService }: DeploymentAgnosticFtrProviderContext) { const apmApiClient = getService('apmApi'); diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/services/error_groups/error_groups_detailed_statistics.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/services/error_groups/error_groups_detailed_statistics.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/services/error_groups/error_groups_detailed_statistics.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/services/error_groups/error_groups_detailed_statistics.spec.ts index e01ea0b618deb..b01f923065660 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/services/error_groups/error_groups_detailed_statistics.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/services/error_groups/error_groups_detailed_statistics.spec.ts @@ -15,7 +15,7 @@ import { } from '@kbn/apm-plugin/public/services/rest/create_call_apm_api'; import { RecursivePartial } from '@kbn/apm-plugin/typings/common'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; import { config, generateData } from './generate_data'; import { getErrorGroupIds } from './get_error_group_ids'; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/services/error_groups/error_groups_main_statistics.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/services/error_groups/error_groups_main_statistics.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/services/error_groups/error_groups_main_statistics.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/services/error_groups/error_groups_main_statistics.spec.ts index f6f8f99140c65..9d2ea4174165a 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/services/error_groups/error_groups_main_statistics.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/services/error_groups/error_groups_main_statistics.spec.ts @@ -12,7 +12,7 @@ import { } from '@kbn/apm-plugin/public/services/rest/create_call_apm_api'; import { RecursivePartial } from '@kbn/apm-plugin/typings/common'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; import { generateData, config } from './generate_data'; type ErrorGroupsMainStatistics = diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/services/error_groups/generate_data.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/services/error_groups/generate_data.ts similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/services/error_groups/generate_data.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/services/error_groups/generate_data.ts diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/services/error_groups/get_error_group_ids.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/services/error_groups/get_error_group_ids.ts similarity index 93% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/services/error_groups/get_error_group_ids.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/services/error_groups/get_error_group_ids.ts index e9487e5e099c9..9d5f9d8bfe3b0 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/services/error_groups/get_error_group_ids.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/services/error_groups/get_error_group_ids.ts @@ -5,7 +5,7 @@ * 2.0. */ import { take } from 'lodash'; -import type { ApmApiClient } from '../../../../../services/apm_api'; +import type { ApmApiClient } from '../../../../services/apm_api'; export async function getErrorGroupIds({ apmApiClient, diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/services/get_service_node_metadata.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/services/get_service_node_metadata.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/services/get_service_node_metadata.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/services/get_service_node_metadata.spec.ts index e1ac83609b86f..960e00c1b5e67 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/services/get_service_node_metadata.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/services/get_service_node_metadata.spec.ts @@ -10,7 +10,7 @@ import { apm, timerange } from '@kbn/apm-synthtrace-client'; import { ApmDocumentType } from '@kbn/apm-plugin/common/document_type'; import { RollupInterval } from '@kbn/apm-plugin/common/rollup'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) { const apmApiClient = getService('apmApi'); diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/services/index.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/services/index.ts similarity index 93% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/services/index.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/services/index.ts index 4993ec83c5eca..0fd19869849b2 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/services/index.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/services/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) { describe('Services', () => { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/services/service_alerts.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/services/service_alerts.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/services/service_alerts.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/services/service_alerts.spec.ts index 09d9176a03a0a..b69b6cb7e0ec1 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/services/service_alerts.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/services/service_alerts.spec.ts @@ -10,7 +10,7 @@ import { ApmRuleType } from '@kbn/rule-data-utils'; import { apm, timerange } from '@kbn/apm-synthtrace-client'; import type { RoleCredentials } from '@kbn/ftr-common-functional-services'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { APM_ACTION_VARIABLE_INDEX, APM_ALERTS_INDEX, diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/services/service_details/generate_data.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/services/service_details/generate_data.ts similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/services/service_details/generate_data.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/services/service_details/generate_data.ts diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/services/service_details/service_details.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/services/service_details/service_details.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/services/service_details/service_details.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/services/service_details/service_details.spec.ts index 8fb9195bb6800..7d8949c1ffe68 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/services/service_details/service_details.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/services/service_details/service_details.spec.ts @@ -9,7 +9,7 @@ import expect from '@kbn/expect'; import { first } from 'lodash'; import { APIReturnType } from '@kbn/apm-plugin/public/services/rest/create_call_apm_api'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; import { dataConfig, generateData } from './generate_data'; type ServiceDetails = APIReturnType<'GET /internal/apm/services/{serviceName}/metadata/details'>; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/services/service_details/service_infra_metrics.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/services/service_details/service_infra_metrics.spec.ts similarity index 97% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/services/service_details/service_infra_metrics.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/services/service_details/service_infra_metrics.spec.ts index 92a8412961749..671c55b6e4de9 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/services/service_details/service_infra_metrics.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/services/service_details/service_infra_metrics.spec.ts @@ -7,8 +7,8 @@ import expect from '@kbn/expect'; import { APIReturnType } from '@kbn/apm-plugin/public/services/rest/create_call_apm_api'; import { ENVIRONMENT_ALL } from '@kbn/apm-plugin/common/environment_filter_values'; -import archives_metadata from '../../../../../../../apm_api_integration/common/fixtures/es_archiver/archives_metadata'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../../ftr_provider_context'; +import archives_metadata from '../../../../../apm_api_integration/common/fixtures/es_archiver/archives_metadata'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; import { ARCHIVER_ROUTES } from '../../constants/archiver'; type ServiceOverviewInstanceDetails = diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/services/service_icons/generate_data.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/services/service_icons/generate_data.ts similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/services/service_icons/generate_data.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/services/service_icons/generate_data.ts diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/services/service_icons/service_icons.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/services/service_icons/service_icons.spec.ts similarity index 98% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/services/service_icons/service_icons.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/services/service_icons/service_icons.spec.ts index 635c6079f9c18..e5f87a3fdc79c 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/services/service_icons/service_icons.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/services/service_icons/service_icons.spec.ts @@ -9,7 +9,7 @@ import expect from '@kbn/expect'; import { APIReturnType } from '@kbn/apm-plugin/public/services/rest/create_call_apm_api'; import { getServerlessTypeFromCloudData } from '@kbn/apm-plugin/common/serverless'; import { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; import { dataConfig, generateData } from './generate_data'; type ServiceIconMetadata = APIReturnType<'GET /internal/apm/services/{serviceName}/metadata/icons'>; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/services/services_detailed_statistics.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/services/services_detailed_statistics.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/services/services_detailed_statistics.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/services/services_detailed_statistics.spec.ts index 17302aed8b653..2afe4dcb8653d 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/services/services_detailed_statistics.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/services/services_detailed_statistics.spec.ts @@ -14,7 +14,7 @@ import { RollupInterval } from '@kbn/apm-plugin/common/rollup'; import { apm, timerange } from '@kbn/apm-synthtrace-client'; import { uniq, map } from 'lodash'; import { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; type ServicesDetailedStatisticsReturn = APIReturnType<'POST /internal/apm/services/detailed_statistics'>; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/services/throughput.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/services/throughput.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/services/throughput.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/services/throughput.spec.ts index d3183916b593b..795fe24329d47 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/services/throughput.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/services/throughput.spec.ts @@ -19,7 +19,7 @@ import { RecursivePartial } from '@kbn/apm-plugin/typings/common'; import { ApmDocumentType } from '@kbn/apm-plugin/common/document_type'; import { RollupInterval } from '@kbn/apm-plugin/common/rollup'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { roundNumber } from '../utils/common'; type ThroughputReturn = APIReturnType<'GET /internal/apm/services/{serviceName}/throughput'>; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/services/top_services.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/services/top_services.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/services/top_services.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/services/top_services.spec.ts index 0aea10a68367a..463e54618accc 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/services/top_services.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/services/top_services.spec.ts @@ -12,7 +12,7 @@ import { ENVIRONMENT_ALL } from '@kbn/apm-plugin/common/environment_filter_value import { ApmDocumentType } from '@kbn/apm-plugin/common/document_type'; import { RollupInterval } from '@kbn/apm-plugin/common/rollup'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) { const apmApiClient = getService('apmApi'); diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/services/transaction_types.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/services/transaction_types.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/services/transaction_types.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/services/transaction_types.spec.ts index b76f05f60631b..1dde7f4de2e28 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/services/transaction_types.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/services/transaction_types.spec.ts @@ -10,7 +10,7 @@ import { ApmDocumentType } from '@kbn/apm-plugin/common/document_type'; import { RollupInterval } from '@kbn/apm-plugin/common/rollup'; import { apm, timerange } from '@kbn/apm-synthtrace-client'; import { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) { const apmApiClient = getService('apmApi'); diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/settings/agent_keys/agent_keys.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/settings/agent_keys/agent_keys.spec.ts similarity index 91% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/settings/agent_keys/agent_keys.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/settings/agent_keys/agent_keys.spec.ts index 6f95caa79f99d..b59b1a2ebd9d3 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/settings/agent_keys/agent_keys.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/settings/agent_keys/agent_keys.spec.ts @@ -6,10 +6,10 @@ */ import expect from '@kbn/expect'; import { PrivilegeType, ClusterPrivilegeType } from '@kbn/apm-plugin/common/privilege_type'; -import { expectToReject } from '../../../../../../../apm_api_integration/common/utils/expect_to_reject'; -import type { RoleCredentials } from '../../../../../services'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../../ftr_provider_context'; -import type { ApmApiError } from '../../../../../services/apm_api'; +import { expectToReject } from '../../../../../apm_api_integration/common/utils/expect_to_reject'; +import type { RoleCredentials } from '../../../../services'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { ApmApiError } from '../../../../services/apm_api'; export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) { const apmApiClient = getService('apmApi'); diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/settings/anomaly_detection/basic.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/settings/anomaly_detection/basic.spec.ts similarity index 94% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/settings/anomaly_detection/basic.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/settings/anomaly_detection/basic.spec.ts index 195e4ff5e7bd2..15f7329ceefe7 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/settings/anomaly_detection/basic.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/settings/anomaly_detection/basic.spec.ts @@ -6,8 +6,8 @@ */ import expect from '@kbn/expect'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../../ftr_provider_context'; -import type { ApmApiError } from '../../../../../services/apm_api'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { ApmApiError } from '../../../../services/apm_api'; export default function apiTest({ getService }: DeploymentAgnosticFtrProviderContext) { const apmApiClient = getService('apmApi'); diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/settings/anomaly_detection/read_user.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/settings/anomaly_detection/read_user.spec.ts similarity index 94% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/settings/anomaly_detection/read_user.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/settings/anomaly_detection/read_user.spec.ts index 0de23a4c27f2f..d6ad309e111f7 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/settings/anomaly_detection/read_user.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/settings/anomaly_detection/read_user.spec.ts @@ -6,8 +6,8 @@ */ import expect from '@kbn/expect'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../../ftr_provider_context'; -import type { ApmApiError } from '../../../../../services/apm_api'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { ApmApiError } from '../../../../services/apm_api'; export default function apiTest({ getService }: DeploymentAgnosticFtrProviderContext) { const apmApiClient = getService('apmApi'); diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/settings/apm_indices/apm_indices.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/settings/apm_indices/apm_indices.spec.ts similarity index 98% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/settings/apm_indices/apm_indices.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/settings/apm_indices/apm_indices.spec.ts index 36ad355c39896..460fa1acb0a8f 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/settings/apm_indices/apm_indices.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/settings/apm_indices/apm_indices.spec.ts @@ -10,7 +10,7 @@ import { APM_INDEX_SETTINGS_SAVED_OBJECT_TYPE, } from '@kbn/apm-sources-access-plugin/server/saved_objects/apm_indices'; import expect from '@kbn/expect'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; export default function apmIndicesTests({ getService }: DeploymentAgnosticFtrProviderContext) { const kibanaServer = getService('kibanaServer'); diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/settings/custom_link/custom_link.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/settings/custom_link/custom_link.spec.ts similarity index 98% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/settings/custom_link/custom_link.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/settings/custom_link/custom_link.spec.ts index 9924814591110..b4329de2324c1 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/settings/custom_link/custom_link.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/settings/custom_link/custom_link.spec.ts @@ -7,8 +7,8 @@ import expect from '@kbn/expect'; import type { CustomLink } from '@kbn/apm-plugin/common/custom_link/custom_link_types'; -import type { ApmApiError } from '../../../../../services/apm_api'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../../ftr_provider_context'; +import type { ApmApiError } from '../../../../services/apm_api'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; import { ARCHIVER_ROUTES } from '../../constants/archiver'; export default function customLinksTests({ getService }: DeploymentAgnosticFtrProviderContext) { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/settings/index.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/settings/index.ts similarity index 89% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/settings/index.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/settings/index.ts index 5690ce79690c3..7b679192f8030 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/settings/index.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/settings/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) { describe('settings', () => { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/span_links/data_generator.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/span_links/data_generator.ts similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/span_links/data_generator.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/span_links/data_generator.ts diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/span_links/index.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/span_links/index.ts similarity index 83% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/span_links/index.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/span_links/index.ts index e7772daa131af..bc015272ceb1f 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/span_links/index.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/span_links/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) { describe('span_links', () => { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/span_links/span_links.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/span_links/span_links.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/span_links/span_links.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/span_links/span_links.spec.ts index 2a3f9a60d116a..8a17091af70d4 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/span_links/span_links.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/span_links/span_links.spec.ts @@ -10,7 +10,7 @@ import { Readable } from 'stream'; import { type ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; import moment from 'moment'; import { ApmSynthtracePipelineSchema, ApmSynthtracePipelines } from '@kbn/apm-synthtrace-client'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { generateSpanLinksData } from './data_generator'; export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/suggestions/generate_data.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/suggestions/generate_data.ts similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/suggestions/generate_data.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/suggestions/generate_data.ts diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/suggestions/index.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/suggestions/index.ts similarity index 94% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/suggestions/index.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/suggestions/index.ts index 9b2563c093a9d..756a4c727ed98 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/suggestions/index.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/suggestions/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) { describe('Suggestions', () => { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/suggestions/suggestions.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/suggestions/suggestions.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/suggestions/suggestions.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/suggestions/suggestions.spec.ts index a6e9342885571..80956eef335bc 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/suggestions/suggestions.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/suggestions/suggestions.spec.ts @@ -12,7 +12,7 @@ import { } from '@kbn/apm-plugin/common/es_fields/apm'; import expect from '@kbn/expect'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { generateData } from './generate_data'; const startNumber = new Date('2021-01-01T00:00:00.000Z').getTime(); diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/throughput/dependencies_apis.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/throughput/dependencies_apis.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/throughput/dependencies_apis.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/throughput/dependencies_apis.spec.ts index 84d293f287b2f..15bbb0fc28c7a 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/throughput/dependencies_apis.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/throughput/dependencies_apis.spec.ts @@ -9,7 +9,7 @@ import expect from '@kbn/expect'; import { meanBy, sumBy } from 'lodash'; import { DependencyNode, ServiceNode } from '@kbn/apm-plugin/common/connections'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { roundNumber } from '../utils/common'; export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/throughput/index.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/throughput/index.ts similarity index 95% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/throughput/index.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/throughput/index.ts index e0176b18be783..cca3885bd2f11 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/throughput/index.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/throughput/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) { describe('Throughput', () => { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/throughput/service_apis.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/throughput/service_apis.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/throughput/service_apis.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/throughput/service_apis.spec.ts index 429d29090a1d2..30aa0843706af 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/throughput/service_apis.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/throughput/service_apis.spec.ts @@ -12,7 +12,7 @@ import expect from '@kbn/expect'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; import { meanBy, sumBy } from 'lodash'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { roundNumber } from '../utils/common'; export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/throughput/service_maps.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/throughput/service_maps.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/throughput/service_maps.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/throughput/service_maps.spec.ts index 883e81ea24524..1b8404108eb85 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/throughput/service_maps.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/throughput/service_maps.spec.ts @@ -10,7 +10,7 @@ import { ApmDocumentType } from '@kbn/apm-plugin/common/document_type'; import { RollupInterval } from '@kbn/apm-plugin/common/rollup'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { roundNumber } from '../utils/common'; export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/time_range_metadata/index.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/time_range_metadata/index.ts similarity index 85% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/time_range_metadata/index.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/time_range_metadata/index.ts index 4e3c25936a2db..7f9930e236928 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/time_range_metadata/index.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/time_range_metadata/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) { describe('time_range_metadata', () => { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/time_range_metadata/many_apm_server_versions.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/time_range_metadata/many_apm_server_versions.spec.ts similarity index 98% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/time_range_metadata/many_apm_server_versions.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/time_range_metadata/many_apm_server_versions.spec.ts index 58d616b9eaeff..c4f8083419471 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/time_range_metadata/many_apm_server_versions.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/time_range_metadata/many_apm_server_versions.spec.ts @@ -16,8 +16,8 @@ import { ApmDocumentType } from '@kbn/apm-plugin/common/document_type'; import { RollupInterval } from '@kbn/apm-plugin/common/rollup'; import { LatencyAggregationType } from '@kbn/apm-plugin/common/latency_aggregation_types'; import { Readable } from 'stream'; -import type { ApmApiClient } from '../../../../services/apm_api'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { ApmApiClient } from '../../../services/apm_api'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) { const apmApiClient = getService('apmApi'); diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/time_range_metadata/time_range_metadata.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/time_range_metadata/time_range_metadata.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/time_range_metadata/time_range_metadata.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/time_range_metadata/time_range_metadata.spec.ts index f9797c3262029..39dfd19fe7d76 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/time_range_metadata/time_range_metadata.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/time_range_metadata/time_range_metadata.spec.ts @@ -14,7 +14,7 @@ import { RollupInterval } from '@kbn/apm-plugin/common/rollup'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; import { Readable } from 'stream'; import { ToolingLog } from '@kbn/tooling-log'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) { const apmApiClient = getService('apmApi'); diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/traces/__snapshots__/top_traces.spec.snap b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/traces/__snapshots__/top_traces.spec.snap similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/traces/__snapshots__/top_traces.spec.snap rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/traces/__snapshots__/top_traces.spec.snap diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/traces/critical_path.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/traces/critical_path.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/traces/critical_path.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/traces/critical_path.spec.ts index 1f1d28215307c..1a20bea5f324b 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/traces/critical_path.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/traces/critical_path.spec.ts @@ -11,8 +11,8 @@ import { Assign } from '@kbn/utility-types'; import { compact, invert, sortBy, uniq } from 'lodash'; import { Readable } from 'stream'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; -import type { SupertestReturnType } from '../../../../services/apm_api'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { SupertestReturnType } from '../../../services/apm_api'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) { const apmApiClient = getService('apmApi'); diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/traces/find_traces.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/traces/find_traces.spec.ts similarity index 98% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/traces/find_traces.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/traces/find_traces.spec.ts index b1bd8467456d9..c575515512860 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/traces/find_traces.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/traces/find_traces.spec.ts @@ -11,8 +11,8 @@ import { Environment } from '@kbn/apm-plugin/common/environment_rt'; import { ENVIRONMENT_ALL } from '@kbn/apm-plugin/common/environment_filter_values'; import { sortBy } from 'lodash'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; -import type { ApmApiError } from '../../../../services/apm_api'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { ApmApiError } from '../../../services/apm_api'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { generateTrace } from './generate_trace'; export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/traces/focused_trace.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/traces/focused_trace.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/traces/focused_trace.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/traces/focused_trace.spec.ts index acb4f6ffe27bf..3cb8f27f322d5 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/traces/focused_trace.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/traces/focused_trace.spec.ts @@ -11,7 +11,7 @@ import { ENVIRONMENT_ALL } from '@kbn/apm-plugin/common/environment_filter_value import { TraceSearchType } from '@kbn/apm-plugin/common/trace_explorer'; import type { APIReturnType } from '@kbn/apm-plugin/public/services/rest/create_call_apm_api'; import { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { generateTrace } from './generate_trace'; type FocusedTraceResponseType = APIReturnType<'GET /internal/apm/traces/{traceId}/{docId}'>; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/traces/generate_trace.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/traces/generate_trace.ts similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/traces/generate_trace.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/traces/generate_trace.ts diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/traces/index.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/traces/index.ts similarity index 90% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/traces/index.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/traces/index.ts index 1aaea150e0ed9..0a70654873395 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/traces/index.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/traces/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) { describe('Traces', () => { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/traces/large_trace/generate_large_trace.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/traces/large_trace/generate_large_trace.ts similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/traces/large_trace/generate_large_trace.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/traces/large_trace/generate_large_trace.ts diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/traces/large_trace/large_trace.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/traces/large_trace/large_trace.spec.ts similarity index 97% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/traces/large_trace/large_trace.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/traces/large_trace/large_trace.spec.ts index 7a0952b856c6b..5290a8b3826fb 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/traces/large_trace/large_trace.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/traces/large_trace/large_trace.spec.ts @@ -15,8 +15,8 @@ import type { Client } from '@elastic/elasticsearch'; import type { APIReturnType } from '@kbn/apm-plugin/public/services/rest/create_call_apm_api'; import expect from '@kbn/expect'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; -import type { ApmApiClient } from '../../../../../services/apm_api'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../../ftr_provider_context'; +import type { ApmApiClient } from '../../../../services/apm_api'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; import { generateLargeTrace } from './generate_large_trace'; const start = new Date('2023-01-01T00:00:00.000Z').getTime(); diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/traces/span_details.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/traces/span_details.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/traces/span_details.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/traces/span_details.spec.ts index d5b2efc3479a6..b0cda01f3805f 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/traces/span_details.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/traces/span_details.spec.ts @@ -8,7 +8,7 @@ import { apm, timerange } from '@kbn/apm-synthtrace-client'; import expect from '@kbn/expect'; import { Readable } from 'stream'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) { const apmApiClient = getService('apmApi'); diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/traces/top_traces.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/traces/top_traces.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/traces/top_traces.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/traces/top_traces.spec.ts index 1f2abda3d42f8..21c6f852c466d 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/traces/top_traces.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/traces/top_traces.spec.ts @@ -7,7 +7,7 @@ import expect from '@kbn/expect'; import { sortBy } from 'lodash'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import archives_metadata from '../constants/archives_metadata'; import { ARCHIVER_ROUTES } from '../constants/archiver'; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/traces/trace_by_id.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/traces/trace_by_id.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/traces/trace_by_id.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/traces/trace_by_id.spec.ts index 5599844e744b0..0879d91438410 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/traces/trace_by_id.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/traces/trace_by_id.spec.ts @@ -9,7 +9,7 @@ import { apm, timerange } from '@kbn/apm-synthtrace-client'; import expect from '@kbn/expect'; import { Readable } from 'stream'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) { const apmApiClient = getService('apmApi'); diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/traces/transaction_details.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/traces/transaction_details.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/traces/transaction_details.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/traces/transaction_details.spec.ts index e29006e29989c..7c467f1c90e7a 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/traces/transaction_details.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/traces/transaction_details.spec.ts @@ -8,7 +8,7 @@ import { apm, timerange } from '@kbn/apm-synthtrace-client'; import expect from '@kbn/expect'; import { Readable } from 'stream'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) { const apmApiClient = getService('apmApi'); diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/transactions/breakdown.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/transactions/breakdown.spec.ts similarity index 97% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/transactions/breakdown.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/transactions/breakdown.spec.ts index 73437daa08654..e14b7f52dccba 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/transactions/breakdown.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/transactions/breakdown.spec.ts @@ -7,7 +7,7 @@ import expect from '@kbn/expect'; import archives from '../constants/archives_metadata'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) { const apmApiClient = getService('apmApi'); diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/transactions/error_rate.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/transactions/error_rate.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/transactions/error_rate.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/transactions/error_rate.spec.ts index 976f33a59488f..7384911892ae6 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/transactions/error_rate.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/transactions/error_rate.spec.ts @@ -17,7 +17,7 @@ import { RecursivePartial } from '@kbn/apm-plugin/typings/common'; import { ApmDocumentType } from '@kbn/apm-plugin/common/document_type'; import { RollupInterval } from '@kbn/apm-plugin/common/rollup'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; type ErrorRate = APIReturnType<'GET /internal/apm/services/{serviceName}/transactions/charts/error_rate'>; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/transactions/index.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/transactions/index.ts similarity index 97% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/transactions/index.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/transactions/index.ts index 30715c862c7f5..9b94a1c6679a0 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/transactions/index.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/transactions/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) { describe('transactions', () => { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/transactions/latency.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/transactions/latency.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/transactions/latency.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/transactions/latency.spec.ts index df72ca433340c..20890318fb37b 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/transactions/latency.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/transactions/latency.spec.ts @@ -18,7 +18,7 @@ import { meanBy } from 'lodash'; import { ApmDocumentType } from '@kbn/apm-plugin/common/document_type'; import { RollupInterval } from '@kbn/apm-plugin/common/rollup'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; type LatencyChartReturnType = APIReturnType<'GET /internal/apm/services/{serviceName}/transactions/charts/latency'>; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/transactions/latency_overall_distribution.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/transactions/latency_overall_distribution.spec.ts similarity index 98% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/transactions/latency_overall_distribution.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/transactions/latency_overall_distribution.spec.ts index 2b78a7b10088d..b527f60a8968a 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/transactions/latency_overall_distribution.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/transactions/latency_overall_distribution.spec.ts @@ -7,7 +7,7 @@ import expect from '@kbn/expect'; import { LatencyDistributionChartType } from '@kbn/apm-plugin/common/latency_distribution_chart_types'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { ARCHIVER_ROUTES } from '../constants/archiver'; export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/transactions/trace_samples.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/transactions/trace_samples.spec.ts similarity index 97% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/transactions/trace_samples.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/transactions/trace_samples.spec.ts index 004165905916d..d33047e647ad5 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/transactions/trace_samples.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/transactions/trace_samples.spec.ts @@ -7,7 +7,7 @@ import expect from '@kbn/expect'; import archives from '../constants/archives_metadata'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) { const apmApiClient = getService('apmApi'); diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/transactions/transactions_groups_alerts.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/transactions/transactions_groups_alerts.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/transactions/transactions_groups_alerts.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/transactions/transactions_groups_alerts.spec.ts index 7fd74d0efc6b6..710d2984f282d 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/transactions/transactions_groups_alerts.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/transactions/transactions_groups_alerts.spec.ts @@ -15,7 +15,7 @@ import { AggregationType } from '@kbn/apm-plugin/common/rules/apm_rule_types'; import { ApmRuleType } from '@kbn/rule-data-utils'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; import type { RoleCredentials } from '@kbn/ftr-common-functional-services'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { APM_ACTION_VARIABLE_INDEX, APM_ALERTS_INDEX } from '../alerts/helpers/alerting_helper'; type TransactionsGroupsMainStatistics = diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/transactions/transactions_groups_detailed_statistics.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/transactions/transactions_groups_detailed_statistics.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/transactions/transactions_groups_detailed_statistics.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/transactions/transactions_groups_detailed_statistics.spec.ts index bc0ea9e1f501d..f4c996d329e5a 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/transactions/transactions_groups_detailed_statistics.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/transactions/transactions_groups_detailed_statistics.spec.ts @@ -13,8 +13,8 @@ import { APIReturnType } from '@kbn/apm-plugin/public/services/rest/create_call_ import { RollupInterval } from '@kbn/apm-plugin/common/rollup'; import { ApmDocumentType, ApmTransactionDocumentType } from '@kbn/apm-plugin/common/document_type'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; -import { roundNumber } from '../../../../../../apm_api_integration/utils'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import { roundNumber } from '../../../../apm_api_integration/utils'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; type TransactionsGroupsDetailedStatistics = APIReturnType<'GET /internal/apm/services/{serviceName}/transactions/groups/detailed_statistics'>; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/transactions/transactions_groups_main_statistics.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/transactions/transactions_groups_main_statistics.spec.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/transactions/transactions_groups_main_statistics.spec.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/transactions/transactions_groups_main_statistics.spec.ts index df86780629f4d..df71c059e0e6f 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/transactions/transactions_groups_main_statistics.spec.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/transactions/transactions_groups_main_statistics.spec.ts @@ -12,7 +12,7 @@ import { ApmDocumentType, ApmTransactionDocumentType } from '@kbn/apm-plugin/com import { RollupInterval } from '@kbn/apm-plugin/common/rollup'; import { apm, timerange } from '@kbn/apm-synthtrace-client'; import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) { const apmApiClient = getService('apmApi'); diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/utils/common.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/utils/common.ts similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/utils/common.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/utils/common.ts diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/chart_preview.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality/chart_preview.ts similarity index 98% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/chart_preview.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality/chart_preview.ts index 453d80c052a7e..55610b50adefe 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/chart_preview.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality/chart_preview.ts @@ -9,8 +9,8 @@ import { LogsSynthtraceEsClient } from '@kbn/apm-synthtrace'; import { log, timerange } from '@kbn/apm-synthtrace-client'; import expect from '@kbn/expect'; import rison from '@kbn/rison'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; -import { SupertestWithRoleScopeType } from '../../../services'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; +import { SupertestWithRoleScopeType } from '../../services'; const MORE_THAN_1024_CHARS = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?'; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/check_and_load_integration.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality/check_and_load_integration.ts similarity index 98% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/check_and_load_integration.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality/check_and_load_integration.ts index 801b5cde58833..00e3248c389b3 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/check_and_load_integration.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality/check_and_load_integration.ts @@ -9,8 +9,8 @@ import { log, timerange } from '@kbn/apm-synthtrace-client'; import expect from '@kbn/expect'; import { LogsSynthtraceEsClient } from '@kbn/apm-synthtrace'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; -import { RoleCredentials, SupertestWithRoleScopeType } from '../../../services'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; +import { RoleCredentials, SupertestWithRoleScopeType } from '../../services'; export default function ({ getService }: DeploymentAgnosticFtrProviderContext) { const samlAuth = getService('samlAuth'); diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/custom_mappings/custom_synth_mappings.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality/custom_mappings/custom_synth_mappings.ts similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/custom_mappings/custom_synth_mappings.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality/custom_mappings/custom_synth_mappings.ts diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/data_stream_details.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality/data_stream_details.ts similarity index 96% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/data_stream_details.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality/data_stream_details.ts index 0db5e12e2b101..c9d6f8afe0540 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/data_stream_details.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality/data_stream_details.ts @@ -9,8 +9,8 @@ import { LogsSynthtraceEsClient } from '@kbn/apm-synthtrace'; import expect from '@kbn/expect'; import { log, timerange } from '@kbn/apm-synthtrace-client'; -import { SupertestWithRoleScopeType } from '../../../services'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { SupertestWithRoleScopeType } from '../../services'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; export default function ({ getService }: DeploymentAgnosticFtrProviderContext) { const roleScopedSupertest = getService('roleScopedSupertest'); diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/data_stream_rollover.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality/data_stream_rollover.ts similarity index 94% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/data_stream_rollover.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality/data_stream_rollover.ts index 9936458f0df31..60ce209bfc5d7 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/data_stream_rollover.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality/data_stream_rollover.ts @@ -9,8 +9,8 @@ import { log, timerange } from '@kbn/apm-synthtrace-client'; import expect from '@kbn/expect'; import { LogsSynthtraceEsClient } from '@kbn/apm-synthtrace'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; -import { SupertestWithRoleScopeType } from '../../../services'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; +import { SupertestWithRoleScopeType } from '../../services'; export default function ({ getService }: DeploymentAgnosticFtrProviderContext) { const roleScopedSupertest = getService('roleScopedSupertest'); diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/data_stream_settings.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality/data_stream_settings.ts similarity index 98% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/data_stream_settings.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality/data_stream_settings.ts index 66c91c73fce6e..2efe713bc1b49 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/data_stream_settings.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality/data_stream_settings.ts @@ -14,8 +14,8 @@ import { getDataStreamSettingsOfEarliestIndex, rolloverDataStream, } from './utils'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; -import { RoleCredentials, SupertestWithRoleScopeType } from '../../../services'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; +import { RoleCredentials, SupertestWithRoleScopeType } from '../../services'; export default function ({ getService }: DeploymentAgnosticFtrProviderContext) { const samlAuth = getService('samlAuth'); diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/data_stream_total_docs.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality/data_stream_total_docs.ts similarity index 97% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/data_stream_total_docs.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality/data_stream_total_docs.ts index c89dea507b0ec..315837ba508b2 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/data_stream_total_docs.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality/data_stream_total_docs.ts @@ -10,8 +10,8 @@ import expect from '@kbn/expect'; import { APIClientRequestParamsOf } from '@kbn/dataset-quality-plugin/common/rest'; import { LogsSynthtraceEsClient } from '@kbn/apm-synthtrace'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; -import { RoleCredentials, SupertestWithRoleScopeType } from '../../../services'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; +import { RoleCredentials, SupertestWithRoleScopeType } from '../../services'; export default function ({ getService }: DeploymentAgnosticFtrProviderContext) { const samlAuth = getService('samlAuth'); diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/data_streams_failure_store.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality/data_streams_failure_store.ts similarity index 97% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/data_streams_failure_store.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality/data_streams_failure_store.ts index 0f86df12ae8fb..8ffca16a44625 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/data_streams_failure_store.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality/data_streams_failure_store.ts @@ -8,7 +8,7 @@ import { LogsSynthtraceEsClient } from '@kbn/apm-synthtrace'; import { log, timerange } from '@kbn/apm-synthtrace-client'; import expect from '@kbn/expect'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; export default function ({ getService }: DeploymentAgnosticFtrProviderContext) { const synthtrace = getService('synthtrace'); diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/degraded_docs.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality/degraded_docs.ts similarity index 98% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/degraded_docs.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality/degraded_docs.ts index 422d14eb5667a..16ede697874d5 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/degraded_docs.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality/degraded_docs.ts @@ -10,8 +10,8 @@ import expect from '@kbn/expect'; import rison from '@kbn/rison'; import { log, timerange } from '@kbn/apm-synthtrace-client'; import { DataStreamDocsStat } from '@kbn/dataset-quality-plugin/common/api_types'; -import { SupertestWithRoleScopeType } from '../../../services'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { SupertestWithRoleScopeType } from '../../services'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; export default function ({ getService }: DeploymentAgnosticFtrProviderContext) { const roleScopedSupertest = getService('roleScopedSupertest'); diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/degraded_field_analyze.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality/degraded_field_analyze.ts similarity index 98% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/degraded_field_analyze.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality/degraded_field_analyze.ts index 1f77cb0f9bdf0..daeba8355d983 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/degraded_field_analyze.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality/degraded_field_analyze.ts @@ -8,8 +8,8 @@ import expect from '@kbn/expect'; import { log, timerange } from '@kbn/apm-synthtrace-client'; import { LogsSynthtraceEsClient } from '@kbn/apm-synthtrace'; -import { SupertestWithRoleScopeType } from '../../../services'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { SupertestWithRoleScopeType } from '../../services'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; import { createBackingIndexNameWithoutVersion, setDataStreamSettings } from './utils'; import { logsSynthMappings } from './custom_mappings/custom_synth_mappings'; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/degraded_field_values.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality/degraded_field_values.ts similarity index 97% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/degraded_field_values.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality/degraded_field_values.ts index b1c12dc793d15..ef23c7a904443 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/degraded_field_values.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality/degraded_field_values.ts @@ -9,8 +9,8 @@ import { LogsSynthtraceEsClient } from '@kbn/apm-synthtrace'; import expect from '@kbn/expect'; import { log, timerange } from '@kbn/apm-synthtrace-client'; -import { SupertestWithRoleScopeType } from '../../../services'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { SupertestWithRoleScopeType } from '../../services'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; const MORE_THAN_1024_CHARS = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?'; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/degraded_fields.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality/degraded_fields.ts similarity index 98% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/degraded_fields.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality/degraded_fields.ts index 507f9f4d3f59b..afc33b71a577d 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/degraded_fields.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality/degraded_fields.ts @@ -9,8 +9,8 @@ import { LogsSynthtraceEsClient } from '@kbn/apm-synthtrace'; import { log, timerange } from '@kbn/apm-synthtrace-client'; import expect from '@kbn/expect'; import { DegradedField } from '@kbn/dataset-quality-plugin/common/api_types'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; -import { SupertestWithRoleScopeType } from '../../../services'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; +import { SupertestWithRoleScopeType } from '../../services'; import { rolloverDataStream } from './utils'; const MORE_THAN_1024_CHARS = diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/failed_docs.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality/failed_docs.ts similarity index 97% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/failed_docs.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality/failed_docs.ts index 767abde9c0464..75b6e0a44a499 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/failed_docs.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality/failed_docs.ts @@ -10,8 +10,8 @@ import expect from '@kbn/expect'; import rison from '@kbn/rison'; import { log, timerange } from '@kbn/apm-synthtrace-client'; import { DataStreamDocsStat } from '@kbn/dataset-quality-plugin/common/api_types'; -import { SupertestWithRoleScopeType } from '../../../services'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { SupertestWithRoleScopeType } from '../../services'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; import { processors } from './processors'; export default function ({ getService }: DeploymentAgnosticFtrProviderContext) { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/failed_docs_errors.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality/failed_docs_errors.ts similarity index 97% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/failed_docs_errors.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality/failed_docs_errors.ts index 5fa059b06c903..4c3d25d81d8e6 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/failed_docs_errors.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality/failed_docs_errors.ts @@ -8,8 +8,8 @@ import { LogsSynthtraceEsClient } from '@kbn/apm-synthtrace'; import expect from '@kbn/expect'; import { log, timerange } from '@kbn/apm-synthtrace-client'; -import { SupertestWithRoleScopeType } from '../../../services'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { SupertestWithRoleScopeType } from '../../services'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; import { processors } from './processors'; export default function ({ getService }: DeploymentAgnosticFtrProviderContext) { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/failed_docs_stats.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality/failed_docs_stats.ts similarity index 97% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/failed_docs_stats.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality/failed_docs_stats.ts index 611b41c0e084b..b57d2d0569491 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/failed_docs_stats.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality/failed_docs_stats.ts @@ -8,8 +8,8 @@ import { LogsSynthtraceEsClient } from '@kbn/apm-synthtrace'; import expect from '@kbn/expect'; import { log, timerange } from '@kbn/apm-synthtrace-client'; -import { SupertestWithRoleScopeType } from '../../../services'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { SupertestWithRoleScopeType } from '../../services'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; import { processors } from './processors'; export default function ({ getService }: DeploymentAgnosticFtrProviderContext) { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/index.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality/index.ts similarity index 94% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/index.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality/index.ts index e33156b4900ee..a1d099797049a 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/index.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) { describe('Dataset quality', () => { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/integration_dashboards.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality/integration_dashboards.ts similarity index 97% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/integration_dashboards.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality/integration_dashboards.ts index f0207d208cafb..fbd07e19e9e0b 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/integration_dashboards.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality/integration_dashboards.ts @@ -7,8 +7,8 @@ import expect from '@kbn/expect'; import { CustomIntegration } from '@kbn/test-suites-xpack-platform/api_integration_deployment_agnostic/services/package_api'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; -import { RoleCredentials, SupertestWithRoleScopeType } from '../../../services'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; +import { RoleCredentials, SupertestWithRoleScopeType } from '../../services'; export default function ({ getService }: DeploymentAgnosticFtrProviderContext) { const samlAuth = getService('samlAuth'); diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/integrations.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality/integrations.ts similarity index 98% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/integrations.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality/integrations.ts index f22980330d990..fd318ae9b1021 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/integrations.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality/integrations.ts @@ -9,8 +9,8 @@ import expect from '@kbn/expect'; import { v4 as uuid } from 'uuid'; import { APIReturnType } from '@kbn/dataset-quality-plugin/common/rest'; import { CustomIntegration } from '@kbn/test-suites-xpack-platform/api_integration_deployment_agnostic/services/package_api'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; -import { RoleCredentials, SupertestWithRoleScopeType } from '../../../services'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; +import { RoleCredentials, SupertestWithRoleScopeType } from '../../services'; export default function ({ getService }: DeploymentAgnosticFtrProviderContext) { const samlAuth = getService('samlAuth'); diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/processors/index.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality/processors/index.ts similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/processors/index.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality/processors/index.ts diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/update_field_limit.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality/update_field_limit.ts similarity index 98% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/update_field_limit.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality/update_field_limit.ts index a4721c2e9fa41..fc9411a0a7856 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/update_field_limit.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality/update_field_limit.ts @@ -9,8 +9,8 @@ import expect from '@kbn/expect'; import { log, timerange } from '@kbn/apm-synthtrace-client'; import { LogsSynthtraceEsClient } from '@kbn/apm-synthtrace'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; -import { RoleCredentials, SupertestWithRoleScopeType } from '../../../services'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; +import { RoleCredentials, SupertestWithRoleScopeType } from '../../services'; import { createBackingIndexNameWithoutVersion, rolloverDataStream } from './utils/es_utils'; export default function ({ getService }: DeploymentAgnosticFtrProviderContext) { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/utils/es_utils.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality/utils/es_utils.ts similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/utils/es_utils.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality/utils/es_utils.ts diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/utils/index.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality/utils/index.ts similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/utils/index.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/dataset_quality/utils/index.ts diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/incident_management/fixtures/dashboards_default_space.ndjson b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/incident_management/fixtures/dashboards_default_space.ndjson similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/incident_management/fixtures/dashboards_default_space.ndjson rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/incident_management/fixtures/dashboards_default_space.ndjson diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/incident_management/fixtures/dashboards_test_space.ndjson b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/incident_management/fixtures/dashboards_test_space.ndjson similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/incident_management/fixtures/dashboards_test_space.ndjson rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/incident_management/fixtures/dashboards_test_space.ndjson diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/incident_management/index.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/incident_management/index.ts similarity index 83% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/incident_management/index.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/incident_management/index.ts index 93702df188cff..5dc6bbb87868a 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/incident_management/index.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/incident_management/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) { describe('Incident Management', () => { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/incident_management/suggested_dashboards.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/incident_management/suggested_dashboards.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/incident_management/suggested_dashboards.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/incident_management/suggested_dashboards.ts index 37dc90b73a465..b83d8cbe222f9 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/incident_management/suggested_dashboards.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/incident_management/suggested_dashboards.ts @@ -13,7 +13,7 @@ import { Aggregators } from '@kbn/observability-plugin/common/custom_threshold_r import { COMPARATORS } from '@kbn/alerting-comparators'; import { OBSERVABILITY_THRESHOLD_RULE_TYPE_ID } from '@kbn/rule-data-utils'; import { ALERTS_API_URLS } from '@kbn/observability-plugin/common/constants'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; export default function ({ getService }: DeploymentAgnosticFtrProviderContext) { const CUSTOM_THRESHOLD_RULE_ALERT_INDEX = '.alerts-observability.threshold.alerts-default'; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/infra/index.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/infra/index.ts similarity index 97% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/infra/index.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/infra/index.ts index 23c002ace5ae1..d9cd1bd0554c6 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/infra/index.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/infra/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) { describe('Infrastructure', () => { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/infra/infra.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/infra/infra.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/infra/infra.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/infra/infra.ts index 6ad6b1799ce91..a8d0166141868 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/infra/infra.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/infra/infra.ts @@ -10,9 +10,9 @@ import { GetInfraMetricsRequestBodyPayloadClient, GetInfraMetricsResponsePayload, } from '@kbn/infra-plugin/common/http_api/infra'; -import type { SupertestWithRoleScopeType } from '../../../services'; +import type { SupertestWithRoleScopeType } from '../../services'; import { DATES } from './utils/constants'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; const ENDPOINT = '/api/metrics/infra/host'; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/infra/infra_asset_count.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/infra/infra_asset_count.ts similarity index 96% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/infra/infra_asset_count.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/infra/infra_asset_count.ts index c76e7dbff888c..9d4605d8a29a7 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/infra/infra_asset_count.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/infra/infra_asset_count.ts @@ -11,8 +11,8 @@ import type { GetInfraAssetCountResponsePayload, GetInfraAssetCountRequestParamsPayload, } from '@kbn/infra-plugin/common/http_api'; -import type { SupertestWithRoleScopeType } from '../../../services'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import type { SupertestWithRoleScopeType } from '../../services'; +import type { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; import { DATES } from './utils/constants'; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/infra/inventory_threshold_alert.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/infra/inventory_threshold_alert.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/infra/inventory_threshold_alert.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/infra/inventory_threshold_alert.ts index a57df6c06d426..193ff12f136dc 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/infra/inventory_threshold_alert.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/infra/inventory_threshold_alert.ts @@ -11,7 +11,7 @@ import { InventoryItemType, SnapshotMetricType } from '@kbn/metrics-data-access- import { evaluateCondition } from '@kbn/infra-plugin/server/lib/alerting/inventory_metric_threshold/evaluate_condition'; import { InfraSource } from '@kbn/infra-plugin/server/lib/sources'; import { COMPARATORS } from '@kbn/alerting-comparators'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; import { DATES } from './utils/constants'; import { createFakeLogger } from './utils/create_fake_logger'; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/infra/ip_to_hostname.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/infra/ip_to_hostname.ts similarity index 94% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/infra/ip_to_hostname.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/infra/ip_to_hostname.ts index 084a7ea9ac276..ae536508f9541 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/infra/ip_to_hostname.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/infra/ip_to_hostname.ts @@ -6,8 +6,8 @@ */ import expect from '@kbn/expect'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; -import type { SupertestWithRoleScopeType } from '../../../services'; +import type { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; +import type { SupertestWithRoleScopeType } from '../../services'; export default function ipToHostNameTest({ getService }: DeploymentAgnosticFtrProviderContext) { const roleScopedSupertest = getService('roleScopedSupertest'); diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/infra/metadata.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/infra/metadata.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/infra/metadata.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/infra/metadata.ts index e6f2b6ef625ab..ef7b529476f25 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/infra/metadata.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/infra/metadata.ts @@ -10,8 +10,8 @@ import { InfraMetadata, InfraMetadataRequest, } from '@kbn/infra-plugin/common/http_api/metadata_api'; -import type { SupertestWithRoleScopeType } from '../../../services'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import type { SupertestWithRoleScopeType } from '../../services'; +import type { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; import { DATES } from './utils/constants'; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/infra/metrics_overview_top.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/infra/metrics_overview_top.ts similarity index 97% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/infra/metrics_overview_top.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/infra/metrics_overview_top.ts index 2a1ee8d3e6821..a18a694bd903a 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/infra/metrics_overview_top.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/infra/metrics_overview_top.ts @@ -11,8 +11,8 @@ import { TopNodesResponseRT, } from '@kbn/infra-plugin/common/http_api/overview_api'; import { decodeOrThrow } from '@kbn/io-ts-utils'; -import type { SupertestWithRoleScopeType } from '../../../services'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import type { SupertestWithRoleScopeType } from '../../services'; +import type { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; import { DATES } from './utils/constants'; export default function ({ getService }: DeploymentAgnosticFtrProviderContext) { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/infra/metrics_process_list.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/infra/metrics_process_list.ts similarity index 95% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/infra/metrics_process_list.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/infra/metrics_process_list.ts index 7d024a6e169c4..77279e8a50c18 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/infra/metrics_process_list.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/infra/metrics_process_list.ts @@ -11,8 +11,8 @@ import { ProcessListAPIResponseRT, } from '@kbn/infra-plugin/common/http_api/host_details/process_list'; import { decodeOrThrow } from '@kbn/io-ts-utils'; -import type { SupertestWithRoleScopeType } from '../../../services'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import type { SupertestWithRoleScopeType } from '../../services'; +import type { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; export default function ({ getService }: DeploymentAgnosticFtrProviderContext) { const esArchiver = getService('esArchiver'); diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/infra/metrics_process_list_chart.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/infra/metrics_process_list_chart.ts similarity index 95% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/infra/metrics_process_list_chart.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/infra/metrics_process_list_chart.ts index 1761d5fb2969f..8e2b23befe6d4 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/infra/metrics_process_list_chart.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/infra/metrics_process_list_chart.ts @@ -11,8 +11,8 @@ import { ProcessListAPIChartResponseRT, } from '@kbn/infra-plugin/common/http_api/host_details/process_list'; import { decodeOrThrow } from '@kbn/io-ts-utils'; -import type { SupertestWithRoleScopeType } from '../../../services'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import type { SupertestWithRoleScopeType } from '../../services'; +import type { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; export default function ({ getService }: DeploymentAgnosticFtrProviderContext) { const esArchiver = getService('esArchiver'); diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/infra/node_details.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/infra/node_details.ts similarity index 97% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/infra/node_details.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/infra/node_details.ts index 7452c319be911..ac7222f013ea3 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/infra/node_details.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/infra/node_details.ts @@ -10,8 +10,8 @@ import { first, last } from 'lodash'; import { InfraTimerangeInput } from '@kbn/infra-plugin/common/http_api/snapshot_api'; import { InventoryMetric } from '@kbn/metrics-data-access-plugin/common'; import { NodeDetailsMetricDataResponse } from '@kbn/infra-plugin/common/http_api/node_details_api'; -import type { SupertestWithRoleScopeType } from '../../../services'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import type { SupertestWithRoleScopeType } from '../../services'; +import type { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; import { DATES } from './utils/constants'; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/infra/services.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/infra/services.ts similarity index 98% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/infra/services.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/infra/services.ts index b8e47a40a9120..b6d232941c317 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/infra/services.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/infra/services.ts @@ -10,8 +10,8 @@ import { ServicesAPIResponseRT } from '@kbn/infra-plugin/common/http_api/host_de import { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; import { decodeOrThrow } from '@kbn/io-ts-utils'; import { apm, timerange } from '@kbn/apm-synthtrace-client'; -import type { SupertestWithRoleScopeType } from '../../../services'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import type { SupertestWithRoleScopeType } from '../../services'; +import type { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; const SERVICES_ENDPOINT = '/api/infra/services'; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/infra/snapshot.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/infra/snapshot.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/infra/snapshot.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/infra/snapshot.ts index f3636662f2b54..21f34f9c617f3 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/infra/snapshot.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/infra/snapshot.ts @@ -12,8 +12,8 @@ import { SnapshotMetricInput, SnapshotRequest, } from '@kbn/infra-plugin/common/http_api/snapshot_api'; -import type { SupertestWithRoleScopeType } from '../../../services'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import type { SupertestWithRoleScopeType } from '../../services'; +import type { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; import { DATES } from './utils/constants'; export default function ({ getService }: DeploymentAgnosticFtrProviderContext) { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/infra/sources.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/infra/sources.ts similarity index 98% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/infra/sources.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/infra/sources.ts index 0710c5112b0fe..77f7520f8f914 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/infra/sources.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/infra/sources.ts @@ -11,8 +11,8 @@ import { PartialMetricsSourceConfigurationProperties, metricsSourceConfigurationResponseRT, } from '@kbn/infra-plugin/common/metrics_sources'; -import type { SupertestWithRoleScopeType } from '../../../services'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import type { SupertestWithRoleScopeType } from '../../services'; +import type { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; const SOURCE_API_URL = '/api/metrics/source'; const SOURCE_ID = 'default'; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/infra/utils/constants.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/infra/utils/constants.ts similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/infra/utils/constants.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/infra/utils/constants.ts diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/infra/utils/create_fake_logger.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/infra/utils/create_fake_logger.ts similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/infra/utils/create_fake_logger.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/infra/utils/create_fake_logger.ts diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/onboarding/get_progress.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/onboarding/get_progress.ts similarity index 98% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/onboarding/get_progress.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/onboarding/get_progress.ts index 549d64d1f0093..0a021c9734039 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/onboarding/get_progress.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/onboarding/get_progress.ts @@ -8,8 +8,8 @@ import expect from '@kbn/expect'; import { type LogsSynthtraceEsClient } from '@kbn/apm-synthtrace'; import { log, timerange } from '@kbn/apm-synthtrace-client'; -import { type DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; -import { type SupertestWithRoleScopeType } from '../../../services'; +import { type DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; +import { type SupertestWithRoleScopeType } from '../../services'; export default function ({ getService }: DeploymentAgnosticFtrProviderContext) { const roleScopedSupertest = getService('roleScopedSupertest'); diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/inspect/index.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/onboarding/index.ts similarity index 66% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/inspect/index.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/onboarding/index.ts index 8169a30a04d0f..1b483db9380b9 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/inspect/index.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/onboarding/index.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) { - describe('inspect', () => { - loadTestFile(require.resolve('./inspect.spec.ts')); + describe('Onboarding', () => { + loadTestFile(require.resolve('./get_progress')); }); } diff --git a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/onboarding/update_progress.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/onboarding/update_progress.ts new file mode 100644 index 0000000000000..174aa33fb9993 --- /dev/null +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/onboarding/update_progress.ts @@ -0,0 +1,122 @@ +/* + * 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. + */ + +import expect from '@kbn/expect'; +import { OBSERVABILITY_ONBOARDING_STATE_SAVED_OBJECT_TYPE } from '@kbn/observability-onboarding-plugin/server/saved_objects/observability_onboarding_status'; +import { type DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; +import { type SupertestWithRoleScopeType } from '../../services'; + +export default function ({ getService }: DeploymentAgnosticFtrProviderContext) { + const kibanaServer = getService('kibanaServer'); + const roleScopedSupertest = getService('roleScopedSupertest'); + let adminClient: SupertestWithRoleScopeType; + let adminClientWithAPIKey: SupertestWithRoleScopeType; + + describe('Update step progress', () => { + before(async () => { + adminClient = await roleScopedSupertest.getSupertestWithRoleScope('admin', { + withInternalHeaders: true, + useCookieHeader: true, + }); + adminClientWithAPIKey = await roleScopedSupertest.getSupertestWithRoleScope('admin', { + withInternalHeaders: true, + }); + }); + + after(async () => { + await adminClientWithAPIKey.destroy(); + }); + + describe("when onboardingId doesn't exists", () => { + it('fails with a 404 error', async () => { + const response = await adminClient + .post(`/internal/observability_onboarding/flow/test-onboarding-id/step/ea-download`) + .send({ + status: 'complete', + }); + + expect(response.status).to.be(404); + expect(response.body.message).to.contain('onboarding session not found'); + }); + }); + + describe('when onboardingId exists', () => { + let onboardingId: string; + + beforeEach(async () => { + const createFlowResponse = await adminClient.post( + '/internal/observability_onboarding/flow' + ); + + onboardingId = createFlowResponse.body.onboardingFlow.id; + + const savedState = await kibanaServer.savedObjects.get({ + type: OBSERVABILITY_ONBOARDING_STATE_SAVED_OBJECT_TYPE, + id: onboardingId, + }); + + expect(savedState.attributes.progress).eql({}); + }); + + afterEach(async () => { + await kibanaServer.savedObjects.delete({ + type: OBSERVABILITY_ONBOARDING_STATE_SAVED_OBJECT_TYPE, + id: onboardingId, + }); + }); + + it('updates step status', async () => { + const step = { + name: 'ea-download', + status: 'complete', + }; + + const response = await adminClientWithAPIKey + .post(`/internal/observability_onboarding/flow/${onboardingId}/step/${step.name}`) + .send({ + status: step.status, + }); + + expect(response.status).to.be(200); + + const savedState = await kibanaServer.savedObjects.get({ + type: OBSERVABILITY_ONBOARDING_STATE_SAVED_OBJECT_TYPE, + id: onboardingId, + }); + + const stepProgress = savedState.attributes.progress?.[step.name]; + expect(stepProgress).to.have.property('status', step.status); + }); + + it('updates step status with message', async () => { + const message = 'Download failed'; + const step = { + name: 'ea-download', + status: 'danger', + message: Buffer.from(message, 'utf8').toString('base64'), + }; + const response = await adminClientWithAPIKey + .post(`/internal/observability_onboarding/flow/${onboardingId}/step/${step.name}`) + .send({ + status: step.status, + message: step.message, + }); + + expect(response.status).to.be(200); + + const savedState = await kibanaServer.savedObjects.get({ + type: OBSERVABILITY_ONBOARDING_STATE_SAVED_OBJECT_TYPE, + id: onboardingId, + }); + + const stepProgress = savedState.attributes.progress?.[step.name]; + expect(stepProgress).to.have.property('status', step.status); + expect(stepProgress).to.have.property('message', message); + }); + }); + }); +} diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/slo/bulk_delete.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/slo/bulk_delete.ts similarity index 97% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/slo/bulk_delete.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/slo/bulk_delete.ts index 242a2901fa10d..c9d8a1996c7b6 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/slo/bulk_delete.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/slo/bulk_delete.ts @@ -8,7 +8,7 @@ import { cleanup, generate } from '@kbn/data-forge'; import expect from '@kbn/expect'; import { RoleCredentials } from '@kbn/ftr-common-functional-services'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; import { DATA_FORGE_CONFIG } from './helpers/dataforge'; import { DEFAULT_SLO } from './fixtures/slo'; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/slo/create_slo.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/slo/create_slo.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/slo/create_slo.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/slo/create_slo.ts index 8baf22cb40477..856bdb6f0ee51 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/slo/create_slo.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/slo/create_slo.ts @@ -10,7 +10,7 @@ import expect from '@kbn/expect'; import { RoleCredentials } from '@kbn/ftr-common-functional-services'; import { getSLOSummaryTransformId, getSLOTransformId } from '@kbn/slo-plugin/common/constants'; import { omit } from 'lodash'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; import { DEFAULT_SLO } from './fixtures/slo'; import { DATA_FORGE_CONFIG } from './helpers/dataforge'; import { TransformHelper, createTransformHelper } from './helpers/transform'; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/slo/delete_slo.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/slo/delete_slo.ts similarity index 97% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/slo/delete_slo.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/slo/delete_slo.ts index d1e3fe6e53b68..d4e7bf567e253 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/slo/delete_slo.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/slo/delete_slo.ts @@ -14,7 +14,7 @@ import { getSLOSummaryTransformId, getSLOTransformId, } from '@kbn/slo-plugin/common/constants'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; import { DEFAULT_SLO } from './fixtures/slo'; import { DATA_FORGE_CONFIG } from './helpers/dataforge'; import { TransformHelper, createTransformHelper } from './helpers/transform'; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/slo/find_slo.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/slo/find_slo.ts similarity index 97% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/slo/find_slo.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/slo/find_slo.ts index 111d0b6ba3edc..1bc77818f30a9 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/slo/find_slo.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/slo/find_slo.ts @@ -8,7 +8,7 @@ import { cleanup, generate } from '@kbn/data-forge'; import expect from '@kbn/expect'; import { InternalRequestHeader, RoleCredentials } from '@kbn/ftr-common-functional-services'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; import { DEFAULT_SLO } from './fixtures/slo'; import { DATA_FORGE_CONFIG } from './helpers/dataforge'; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/slo/find_slo_definition.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/slo/find_slo_definition.ts similarity index 97% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/slo/find_slo_definition.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/slo/find_slo_definition.ts index cc4100f974829..d8ec7ba5de17f 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/slo/find_slo_definition.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/slo/find_slo_definition.ts @@ -8,7 +8,7 @@ import { cleanup, generate } from '@kbn/data-forge'; import expect from '@kbn/expect'; import { RoleCredentials } from '@kbn/ftr-common-functional-services'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; import { DEFAULT_SLO } from './fixtures/slo'; import { DATA_FORGE_CONFIG } from './helpers/dataforge'; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/slo/fixtures/slo.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/slo/fixtures/slo.ts similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/slo/fixtures/slo.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/slo/fixtures/slo.ts diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/slo/get_slo.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/slo/get_slo.ts similarity index 96% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/slo/get_slo.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/slo/get_slo.ts index 7a27c3b36fb0d..f201788a87b33 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/slo/get_slo.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/slo/get_slo.ts @@ -8,7 +8,7 @@ import { cleanup, generate } from '@kbn/data-forge'; import expect from '@kbn/expect'; import { RoleCredentials } from '@kbn/ftr-common-functional-services'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; import { DEFAULT_SLO } from './fixtures/slo'; import { DATA_FORGE_CONFIG } from './helpers/dataforge'; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/slo/helpers/dataforge.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/slo/helpers/dataforge.ts similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/slo/helpers/dataforge.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/slo/helpers/dataforge.ts diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/slo/helpers/transform.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/slo/helpers/transform.ts similarity index 95% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/slo/helpers/transform.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/slo/helpers/transform.ts index 37b6ff1396c56..c92a18b69d4c3 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/slo/helpers/transform.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/slo/helpers/transform.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; export type TransformHelper = ReturnType; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/slo/index.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/slo/index.ts similarity index 90% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/slo/index.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/slo/index.ts index 31ccc819d6c29..b59193f0025a8 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/slo/index.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/slo/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) { describe('SLO', () => { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/slo/reset_slo.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/slo/reset_slo.ts similarity index 96% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/slo/reset_slo.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/slo/reset_slo.ts index baf0b5eb52dde..d2c3107b09822 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/slo/reset_slo.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/slo/reset_slo.ts @@ -9,7 +9,7 @@ import { cleanup, generate } from '@kbn/data-forge'; import expect from '@kbn/expect'; import { RoleCredentials } from '@kbn/ftr-common-functional-services'; import { SLO_MODEL_VERSION, getSLOPipelineId } from '@kbn/slo-plugin/common/constants'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; import { DEFAULT_SLO } from './fixtures/slo'; import { DATA_FORGE_CONFIG } from './helpers/dataforge'; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/slo/update_slo.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/slo/update_slo.ts similarity index 97% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/slo/update_slo.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/slo/update_slo.ts index 8946f2d613a99..955678c32c342 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/slo/update_slo.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/slo/update_slo.ts @@ -9,7 +9,7 @@ import { cleanup, generate } from '@kbn/data-forge'; import expect from '@kbn/expect'; import { RoleCredentials } from '@kbn/ftr-common-functional-services'; import { getSLOSummaryTransformId, getSLOTransformId } from '@kbn/slo-plugin/common/constants'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; import { DEFAULT_SLO } from './fixtures/slo'; import { DATA_FORGE_CONFIG } from './helpers/dataforge'; import { TransformHelper, createTransformHelper } from './helpers/transform'; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/assets/dashboard.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/assets/dashboard.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/assets/dashboard.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/assets/dashboard.ts index c0216139a9ae5..39585ea31a2d9 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/assets/dashboard.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/assets/dashboard.ts @@ -10,7 +10,7 @@ import { StreamsSupertestRepositoryClient, createStreamsRepositoryAdminClient, } from '../helpers/repository_client'; -import { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { loadDashboards, unloadDashboards } from '../helpers/dashboards'; export default function ({ getService }: DeploymentAgnosticFtrProviderContext) { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/basic.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/basic.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/basic.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/basic.ts index 036e061fa3720..c1d0979a9589b 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/basic.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/basic.ts @@ -10,7 +10,7 @@ import { FieldDefinition, Streams } from '@kbn/streams-schema'; import { MAX_PRIORITY } from '@kbn/streams-plugin/server/lib/streams/index_templates/generate_index_template'; import { InheritedFieldDefinition } from '@kbn/streams-schema/src/fields'; import { get, omit } from 'lodash'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; import { StreamsSupertestRepositoryClient, createStreamsRepositoryAdminClient, diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/classic.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/classic.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/classic.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/classic.ts index 828c31ea18a24..6686c034f4092 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/classic.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/classic.ts @@ -8,7 +8,7 @@ import expect from '@kbn/expect'; import { Streams } from '@kbn/streams-schema'; import { isNotFoundError } from '@kbn/es-errors'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; import { StreamsSupertestRepositoryClient, createStreamsRepositoryAdminClient, diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/conflicts.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/conflicts.ts similarity index 96% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/conflicts.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/conflicts.ts index cf4f495e73c29..0bdb086f87827 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/conflicts.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/conflicts.ts @@ -6,7 +6,7 @@ */ import expect from '@kbn/expect'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; import { disableStreams, enableStreams, forkStream } from './helpers/requests'; import { StreamsSupertestRepositoryClient, diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/content.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/content.ts similarity index 98% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/content.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/content.ts index 1e53daa8060f8..ffb00052196c4 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/content.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/content.ts @@ -16,7 +16,7 @@ import { findConfiguration, isSupportedSavedObjectType, } from '@kbn/content-packs-schema'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; import { StreamsSupertestRepositoryClient, createStreamsRepositoryAdminClient, diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/discover.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/discover.ts similarity index 97% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/discover.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/discover.ts index 828dfcccfd19b..6dc9be151dd93 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/discover.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/discover.ts @@ -6,7 +6,7 @@ */ import expect from '@kbn/expect'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; import { StreamsSupertestRepositoryClient, createStreamsRepositoryAdminClient, diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/enrichment.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/enrichment.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/enrichment.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/enrichment.ts index 04c0c4870837e..ca735b0935051 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/enrichment.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/enrichment.ts @@ -16,7 +16,7 @@ import { indexDocument, putStream, } from './helpers/requests'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; import { StreamsSupertestRepositoryClient, createStreamsRepositoryAdminClient, diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/flush_config.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/flush_config.ts similarity index 98% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/flush_config.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/flush_config.ts index 488f9ef519627..e4653bd2ebf26 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/flush_config.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/flush_config.ts @@ -7,7 +7,7 @@ import expect from '@kbn/expect'; import { Streams } from '@kbn/streams-schema'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; import { StreamsSupertestRepositoryClient, createStreamsRepositoryAdminClient, diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/group_streams.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/group_streams.ts similarity index 98% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/group_streams.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/group_streams.ts index e9ebcceac8fe7..f49f5b3c976eb 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/group_streams.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/group_streams.ts @@ -6,7 +6,7 @@ */ import expect from '@kbn/expect'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; import { StreamsSupertestRepositoryClient, createStreamsRepositoryAdminClient, diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/helpers/create_streams.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/helpers/create_streams.ts similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/helpers/create_streams.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/helpers/create_streams.ts diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/helpers/dashboards.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/helpers/dashboards.ts similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/helpers/dashboards.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/helpers/dashboards.ts diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/helpers/repository_client.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/helpers/repository_client.ts similarity index 92% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/helpers/repository_client.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/helpers/repository_client.ts index d0957af99393c..c91debe63a54a 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/helpers/repository_client.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/helpers/repository_client.ts @@ -11,7 +11,7 @@ import { RepositorySupertestClient, getAdminApiClient, getCustomRoleApiClient, -} from '../../../../../../common/utils/server_route_repository/create_admin_service_from_repository'; +} from '../../../../common/utils/server_route_repository/create_admin_service_from_repository'; export type StreamsSupertestRepositoryClient = RepositorySupertestClient; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/helpers/requests.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/helpers/requests.ts similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/helpers/requests.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/helpers/requests.ts diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/index.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/index.ts similarity index 98% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/index.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/index.ts index e8e0621f0b1ed..ee1d91493b576 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/index.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import type { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) { describe('Streams Endpoints', () => { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/lifecycle.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/lifecycle.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/lifecycle.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/lifecycle.ts index 021146c4216db..0974fd94649f7 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/lifecycle.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/lifecycle.ts @@ -21,7 +21,7 @@ import { getStream, getIlmStats, } from './helpers/requests'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; import { StreamsSupertestRepositoryClient, createStreamsRepositoryAdminClient, diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/meta_data.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/meta_data.ts similarity index 96% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/meta_data.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/meta_data.ts index c98e840127313..47f74c54182cf 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/meta_data.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/meta_data.ts @@ -7,7 +7,7 @@ import expect from '@kbn/expect'; import { Streams } from '@kbn/streams-schema'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; import { StreamsSupertestRepositoryClient, createStreamsRepositoryAdminClient, diff --git a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/metadata.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/metadata.ts new file mode 100644 index 0000000000000..47f74c54182cf --- /dev/null +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/metadata.ts @@ -0,0 +1,74 @@ +/* + * 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. + */ + +import expect from '@kbn/expect'; +import { Streams } from '@kbn/streams-schema'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; +import { + StreamsSupertestRepositoryClient, + createStreamsRepositoryAdminClient, +} from './helpers/repository_client'; +import { disableStreams, enableStreams, getStream, putStream } from './helpers/requests'; + +export default function ({ getService }: DeploymentAgnosticFtrProviderContext) { + const roleScopedSupertest = getService('roleScopedSupertest'); + let apiClient: StreamsSupertestRepositoryClient; + + describe('Stream metadata', () => { + before(async () => { + apiClient = await createStreamsRepositoryAdminClient(roleScopedSupertest); + await enableStreams(apiClient); + }); + + after(async () => { + await disableStreams(apiClient); + }); + + it('should set a description for a stream', async () => { + const body: Streams.WiredStream.UpsertRequest = { + dashboards: [], + queries: [], + stream: { + description: 'This is a test stream', + ingest: { + lifecycle: { inherit: {} }, + processing: [], + wired: { + fields: {}, + routing: [], + }, + }, + }, + }; + await putStream(apiClient, 'logs.test', body, 200); + + const response = await getStream(apiClient, 'logs.test'); + expect(response.stream).to.have.property('description', 'This is a test stream'); + }); + + it('should update a stream description', async () => { + const body: Streams.WiredStream.UpsertRequest = { + dashboards: [], + queries: [], + stream: { + description: 'Updated test stream description', + ingest: { + lifecycle: { inherit: {} }, + processing: [], + wired: { + fields: {}, + routing: [], + }, + }, + }, + }; + await putStream(apiClient, 'logs.test', body, 200); + const response = await getStream(apiClient, 'logs.test'); + expect(response.stream).to.have.property('description', 'Updated test stream description'); + }); + }); +} diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/migration_on_read.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/migration_on_read.ts similarity index 98% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/migration_on_read.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/migration_on_read.ts index 062699b04547b..54e96bcdccd12 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/migration_on_read.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/migration_on_read.ts @@ -7,7 +7,7 @@ import expect from '@kbn/expect'; import { Streams } from '@kbn/streams-schema'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; import { disableStreams, enableStreams, indexDocument } from './helpers/requests'; import { StreamsSupertestRepositoryClient, diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/processing_date_suggestions.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/processing_date_suggestions.ts similarity index 97% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/processing_date_suggestions.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/processing_date_suggestions.ts index d875f2dffa921..8a71c06adefee 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/processing_date_suggestions.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/processing_date_suggestions.ts @@ -9,7 +9,7 @@ import expect from '@kbn/expect'; import { ClientRequestParamsOf } from '@kbn/server-route-repository-utils'; import { StreamsRouteRepository } from '@kbn/streams-plugin/server'; import { disableStreams, enableStreams, forkStream } from './helpers/requests'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; import { StreamsSupertestRepositoryClient, createStreamsRepositoryAdminClient, diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/processing_simulate.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/processing_simulate.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/processing_simulate.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/processing_simulate.ts index 1f7e2aa608a66..6d39a3034acbd 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/processing_simulate.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/processing_simulate.ts @@ -11,7 +11,7 @@ import expect from '@kbn/expect'; import { ClientRequestParamsOf } from '@kbn/server-route-repository-utils'; import { StreamsRouteRepository } from '@kbn/streams-plugin/server'; import { disableStreams, enableStreams, forkStream, indexDocument } from './helpers/requests'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; import { StreamsSupertestRepositoryClient, createStreamsRepositoryAdminClient, diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/queries.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/queries.ts similarity index 98% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/queries.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/queries.ts index 86e76d16c9e67..c902b3468080c 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/queries.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/queries.ts @@ -9,13 +9,13 @@ import expect from '@kbn/expect'; import { Streams } from '@kbn/streams-schema'; import { v4 } from 'uuid'; import { STREAMS_ESQL_RULE_TYPE_ID } from '@kbn/rule-data-utils'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; import { StreamsSupertestRepositoryClient, createStreamsRepositoryAdminClient, } from './helpers/repository_client'; import { disableStreams, enableStreams, getQueries, putStream } from './helpers/requests'; -import { RoleCredentials } from '../../../services'; +import { RoleCredentials } from '../../services'; export default function ({ getService }: DeploymentAgnosticFtrProviderContext) { const roleScopedSupertest = getService('roleScopedSupertest'); diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/root_stream.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/root_stream.ts similarity index 98% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/root_stream.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/root_stream.ts index a718e307f0656..f006fba5545f0 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/root_stream.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/root_stream.ts @@ -8,7 +8,7 @@ import expect from '@kbn/expect'; import { Streams } from '@kbn/streams-schema'; import { get } from 'lodash'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; import { disableStreams, enableStreams, indexDocument, putStream } from './helpers/requests'; import { StreamsSupertestRepositoryClient, diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/schema.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/schema.ts similarity index 98% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/schema.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/schema.ts index 2f6e270faf08d..184aad249eab6 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/schema.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/schema.ts @@ -7,7 +7,7 @@ import expect from '@kbn/expect'; import { disableStreams, enableStreams, forkStream, indexDocument } from './helpers/requests'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; import { StreamsSupertestRepositoryClient, createStreamsRepositoryAdminClient, diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/significant_events.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/significant_events.ts similarity index 98% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/significant_events.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/significant_events.ts index 4b8b7f417cbfd..274eb233dbea7 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/significant_events.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/significant_events.ts @@ -12,7 +12,7 @@ import { isDslLifecycle, isIlmLifecycle, } from '@kbn/streams-schema'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; import { StreamsSupertestRepositoryClient, createStreamsRepositoryAdminClient, diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/create_monitor.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/create_monitor.ts similarity index 95% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/create_monitor.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/create_monitor.ts index 5e418683e81c1..d04c811a6ff0a 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/create_monitor.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/create_monitor.ts @@ -20,10 +20,10 @@ import { removeMonitorEmptyValues, transformPublicKeys, } from '@kbn/synthetics-plugin/server/routes/monitor_cruds/formatters/saved_object_to_monitor'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; import { getFixtureJson } from './helpers/get_fixture_json'; -import { SyntheticsMonitorTestService } from '../../../services/synthetics_monitor'; -import { PrivateLocationTestService } from '../../../services/synthetics_private_location'; +import { SyntheticsMonitorTestService } from '../../services/synthetics_monitor'; +import { PrivateLocationTestService } from '../../services/synthetics_private_location'; export const addMonitorAPIHelper = async ( supertestAPI: any, diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/create_monitor_private_location.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/create_monitor_private_location.ts similarity index 98% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/create_monitor_private_location.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/create_monitor_private_location.ts index 2ede653855388..b66c655cc86a6 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/create_monitor_private_location.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/create_monitor_private_location.ts @@ -22,12 +22,12 @@ import { omit } from 'lodash'; import { PackagePolicy } from '@kbn/fleet-plugin/common'; import expect from '@kbn/expect'; import rawExpect from 'expect'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; import { getFixtureJson } from './helpers/get_fixture_json'; import { comparePolicies, getTestSyntheticsPolicy } from './sample_data/test_policy'; -import { PrivateLocationTestService } from '../../../services/synthetics_private_location'; +import { PrivateLocationTestService } from '../../services/synthetics_private_location'; import { addMonitorAPIHelper, keyToOmitList, omitMonitorKeys } from './create_monitor'; -import { SyntheticsMonitorTestService } from '../../../services/synthetics_monitor'; +import { SyntheticsMonitorTestService } from '../../services/synthetics_monitor'; export default function ({ getService }: DeploymentAgnosticFtrProviderContext) { describe('PrivateLocationCreateMonitor', function () { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/create_monitor_project.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/create_monitor_project.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/create_monitor_project.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/create_monitor_project.ts index d7e3a405eed6a..41a2c23087d4a 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/create_monitor_project.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/create_monitor_project.ts @@ -22,10 +22,10 @@ import { PROFILE_VALUES_ENUM, PROFILES_MAP, } from '@kbn/synthetics-plugin/common/constants/monitor_defaults'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; import { getFixtureJson } from './helpers/get_fixture_json'; -import { PrivateLocationTestService } from '../../../services/synthetics_private_location'; -import { SyntheticsMonitorTestService } from '../../../services/synthetics_monitor'; +import { PrivateLocationTestService } from '../../services/synthetics_private_location'; +import { SyntheticsMonitorTestService } from '../../services/synthetics_monitor'; import { LOCAL_PUBLIC_LOCATION } from './helpers/location'; export default function ({ getService }: DeploymentAgnosticFtrProviderContext) { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/create_monitor_project_multi_space.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/create_monitor_project_multi_space.ts similarity index 98% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/create_monitor_project_multi_space.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/create_monitor_project_multi_space.ts index e0596a3451395..ee41dfdf00a1e 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/create_monitor_project_multi_space.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/create_monitor_project_multi_space.ts @@ -12,7 +12,7 @@ import { syntheticsMonitorSavedObjectType, } from '@kbn/synthetics-plugin/common/types/saved_objects'; import { SYNTHETICS_API_URLS } from '@kbn/synthetics-plugin/common/constants'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; import { getFixtureJson } from './helpers/get_fixture_json'; import { PrivateLocationTestService } from '../../../services/synthetics_private_location'; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/create_monitor_project_private_location.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/create_monitor_project_private_location.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/create_monitor_project_private_location.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/create_monitor_project_private_location.ts index 674ddc6d36c0d..a3a20393a782d 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/create_monitor_project_private_location.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/create_monitor_project_private_location.ts @@ -22,10 +22,10 @@ import { getTestProjectSyntheticsPolicy, getTestProjectSyntheticsPolicyLightweight, } from './sample_data/test_project_monitor_policy'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; import { getFixtureJson } from './helpers/get_fixture_json'; -import { PrivateLocationTestService } from '../../../services/synthetics_private_location'; -import { SyntheticsMonitorTestService } from '../../../services/synthetics_monitor'; +import { PrivateLocationTestService } from '../../services/synthetics_private_location'; +import { SyntheticsMonitorTestService } from '../../services/synthetics_monitor'; import { comparePolicies } from './sample_data/test_policy'; export default function ({ getService }: DeploymentAgnosticFtrProviderContext) { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/create_monitor_public_api.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/create_monitor_public_api.ts similarity index 98% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/create_monitor_public_api.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/create_monitor_public_api.ts index 697fdec20c134..0e32319d719fa 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/create_monitor_public_api.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/create_monitor_public_api.ts @@ -8,7 +8,7 @@ import expect from '@kbn/expect'; import { v4 as uuidv4 } from 'uuid'; import { RoleCredentials } from '@kbn/ftr-common-functional-services'; import { DEFAULT_FIELDS } from '@kbn/synthetics-plugin/common/constants/monitor_defaults'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; import { addMonitorAPIHelper, omitMonitorKeys } from './create_monitor'; import { LOCAL_PUBLIC_LOCATION } from './helpers/location'; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/create_monitor_public_api_private_location.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/create_monitor_public_api_private_location.ts similarity index 98% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/create_monitor_public_api_private_location.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/create_monitor_public_api_private_location.ts index 4f37242f70173..d82b11f6ff207 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/create_monitor_public_api_private_location.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/create_monitor_public_api_private_location.ts @@ -11,9 +11,9 @@ import { RoleCredentials } from '@kbn/ftr-common-functional-services'; import { PrivateLocation } from '@kbn/synthetics-plugin/common/runtime_types'; import { DEFAULT_FIELDS } from '@kbn/synthetics-plugin/common/constants/monitor_defaults'; import { LOCATION_REQUIRED_ERROR } from '@kbn/synthetics-plugin/server/routes/monitor_cruds/monitor_validation'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; import { addMonitorAPIHelper, omitMonitorKeys } from './create_monitor'; -import { PrivateLocationTestService } from '../../../services/synthetics_private_location'; +import { PrivateLocationTestService } from '../../services/synthetics_private_location'; export default function ({ getService }: DeploymentAgnosticFtrProviderContext) { describe('AddNewMonitorsPublicAPI - Private locations', function () { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/create_update_params.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/create_update_params.ts similarity index 98% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/create_update_params.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/create_update_params.ts index 4f4068008cd40..708c141d9eef5 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/create_update_params.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/create_update_params.ts @@ -11,8 +11,8 @@ import { RoleCredentials } from '@kbn/ftr-common-functional-services'; import { SYNTHETICS_API_URLS } from '@kbn/synthetics-plugin/common/constants'; import expect from '@kbn/expect'; import { syntheticsParamType } from '@kbn/synthetics-plugin/common/types/saved_objects'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; -import { PrivateLocationTestService } from '../../../services/synthetics_private_location'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; +import { PrivateLocationTestService } from '../../services/synthetics_private_location'; function assertHas(actual: unknown, expected: object) { expect(pick(actual, Object.keys(expected))).eql(expected); diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/delete_monitor.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/delete_monitor.ts similarity index 95% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/delete_monitor.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/delete_monitor.ts index 3e1582ea3ec2b..9e15827bf0e24 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/delete_monitor.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/delete_monitor.ts @@ -13,10 +13,10 @@ import { } from '@kbn/synthetics-plugin/common/runtime_types'; import { SYNTHETICS_API_URLS } from '@kbn/synthetics-plugin/common/constants'; import expect from '@kbn/expect'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; import { getFixtureJson } from './helpers/get_fixture_json'; -import { PrivateLocationTestService } from '../../../services/synthetics_private_location'; -import { SyntheticsMonitorTestService } from '../../../services/synthetics_monitor'; +import { PrivateLocationTestService } from '../../services/synthetics_private_location'; +import { SyntheticsMonitorTestService } from '../../services/synthetics_monitor'; export default function ({ getService }: DeploymentAgnosticFtrProviderContext) { describe('DeleteMonitorRoute', function () { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/delete_monitor_project.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/delete_monitor_project.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/delete_monitor_project.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/delete_monitor_project.ts index 38270fd9e4b80..75ceb8f4da207 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/delete_monitor_project.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/delete_monitor_project.ts @@ -16,9 +16,9 @@ import { SYNTHETICS_API_URLS } from '@kbn/synthetics-plugin/common/constants'; import { PackagePolicy } from '@kbn/fleet-plugin/common'; import expect from '@kbn/expect'; import { syntheticsMonitorSavedObjectType } from '@kbn/synthetics-plugin/common/types/saved_objects'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; import { getFixtureJson } from './helpers/get_fixture_json'; -import { PrivateLocationTestService } from '../../../services/synthetics_private_location'; +import { PrivateLocationTestService } from '../../services/synthetics_private_location'; export default function ({ getService }: DeploymentAgnosticFtrProviderContext) { describe('DeleteProjectMonitors', function () { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/edit_monitor.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/edit_monitor.ts similarity index 98% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/edit_monitor.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/edit_monitor.ts index 5e8bae5098161..6f6df343234c3 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/edit_monitor.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/edit_monitor.ts @@ -16,10 +16,10 @@ import { import { RoleCredentials } from '@kbn/ftr-common-functional-services'; import { SYNTHETICS_API_URLS } from '@kbn/synthetics-plugin/common/constants'; import expect from '@kbn/expect'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; import { getFixtureJson } from './helpers/get_fixture_json'; import { omitResponseTimestamps, omitEmptyValues } from './helpers/monitor'; -import { SyntheticsMonitorTestService } from '../../../services/synthetics_monitor'; +import { SyntheticsMonitorTestService } from '../../services/synthetics_monitor'; import { LOCAL_PUBLIC_LOCATION } from './helpers/location'; export default function ({ getService }: DeploymentAgnosticFtrProviderContext) { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/edit_monitor_private_location.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/edit_monitor_private_location.ts similarity index 97% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/edit_monitor_private_location.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/edit_monitor_private_location.ts index e27523414fe1c..113d1a3c8efc7 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/edit_monitor_private_location.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/edit_monitor_private_location.ts @@ -17,11 +17,11 @@ import { import { RoleCredentials } from '@kbn/ftr-common-functional-services'; import { SYNTHETICS_API_URLS } from '@kbn/synthetics-plugin/common/constants'; import expect from '@kbn/expect'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; import { getFixtureJson } from './helpers/get_fixture_json'; import { omitResponseTimestamps, omitEmptyValues } from './helpers/monitor'; -import { PrivateLocationTestService } from '../../../services/synthetics_private_location'; -import { SyntheticsMonitorTestService } from '../../../services/synthetics_monitor'; +import { PrivateLocationTestService } from '../../services/synthetics_private_location'; +import { SyntheticsMonitorTestService } from '../../services/synthetics_monitor'; export default function ({ getService }: DeploymentAgnosticFtrProviderContext) { describe('EditMonitorAPI - Private Location', function () { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/edit_monitor_public_api.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/edit_monitor_public_api.ts similarity index 97% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/edit_monitor_public_api.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/edit_monitor_public_api.ts index 30d4bd5db44d7..8b98faaa7f68c 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/edit_monitor_public_api.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/edit_monitor_public_api.ts @@ -11,9 +11,9 @@ import moment from 'moment'; import { RoleCredentials } from '@kbn/ftr-common-functional-services'; import { DEFAULT_FIELDS } from '@kbn/synthetics-plugin/common/constants/monitor_defaults'; import { SYNTHETICS_API_URLS } from '@kbn/synthetics-plugin/common/constants'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; import { addMonitorAPIHelper, omitMonitorKeys } from './create_monitor'; -import { PrivateLocationTestService } from '../../../services/synthetics_private_location'; +import { PrivateLocationTestService } from '../../services/synthetics_private_location'; import { LOCAL_PUBLIC_LOCATION } from './helpers/location'; export default function ({ getService }: DeploymentAgnosticFtrProviderContext) { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/edit_monitor_public_api_private_location.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/edit_monitor_public_api_private_location.ts similarity index 98% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/edit_monitor_public_api_private_location.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/edit_monitor_public_api_private_location.ts index e0938cec38c52..73a1a58cc2ece 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/edit_monitor_public_api_private_location.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/edit_monitor_public_api_private_location.ts @@ -14,9 +14,9 @@ import { SYNTHETICS_API_URLS } from '@kbn/synthetics-plugin/common/constants'; import moment from 'moment'; import { PrivateLocation } from '@kbn/synthetics-plugin/common/runtime_types'; import { LOCATION_REQUIRED_ERROR } from '@kbn/synthetics-plugin/server/routes/monitor_cruds/monitor_validation'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; import { addMonitorAPIHelper, omitMonitorKeys } from './create_monitor'; -import { PrivateLocationTestService } from '../../../services/synthetics_private_location'; +import { PrivateLocationTestService } from '../../services/synthetics_private_location'; export default function ({ getService }: DeploymentAgnosticFtrProviderContext) { describe('EditMonitorsPublicAPI - Private Location', function () { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/edit_private_location.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/edit_private_location.ts similarity index 98% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/edit_private_location.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/edit_private_location.ts index 6b1bb4f264035..f168d857d260c 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/edit_private_location.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/edit_private_location.ts @@ -12,11 +12,11 @@ import expect from '@kbn/expect'; import rawExpect from 'expect'; import { PackagePolicy } from '@kbn/fleet-plugin/common'; import { v4 as uuidv4 } from 'uuid'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; import { getFixtureJson } from './helpers/get_fixture_json'; -import { PrivateLocationTestService } from '../../../services/synthetics_private_location'; +import { PrivateLocationTestService } from '../../services/synthetics_private_location'; import { addMonitorAPIHelper, omitMonitorKeys } from './create_monitor'; -import { SupertestWithRoleScopeType } from '../../../services'; +import { SupertestWithRoleScopeType } from '../../services'; export default function ({ getService }: DeploymentAgnosticFtrProviderContext) { describe('EditPrivateLocationAPI', function () { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/enable_default_alerting.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/enable_default_alerting.ts similarity index 98% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/enable_default_alerting.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/enable_default_alerting.ts index 7be87970915c2..8ca9ffcff06af 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/enable_default_alerting.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/enable_default_alerting.ts @@ -12,10 +12,10 @@ import { HTTPFields, PrivateLocation } from '@kbn/synthetics-plugin/common/runti import { SYNTHETICS_API_URLS } from '@kbn/synthetics-plugin/common/constants'; import { DYNAMIC_SETTINGS_DEFAULTS } from '@kbn/synthetics-plugin/common/constants/settings_defaults'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; import { getFixtureJson } from './helpers/get_fixture_json'; import { addMonitorAPIHelper, omitMonitorKeys } from './create_monitor'; -import { PrivateLocationTestService } from '../../../services/synthetics_private_location'; +import { PrivateLocationTestService } from '../../services/synthetics_private_location'; export default function ({ getService }: DeploymentAgnosticFtrProviderContext) { describe('EnableDefaultAlerting', function () { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/fixtures/browser_monitor.json b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/fixtures/browser_monitor.json similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/fixtures/browser_monitor.json rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/fixtures/browser_monitor.json diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/fixtures/http_monitor.json b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/fixtures/http_monitor.json similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/fixtures/http_monitor.json rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/fixtures/http_monitor.json diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/fixtures/icmp_monitor.json b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/fixtures/icmp_monitor.json similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/fixtures/icmp_monitor.json rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/fixtures/icmp_monitor.json diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/fixtures/inspect_browser_monitor.json b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/fixtures/inspect_browser_monitor.json similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/fixtures/inspect_browser_monitor.json rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/fixtures/inspect_browser_monitor.json diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/fixtures/project_browser_monitor.json b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/fixtures/project_browser_monitor.json similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/fixtures/project_browser_monitor.json rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/fixtures/project_browser_monitor.json diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/fixtures/project_http_monitor.json b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/fixtures/project_http_monitor.json similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/fixtures/project_http_monitor.json rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/fixtures/project_http_monitor.json diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/fixtures/project_icmp_monitor.json b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/fixtures/project_icmp_monitor.json similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/fixtures/project_icmp_monitor.json rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/fixtures/project_icmp_monitor.json diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/fixtures/project_tcp_monitor.json b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/fixtures/project_tcp_monitor.json similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/fixtures/project_tcp_monitor.json rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/fixtures/project_tcp_monitor.json diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/fixtures/tcp_monitor.json b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/fixtures/tcp_monitor.json similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/fixtures/tcp_monitor.json rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/fixtures/tcp_monitor.json diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/get_filters.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/get_filters.ts similarity index 94% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/get_filters.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/get_filters.ts index a59535f66b5f3..6c028eed8cf20 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/get_filters.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/get_filters.ts @@ -10,8 +10,8 @@ import { RoleCredentials } from '@kbn/ftr-common-functional-services'; import expect from '@kbn/expect'; import { PrivateLocation } from '@kbn/synthetics-plugin/common/runtime_types'; import { syntheticsMonitorSavedObjectType } from '@kbn/synthetics-plugin/common/types/saved_objects'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; -import { PrivateLocationTestService } from '../../../services/synthetics_private_location'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; +import { PrivateLocationTestService } from '../../services/synthetics_private_location'; export default function ({ getService }: DeploymentAgnosticFtrProviderContext) { describe('getMonitorFilters', function () { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/get_monitor.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/get_monitor.ts similarity index 98% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/get_monitor.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/get_monitor.ts index 7bd116a0b1bfa..fb9608b340d86 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/get_monitor.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/get_monitor.ts @@ -18,10 +18,10 @@ import { import { SYNTHETICS_API_URLS } from '@kbn/synthetics-plugin/common/constants'; import expect from '@kbn/expect'; import { secretKeys } from '@kbn/synthetics-plugin/common/constants/monitor_management'; -import { SyntheticsMonitorTestService } from '../../../services/synthetics_monitor'; +import { SyntheticsMonitorTestService } from '../../services/synthetics_monitor'; import { omitMonitorKeys } from './create_monitor'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; -import { PrivateLocationTestService } from '../../../services/synthetics_private_location'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; +import { PrivateLocationTestService } from '../../services/synthetics_private_location'; import { getFixtureJson } from './helpers/get_fixture_json'; export default function ({ getService }: DeploymentAgnosticFtrProviderContext) { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/get_monitor_project.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/get_monitor_project.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/get_monitor_project.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/get_monitor_project.ts index 9368e70a02884..d771705a8e8f4 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/get_monitor_project.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/get_monitor_project.ts @@ -15,9 +15,9 @@ import { } from '@kbn/synthetics-plugin/common/runtime_types'; import { SYNTHETICS_API_URLS } from '@kbn/synthetics-plugin/common/constants'; import expect from '@kbn/expect'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; import { getFixtureJson } from './helpers/get_fixture_json'; -import { PrivateLocationTestService } from '../../../services/synthetics_private_location'; +import { PrivateLocationTestService } from '../../services/synthetics_private_location'; export default function ({ getService }: DeploymentAgnosticFtrProviderContext) { // Failing: See https://github.com/elastic/kibana/issues/228157 diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/get_private_location_monitors.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/get_private_location_monitors.ts similarity index 94% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/get_private_location_monitors.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/get_private_location_monitors.ts index 139ac1530cf7c..725bac1f0e46b 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/get_private_location_monitors.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/get_private_location_monitors.ts @@ -10,11 +10,11 @@ import { PrivateLocation, ServiceLocation } from '@kbn/synthetics-plugin/common/ import { SYNTHETICS_API_URLS } from '@kbn/synthetics-plugin/common/constants'; import expect from '@kbn/expect'; import rawExpect from 'expect'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; import { getFixtureJson } from './helpers/get_fixture_json'; -import { PrivateLocationTestService } from '../../../services/synthetics_private_location'; +import { PrivateLocationTestService } from '../../services/synthetics_private_location'; import { addMonitorAPIHelper, omitMonitorKeys } from './create_monitor'; -import { SupertestWithRoleScopeType } from '../../../services'; +import { SupertestWithRoleScopeType } from '../../services'; export default function ({ getService }: DeploymentAgnosticFtrProviderContext) { describe('GetPrivateLocationMonitors', function () { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/helpers/get_fixture_json.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/helpers/get_fixture_json.ts similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/helpers/get_fixture_json.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/helpers/get_fixture_json.ts diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/helpers/location.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/helpers/location.ts similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/helpers/location.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/helpers/location.ts diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/helpers/monitor.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/helpers/monitor.ts similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/helpers/monitor.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/helpers/monitor.ts diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/index.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/index.ts similarity index 95% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/index.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/index.ts index 451a212ed8728..ab42366403554 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/index.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) { describe('SyntheticsAPITests', () => { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/inspect_monitor.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/inspect_monitor.ts similarity index 97% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/inspect_monitor.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/inspect_monitor.ts index 9bc07ec8c38e0..834b1c0f73ed2 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/inspect_monitor.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/inspect_monitor.ts @@ -10,10 +10,10 @@ import { MonitorFields } from '@kbn/synthetics-plugin/common/runtime_types'; import { SYNTHETICS_API_URLS } from '@kbn/synthetics-plugin/common/constants'; import rawExpect from 'expect'; import expect from '@kbn/expect'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; import { getFixtureJson } from './helpers/get_fixture_json'; -import { SyntheticsMonitorTestService } from '../../../services/synthetics_monitor'; -import { PrivateLocationTestService } from '../../../services/synthetics_private_location'; +import { SyntheticsMonitorTestService } from '../../services/synthetics_monitor'; +import { PrivateLocationTestService } from '../../services/synthetics_private_location'; export default function ({ getService }: DeploymentAgnosticFtrProviderContext) { describe('inspectSyntheticsMonitor', function () { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/legacy_and_multispace_monitor_api.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/legacy_and_multispace_monitor_api.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/legacy_and_multispace_monitor_api.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/legacy_and_multispace_monitor_api.ts index f9cd73374e786..66a92adcee3bd 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/legacy_and_multispace_monitor_api.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/legacy_and_multispace_monitor_api.ts @@ -13,7 +13,7 @@ import { syntheticsMonitorSavedObjectType, legacySyntheticsMonitorTypeSingle, } from '@kbn/synthetics-plugin/common/types/saved_objects'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; import { getFixtureJson } from './helpers/get_fixture_json'; export default function ({ getService }: DeploymentAgnosticFtrProviderContext) { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/sample_data/test_policy.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/sample_data/test_policy.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/sample_data/test_policy.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/sample_data/test_policy.ts index 548715daa6c68..51dfd2e27c95f 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/sample_data/test_policy.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/sample_data/test_policy.ts @@ -7,7 +7,7 @@ import expect from 'expect'; import { omit, sortBy } from 'lodash'; import { PackagePolicy, PackagePolicyConfigRecord } from '@kbn/fleet-plugin/common'; -import { INSTALLED_VERSION } from '../../../../services/synthetics_private_location'; +import { INSTALLED_VERSION } from '../../../services/synthetics_private_location'; import { commonVars } from './test_project_monitor_policy'; interface PolicyProps { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/sample_data/test_project_monitor_policy.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/sample_data/test_project_monitor_policy.ts similarity index 99% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/sample_data/test_project_monitor_policy.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/sample_data/test_project_monitor_policy.ts index 78dc58a758bfc..22b43f29d1414 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/sample_data/test_project_monitor_policy.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/sample_data/test_project_monitor_policy.ts @@ -6,7 +6,7 @@ */ import { PackagePolicy } from '@kbn/fleet-plugin/common'; -import { INSTALLED_VERSION } from '../../../../services/synthetics_private_location'; +import { INSTALLED_VERSION } from '../../../services/synthetics_private_location'; import { getDataStream } from './test_policy'; export const commonVars = { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/suggestions.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/suggestions.ts similarity index 97% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/suggestions.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/suggestions.ts index 8a35277dcc1f9..9c2db4111d753 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/suggestions.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/suggestions.ts @@ -16,9 +16,9 @@ import { import { syntheticsMonitorSavedObjectType } from '@kbn/synthetics-plugin/common/types/saved_objects'; import { SYNTHETICS_API_URLS } from '@kbn/synthetics-plugin/common/constants'; import pMap from 'p-map'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; import { getFixtureJson } from './helpers/get_fixture_json'; -import { PrivateLocationTestService } from '../../../services/synthetics_private_location'; +import { PrivateLocationTestService } from '../../services/synthetics_private_location'; export default function ({ getService }: DeploymentAgnosticFtrProviderContext) { describe('SyntheticsSuggestions', function () { diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/sync_global_params.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/sync_global_params.ts similarity index 98% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/sync_global_params.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/sync_global_params.ts index 94a5e859b2360..5e339a51bcbb1 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/sync_global_params.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/sync_global_params.ts @@ -18,9 +18,9 @@ import { SYNTHETICS_API_URLS } from '@kbn/synthetics-plugin/common/constants'; import { PackagePolicy } from '@kbn/fleet-plugin/common'; import expect from '@kbn/expect'; import { syntheticsParamType } from '@kbn/synthetics-plugin/common/types/saved_objects'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; import { getFixtureJson } from './helpers/get_fixture_json'; -import { PrivateLocationTestService } from '../../../services/synthetics_private_location'; +import { PrivateLocationTestService } from '../../services/synthetics_private_location'; import { comparePolicies, getTestSyntheticsPolicy } from './sample_data/test_policy'; import { addMonitorAPIHelper, omitMonitorKeys } from './create_monitor'; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/synthetics_enablement.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/synthetics_enablement.ts similarity index 98% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/synthetics_enablement.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/synthetics_enablement.ts index cb2197bf54169..4069078f9134b 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/synthetics_enablement.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/synthetics_enablement.ts @@ -7,8 +7,8 @@ import { v4 as uuidv4 } from 'uuid'; import { SYNTHETICS_API_URLS } from '@kbn/synthetics-plugin/common/constants'; import expect from '@kbn/expect'; -import { SupertestWithRoleScopeType } from '../../../services'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { SupertestWithRoleScopeType } from '../../services'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; export default function ({ getService }: DeploymentAgnosticFtrProviderContext) { const config = getService('config'); diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/test_now_monitor.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/test_now_monitor.ts similarity index 95% rename from x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/test_now_monitor.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/test_now_monitor.ts index 9ea61196b8312..b399e9b7475eb 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/synthetics/test_now_monitor.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/test_now_monitor.ts @@ -10,9 +10,9 @@ import { MonitorFields } from '@kbn/synthetics-plugin/common/runtime_types'; import { SYNTHETICS_API_URLS } from '@kbn/synthetics-plugin/common/constants'; import expect from '@kbn/expect'; import { omit } from 'lodash'; -import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; import { getFixtureJson } from './helpers/get_fixture_json'; -import { SyntheticsMonitorTestService } from '../../../services/synthetics_monitor'; +import { SyntheticsMonitorTestService } from '../../services/synthetics_monitor'; export const LOCAL_LOCATION = { id: 'dev', diff --git a/x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.ai_assistant.index.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.ai_assistant.index.ts similarity index 88% rename from x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.ai_assistant.index.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.ai_assistant.index.ts index 68409c74769ea..1572313d23c52 100644 --- a/x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.ai_assistant.index.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.ai_assistant.index.ts @@ -10,6 +10,6 @@ export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) describe('Serverless Observability - Deployment-agnostic AI Assistant API integration tests', function () { this.tags(['esGate']); - loadTestFile(require.resolve('../../apis/observability/ai_assistant')); + loadTestFile(require.resolve('../../apis/ai_assistant')); }); } diff --git a/x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.ai_assistant.serverless.config.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.ai_assistant.serverless.config.ts similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.ai_assistant.serverless.config.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.ai_assistant.serverless.config.ts diff --git a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.ai_assistant_local.index.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.ai_assistant_local.index.ts new file mode 100644 index 0000000000000..5d3f630667adf --- /dev/null +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.ai_assistant_local.index.ts @@ -0,0 +1,15 @@ +/* + * 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. + */ +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; + +export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) { + describe('Serverless Observability - Deployment-agnostic AI Assistant local-only tests', function () { + this.tags(['esGate']); + + loadTestFile(require.resolve('../../apis/ai_assistant/local')); + }); +} diff --git a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.ai_assistant_local.serverless.config.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.ai_assistant_local.serverless.config.ts new file mode 100644 index 0000000000000..46a9ece630ba8 --- /dev/null +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.ai_assistant_local.serverless.config.ts @@ -0,0 +1,18 @@ +/* + * 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. + */ + +import { createServerlessTestConfig } from '@kbn/test-suites-xpack-platform/api_integration_deployment_agnostic/default_configs/serverless.config.base'; +import { services } from '../../services'; + +export default createServerlessTestConfig({ + services, + serverlessProject: 'oblt', + testFiles: [require.resolve('./oblt.ai_assistant_local.index.ts')], + junit: { + reportName: 'Serverless Observability - Deployment-agnostic AI Assistant local-only tests', + }, +}); diff --git a/x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.apm.index.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.apm.index.ts similarity index 89% rename from x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.apm.index.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.apm.index.ts index 124166b1f004b..664e56ab6b941 100644 --- a/x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.apm.index.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.apm.index.ts @@ -9,6 +9,6 @@ import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) { describe('Serverless Observability - Deployment-agnostic APM API integration tests', function () { // load new oblt APM-only deployment-agnostic test here - loadTestFile(require.resolve('../../apis/observability/apm')); + loadTestFile(require.resolve('../../apis/apm')); }); } diff --git a/x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.apm.serverless.config.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.apm.serverless.config.ts similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.apm.serverless.config.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.apm.serverless.config.ts diff --git a/x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.index.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.index.ts similarity index 64% rename from x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.index.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.index.ts index 36af671c231d8..b229f2d82ae49 100644 --- a/x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.index.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.index.ts @@ -10,10 +10,10 @@ export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) describe('Serverless Observability - Deployment-agnostic API integration tests', function () { // load new oblt deployment-agnostic test here // Note: if your tests runtime is over 5 minutes, create a new index and config file - loadTestFile(require.resolve('../../apis/observability/infra')); - loadTestFile(require.resolve('../../apis/observability/alerting')); - loadTestFile(require.resolve('../../apis/observability/dataset_quality')); - loadTestFile(require.resolve('../../apis/observability/slo')); - loadTestFile(require.resolve('../../apis/observability/incident_management')); + loadTestFile(require.resolve('../../apis/infra')); + loadTestFile(require.resolve('../../apis/alerting')); + loadTestFile(require.resolve('../../apis/dataset_quality')); + loadTestFile(require.resolve('../../apis/slo')); + loadTestFile(require.resolve('../../apis/incident_management')); }); } diff --git a/x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.serverless.config.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.serverless.config.ts similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.serverless.config.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.serverless.config.ts diff --git a/x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.streams.index.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.streams.index.ts similarity index 88% rename from x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.streams.index.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.streams.index.ts index 9489cafd13311..4dbe46560c54e 100644 --- a/x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.streams.index.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.streams.index.ts @@ -10,6 +10,6 @@ export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) describe('Serverless Observability - Deployment-agnostic Streams API integration tests', function () { this.tags(['esGate']); - loadTestFile(require.resolve('../../apis/observability/streams')); + loadTestFile(require.resolve('../../apis/streams')); }); } diff --git a/x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.streams.serverless.config.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.streams.serverless.config.ts similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.streams.serverless.config.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.streams.serverless.config.ts diff --git a/x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.synthetics.index.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.synthetics.index.ts similarity index 88% rename from x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.synthetics.index.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.synthetics.index.ts index d2f95b872714b..e43bd45097d28 100644 --- a/x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.synthetics.index.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.synthetics.index.ts @@ -10,6 +10,6 @@ export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) describe('Serverless Observability - Deployment-agnostic Synthetics API integration tests', function () { this.tags(['esGate']); - loadTestFile(require.resolve('../../apis/observability/synthetics')); + loadTestFile(require.resolve('../../apis/synthetics')); }); } diff --git a/x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.synthetics.serverless.config.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.synthetics.serverless.config.ts similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.synthetics.serverless.config.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.synthetics.serverless.config.ts diff --git a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.ai_assistant.index.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.ai_assistant.index.ts new file mode 100644 index 0000000000000..bc579533bdeb5 --- /dev/null +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.ai_assistant.index.ts @@ -0,0 +1,13 @@ +/* + * 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. + */ +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; + +export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) { + describe('Stateful Observability - Deployment-agnostic AI Assistant API integration tests', function () { + loadTestFile(require.resolve('../../apis/ai_assistant')); + }); +} diff --git a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.ai_assistant.stateful.config.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.ai_assistant.stateful.config.ts new file mode 100644 index 0000000000000..15758b95ca69d --- /dev/null +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.ai_assistant.stateful.config.ts @@ -0,0 +1,29 @@ +/* + * 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. + */ + +import { createStatefulTestConfig } from '@kbn/test-suites-xpack-platform/api_integration_deployment_agnostic/default_configs/stateful.config.base'; +import { services } from '../../services'; + +export default createStatefulTestConfig({ + services, + testFiles: [require.resolve('./oblt.ai_assistant.index.ts')], + junit: { + reportName: 'Stateful Observability - Deployment-agnostic API Integration Tests', + }, + // @ts-expect-error + kbnTestServer: { + serverArgs: [ + `--logging.loggers=${JSON.stringify([ + { + name: 'plugins.observabilityAIAssistant', + level: 'all', + appenders: ['default'], + }, + ])}`, + ], + }, +}); diff --git a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.ai_assistant_local.index.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.ai_assistant_local.index.ts new file mode 100644 index 0000000000000..83a7071eb10ac --- /dev/null +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.ai_assistant_local.index.ts @@ -0,0 +1,13 @@ +/* + * 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. + */ +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; + +export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) { + describe('Stateful Observability - Deployment-agnostic AI Assistant local-only tests', function () { + loadTestFile(require.resolve('../../apis/ai_assistant/local')); + }); +} diff --git a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.ai_assistant_local.stateful.config.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.ai_assistant_local.stateful.config.ts new file mode 100644 index 0000000000000..7b28c46e16459 --- /dev/null +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.ai_assistant_local.stateful.config.ts @@ -0,0 +1,17 @@ +/* + * 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. + */ + +import { createStatefulTestConfig } from '@kbn/test-suites-xpack-platform/api_integration_deployment_agnostic/default_configs/stateful.config.base'; +import { services } from '../../services'; + +export default createStatefulTestConfig({ + services, + testFiles: [require.resolve('./oblt.ai_assistant_local.index.ts')], + junit: { + reportName: 'Stateful Observability - Deployment-agnostic AI Assistant local-only tests', + }, +}); diff --git a/x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.apm.index.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.apm.index.ts similarity index 88% rename from x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.apm.index.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.apm.index.ts index 9e7869bfacde0..03a747c7b0140 100644 --- a/x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.apm.index.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.apm.index.ts @@ -9,6 +9,6 @@ import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) { describe('Stateful Observability - Deployment-agnostic APM API integration tests', () => { - loadTestFile(require.resolve('../../apis/observability/apm')); + loadTestFile(require.resolve('../../apis/apm')); }); } diff --git a/x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.apm.stateful.config.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.apm.stateful.config.ts similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.apm.stateful.config.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.apm.stateful.config.ts diff --git a/x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.index.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.index.ts similarity index 50% rename from x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.index.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.index.ts index ff8440e9a95dd..d69b652a4b0cc 100644 --- a/x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.index.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.index.ts @@ -10,13 +10,13 @@ import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) { describe('Stateful Observability - Deployment-agnostic API integration tests', () => { // load new oblt (except APM) deployment-agnostic tests here - loadTestFile(require.resolve('../../apis/observability/alerting')); - loadTestFile(require.resolve('../../apis/observability/dataset_quality')); - loadTestFile(require.resolve('../../apis/observability/slo')); - loadTestFile(require.resolve('../../apis/observability/synthetics')); - loadTestFile(require.resolve('../../apis/observability/infra')); - loadTestFile(require.resolve('../../apis/observability/ai_assistant')); - loadTestFile(require.resolve('../../apis/observability/streams')); - loadTestFile(require.resolve('../../apis/observability/incident_management')); + loadTestFile(require.resolve('../../apis/alerting')); + loadTestFile(require.resolve('../../apis/dataset_quality')); + loadTestFile(require.resolve('../../apis/slo')); + loadTestFile(require.resolve('../../apis/synthetics')); + loadTestFile(require.resolve('../../apis/infra')); + loadTestFile(require.resolve('../../apis/ai_assistant')); + loadTestFile(require.resolve('../../apis/streams')); + loadTestFile(require.resolve('../../apis/incident_management')); }); } diff --git a/x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.stateful.config.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.stateful.config.ts similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.stateful.config.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.stateful.config.ts diff --git a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/feature_flag_configs/serverless/oblt.index.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/feature_flag_configs/serverless/oblt.index.ts new file mode 100644 index 0000000000000..16799be9883c6 --- /dev/null +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/feature_flag_configs/serverless/oblt.index.ts @@ -0,0 +1,18 @@ +/* + * 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. + */ +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; + +export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) { + describe('Serverless Observability feature flag testing - Deployment-agnostic API integration tests', function () { + loadTestFile(require.resolve('../../apis/alerting/synthetics/synthetics_default_rule')); + loadTestFile(require.resolve('../../apis/alerting/synthetics/custom_status_rule')); + loadTestFile(require.resolve('../../apis/alerting/synthetics/alert_on_no_data')); + loadTestFile(require.resolve('../../apis/alerting/custom_threshold/consumers_and_privileges')); + loadTestFile(require.resolve('../../apis/alerting/es_query/consumers_and_privileges')); + loadTestFile(require.resolve('../../apis/alerting/burn_rate/consumers_and_privileges')); + }); +} diff --git a/x-pack/test/api_integration/deployment_agnostic/feature_flag_configs/serverless/oblt.serverless.config.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/feature_flag_configs/serverless/oblt.serverless.config.ts similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/feature_flag_configs/serverless/oblt.serverless.config.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/feature_flag_configs/serverless/oblt.serverless.config.ts diff --git a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/feature_flag_configs/stateful/oblt.index.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/feature_flag_configs/stateful/oblt.index.ts new file mode 100644 index 0000000000000..8968f41762a3a --- /dev/null +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/feature_flag_configs/stateful/oblt.index.ts @@ -0,0 +1,18 @@ +/* + * 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. + */ +import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; + +export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) { + describe('Stateful Observability feature flag testing - Deployment-agnostic API integration tests', function () { + loadTestFile(require.resolve('../../apis/alerting/synthetics/synthetics_default_rule')); + loadTestFile(require.resolve('../../apis/alerting/synthetics/custom_status_rule')); + loadTestFile(require.resolve('../../apis/alerting/synthetics/alert_on_no_data')); + loadTestFile(require.resolve('../../apis/alerting/custom_threshold/consumers_and_privileges')); + loadTestFile(require.resolve('../../apis/alerting/es_query/consumers_and_privileges')); + loadTestFile(require.resolve('../../apis/alerting/burn_rate/consumers_and_privileges')); + }); +} diff --git a/x-pack/test/api_integration/deployment_agnostic/feature_flag_configs/stateful/oblt.stateful.config.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/feature_flag_configs/stateful/oblt.stateful.config.ts similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/feature_flag_configs/stateful/oblt.stateful.config.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/feature_flag_configs/stateful/oblt.stateful.config.ts diff --git a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/services/alerting_api.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/services/alerting_api.ts new file mode 100644 index 0000000000000..dedc24e7e6614 --- /dev/null +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/services/alerting_api.ts @@ -0,0 +1,1226 @@ +/* + * 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. + */ + +import type { + AggregationsAggregate, + QueryDslQueryContainer, + SearchResponse, +} from '@elastic/elasticsearch/lib/api/types'; +import { MetricThresholdParams } from '@kbn/infra-plugin/common/alerting/metrics'; +import { ThresholdParams } from '@kbn/observability-plugin/common/custom_threshold_rule/types'; +import { RoleCredentials } from '@kbn/ftr-common-functional-services'; +import { errors, type Client } from '@elastic/elasticsearch'; +import type { TryWithRetriesOptions } from '@kbn/ftr-common-functional-services'; +import { ApmRuleParamsType } from '@kbn/apm-plugin/common/rules/apm_rule_types'; +import { v4 as uuidv4 } from 'uuid'; +import moment from 'moment'; +import type { SyntheticsMonitorStatusRuleParams as StatusRuleParams } from '@kbn/response-ops-rule-params/synthetics_monitor_status'; +import { DeploymentAgnosticFtrProviderContext } from '../ftr_provider_context'; + +export interface SloBurnRateRuleParams { + sloId: string; + windows: WindowSchema[]; + dependencies?: Dependency[]; +} + +interface WindowSchema { + id: string; + burnRateThreshold: number; + maxBurnRateThreshold: number; + longWindow: Duration; + shortWindow: Duration; + actionGroup: string; +} + +interface Dependency { + ruleId: string; + actionGroupsToSuppressOn: string[]; +} + +type DurationUnit = 'm' | 'h' | 'd' | 'w' | 'M'; + +interface Duration { + value: number; + unit: DurationUnit; +} + +interface CreateEsQueryRuleParams { + size: number; + thresholdComparator: string; + threshold: number[]; + timeWindowSize?: number; + timeWindowUnit?: string; + esQuery?: string; + timeField?: string; + searchConfiguration?: unknown; + indexName?: string; + excludeHitsFromPreviousRun?: boolean; + aggType?: string; + aggField?: string; + groupBy?: string; + termField?: string; + termSize?: number; + index?: string[]; +} + +const RETRY_COUNT = 10; +const RETRY_DELAY = 1000; +const generateUniqueKey = () => uuidv4().replace(/-/g, ''); + +export function AlertingApiProvider({ getService }: DeploymentAgnosticFtrProviderContext) { + const samlAuth = getService('samlAuth'); + const supertestWithoutAuth = getService('supertestWithoutAuth'); + const es = getService('es'); + const retry = getService('retry'); + const logger = getService('log'); + const config = getService('config'); + const retryTimeout = config.get('timeouts.try'); + const requestTimeout = 30 * 1000; + + const helpers = { + async waitForAlertInIndex({ + esClient, + filter, + indexName, + ruleId, + num = 1, + retryOptions = { retryCount: RETRY_COUNT, retryDelay: RETRY_DELAY }, + }: { + esClient: Client; + filter: Date; + indexName: string; + ruleId: string; + num: number; + retryOptions?: TryWithRetriesOptions; + }): Promise>> { + return await retry.tryWithRetries( + `Alerting API - waitForAlertInIndex, retryOptions: ${JSON.stringify(retryOptions)}`, + async () => { + const response = await esClient.search({ + index: indexName, + query: { + bool: { + must: [ + { + term: { + 'kibana.alert.rule.uuid': ruleId, + }, + }, + { + range: { + '@timestamp': { + gte: filter.getTime().toString(), + }, + }, + }, + ], + }, + }, + }); + if (response.hits.hits.length < num) + throw new Error(`Only found ${response.hits.hits.length} / ${num} documents`); + + return response; + }, + retryOptions + ); + }, + + async waitForDocumentInIndexForTime({ + esClient, + indexName, + ruleId, + num = 1, + sort = 'desc', + timeout = 1000, + }: { + esClient: Client; + indexName: string; + ruleId: string; + num?: number; + sort?: 'asc' | 'desc'; + timeout?: number; + }): Promise { + return await retry.tryForTime(timeout, async () => { + const response = await esClient.search({ + index: indexName, + sort: `date:${sort}`, + query: { + bool: { + must: [ + { + term: { + 'ruleId.keyword': ruleId, + }, + }, + ], + }, + }, + }); + if (response.hits.hits.length < num) { + throw new Error(`Only found ${response.hits.hits.length} / ${num} documents`); + } + return response; + }); + }, + + async waitForDocumentInIndex({ + esClient, + indexName, + ruleId, + num = 1, + sort = 'desc', + retryOptions = { retryCount: RETRY_COUNT, retryDelay: RETRY_DELAY }, + }: { + esClient: Client; + indexName: string; + ruleId: string; + num?: number; + sort?: 'asc' | 'desc'; + retryOptions?: TryWithRetriesOptions; + }): Promise { + return await retry.tryWithRetries( + `Alerting API - waitForDocumentInIndex, retryOptions: ${JSON.stringify(retryOptions)}`, + async () => { + const response = await esClient.search({ + index: indexName, + sort: `date:${sort}`, + query: { + bool: { + must: [ + { + term: { + 'ruleId.keyword': ruleId, + }, + }, + ], + }, + }, + }); + if (response.hits.hits.length < num) { + throw new Error(`Only found ${response.hits.hits.length} / ${num} documents`); + } + return response; + }, + retryOptions + ); + }, + + async createIndexConnector({ + roleAuthc, + name, + indexName, + }: { + roleAuthc: RoleCredentials; + name: string; + indexName: string; + }) { + const { body } = await supertestWithoutAuth + .post(`/api/actions/connector`) + .set(samlAuth.getInternalRequestHeader()) + .set(roleAuthc.apiKeyHeader) + .send({ + name, + config: { + index: indexName, + refresh: true, + }, + connector_type_id: '.index', + }) + .expect(200); + return body; + }, + + async createSlackConnector({ roleAuthc, name }: { roleAuthc: RoleCredentials; name: string }) { + const { body } = await supertestWithoutAuth + .post(`/api/actions/connector`) + .set(samlAuth.getInternalRequestHeader()) + .set(roleAuthc.apiKeyHeader) + .send({ + name, + config: {}, + secrets: { + webhookUrl: 'http://test', + }, + connector_type_id: '.slack', + }) + .expect(200); + return body; + }, + + async createEsQueryRule({ + roleAuthc, + name, + ruleTypeId, + params, + actions = [], + tags = [], + schedule, + consumer, + notifyWhen, + enabled = true, + expectedStatusCode = 200, + }: { + roleAuthc: RoleCredentials; + ruleTypeId: string; + name: string; + params: CreateEsQueryRuleParams; + consumer: string; + actions?: any[]; + tags?: any[]; + schedule?: { interval: string }; + notifyWhen?: string; + enabled?: boolean; + expectedStatusCode?: number; + }) { + const { body } = await supertestWithoutAuth + .post(`/api/alerting/rule`) + .set(samlAuth.getInternalRequestHeader()) + .set(roleAuthc.apiKeyHeader) + .send({ + enabled, + params, + consumer, + schedule: schedule || { + interval: '1h', + }, + tags, + name, + rule_type_id: ruleTypeId, + actions, + ...(notifyWhen ? { notify_when: notifyWhen, throttle: '5m' } : {}), + }) + .expect(expectedStatusCode); + return body; + }, + + async createAnomalyRule({ + roleAuthc, + name = generateUniqueKey(), + actions = [], + tags = ['foo', 'bar'], + schedule, + consumer = 'alerts', + notifyWhen, + enabled = true, + ruleTypeId = 'apm.anomaly', + params, + }: { + roleAuthc: RoleCredentials; + name?: string; + consumer?: string; + actions?: any[]; + tags?: any[]; + schedule?: { interval: string }; + notifyWhen?: string; + enabled?: boolean; + ruleTypeId?: string; + params?: any; + }) { + const { body } = await supertestWithoutAuth + .post(`/api/alerting/rule`) + .set(samlAuth.getInternalRequestHeader()) + .set(roleAuthc.apiKeyHeader) + .send({ + enabled, + params: params || { + anomalySeverityType: 'critical', + anomalyDetectorTypes: ['txLatency'], + environment: 'ENVIRONMENT_ALL', + windowSize: 30, + windowUnit: 'm', + }, + consumer, + schedule: schedule || { + interval: '1m', + }, + tags, + name, + rule_type_id: ruleTypeId, + actions, + ...(notifyWhen ? { notify_when: notifyWhen, throttle: '5m' } : {}), + }) + .expect(200); + return body; + }, + + async createLatencyThresholdRule({ + roleAuthc, + name = generateUniqueKey(), + actions = [], + tags = ['foo', 'bar'], + schedule, + consumer = 'apm', + notifyWhen, + enabled = true, + ruleTypeId = 'apm.transaction_duration', + params, + }: { + roleAuthc: RoleCredentials; + name?: string; + consumer?: string; + actions?: any[]; + tags?: any[]; + schedule?: { interval: string }; + notifyWhen?: string; + enabled?: boolean; + ruleTypeId?: string; + params?: any; + }) { + const { body } = await supertestWithoutAuth + .post(`/api/alerting/rule`) + .set(samlAuth.getInternalRequestHeader()) + .set(roleAuthc.apiKeyHeader) + .send({ + enabled, + params: params || { + aggregationType: 'avg', + environment: 'ENVIRONMENT_ALL', + threshold: 1500, + windowSize: 5, + windowUnit: 'm', + }, + consumer, + schedule: schedule || { + interval: '1m', + }, + tags, + name, + rule_type_id: ruleTypeId, + actions, + ...(notifyWhen ? { notify_when: notifyWhen, throttle: '5m' } : {}), + }); + return body; + }, + + async createInventoryRule({ + roleAuthc, + name = generateUniqueKey(), + actions = [], + tags = ['foo', 'bar'], + schedule, + consumer = 'alerts', + notifyWhen, + enabled = true, + ruleTypeId = 'metrics.alert.inventory.threshold', + params, + }: { + roleAuthc: RoleCredentials; + name?: string; + consumer?: string; + actions?: any[]; + tags?: any[]; + schedule?: { interval: string }; + notifyWhen?: string; + enabled?: boolean; + ruleTypeId?: string; + params?: any; + }) { + const { body } = await supertestWithoutAuth + .post(`/api/alerting/rule`) + .set(samlAuth.getInternalRequestHeader()) + .set(roleAuthc.apiKeyHeader) + .send({ + enabled, + params: params || { + nodeType: 'host', + criteria: [ + { + metric: 'cpu', + comparator: '>', + threshold: [5], + timeSize: 1, + timeUnit: 'm', + customMetric: { + type: 'custom', + id: 'alert-custom-metric', + field: '', + aggregation: 'avg', + }, + }, + ], + sourceId: 'default', + }, + consumer, + schedule: schedule || { + interval: '1m', + }, + tags, + name, + rule_type_id: ruleTypeId, + actions, + ...(notifyWhen ? { notify_when: notifyWhen, throttle: '5m' } : {}), + }) + .expect(200); + return body; + }, + + async disableRule({ roleAuthc, ruleId }: { roleAuthc: RoleCredentials; ruleId: string }) { + const { body } = await supertestWithoutAuth + .post(`/api/alerting/rule/${ruleId}/_disable`) + .set(samlAuth.getInternalRequestHeader()) + .set(roleAuthc.apiKeyHeader) + .expect(204); + return body; + }, + + async updateEsQueryRule({ + roleAuthc, + ruleId, + updates, + }: { + roleAuthc: RoleCredentials; + ruleId: string; + updates: any; + }) { + const { body: r } = await supertestWithoutAuth + .get(`/api/alerting/rule/${ruleId}`) + .set(samlAuth.getInternalRequestHeader()) + .set(roleAuthc.apiKeyHeader) + .expect(200); + const body = await supertestWithoutAuth + .put(`/api/alerting/rule/${ruleId}`) + .set(samlAuth.getInternalRequestHeader()) + .set(roleAuthc.apiKeyHeader) + .send({ + ...{ + name: r.name, + schedule: r.schedule, + throttle: r.throttle, + tags: r.tags, + params: r.params, + notify_when: r.notifyWhen, + actions: r.actions.map((action: any) => ({ + group: action.group, + params: action.params, + id: action.id, + frequency: action.frequency, + })), + }, + ...updates, + }) + .expect(200); + return body; + }, + + async runRule({ roleAuthc, ruleId }: { roleAuthc: RoleCredentials; ruleId: string }) { + const response = await supertestWithoutAuth + .post(`/internal/alerting/rule/${ruleId}/_run_soon`) + .set(samlAuth.getInternalRequestHeader()) + .set(roleAuthc.apiKeyHeader) + .expect(204); + return response; + }, + + async waitForNumRuleRuns({ + roleAuthc, + numOfRuns, + ruleId, + esClient, + testStart, + retryOptions = { retryCount: RETRY_COUNT, retryDelay: RETRY_DELAY }, + }: { + roleAuthc: RoleCredentials; + numOfRuns: number; + ruleId: string; + esClient: Client; + testStart: Date; + retryOptions?: TryWithRetriesOptions; + }) { + for (let i = 0; i < numOfRuns; i++) { + await retry.tryWithRetries( + `Alerting API - waitForNumRuleRuns, retryOptions: ${JSON.stringify(retryOptions)}`, + async () => { + await this.runRule({ roleAuthc, ruleId }); + await this.waiting.waitForExecutionEventLog({ + esClient, + filter: testStart, + ruleId, + num: i + 1, + }); + await this.waiting.waitForAllTasksIdle({ esClient, filter: testStart }); + }, + retryOptions + ); + } + }, + + async muteRule({ roleAuthc, ruleId }: { roleAuthc: RoleCredentials; ruleId: string }) { + const { body } = await supertestWithoutAuth + .post(`/api/alerting/rule/${ruleId}/_mute_all`) + .set(samlAuth.getInternalRequestHeader()) + .set(roleAuthc.apiKeyHeader) + .expect(204); + return body; + }, + + async enableRule({ roleAuthc, ruleId }: { roleAuthc: RoleCredentials; ruleId: string }) { + const { body } = await supertestWithoutAuth + .post(`/api/alerting/rule/${ruleId}/_enable`) + .set(samlAuth.getInternalRequestHeader()) + .set(roleAuthc.apiKeyHeader) + .expect(204); + return body; + }, + + async muteAlert({ + roleAuthc, + ruleId, + alertId, + }: { + roleAuthc: RoleCredentials; + ruleId: string; + alertId: string; + }) { + const { body } = await supertestWithoutAuth + .post(`/api/alerting/rule/${ruleId}/alert/${alertId}/_mute`) + .set(samlAuth.getInternalRequestHeader()) + .set(roleAuthc.apiKeyHeader) + .expect(204); + return body; + }, + + async unmuteRule({ roleAuthc, ruleId }: { roleAuthc: RoleCredentials; ruleId: string }) { + const { body } = await supertestWithoutAuth + .post(`/api/alerting/rule/${ruleId}/_unmute_all`) + .set(samlAuth.getInternalRequestHeader()) + .set(roleAuthc.apiKeyHeader) + .expect(204); + return body; + }, + + async snoozeRule({ roleAuthc, ruleId }: { roleAuthc: RoleCredentials; ruleId: string }) { + const { body } = await supertestWithoutAuth + .post(`/internal/alerting/rule/${ruleId}/_snooze`) + .set(samlAuth.getInternalRequestHeader()) + .set(roleAuthc.apiKeyHeader) + .send({ + snooze_schedule: { + duration: 100000000, + rRule: { + count: 1, + dtstart: moment().format(), + tzid: 'UTC', + }, + }, + }) + .expect(204); + return body; + }, + + waiting: { + async waitForDocumentInIndex({ + esClient, + indexName, + ruleId, + num = 1, + sort = 'desc', + retryOptions = { retryCount: RETRY_COUNT, retryDelay: RETRY_DELAY }, + }: { + esClient: Client; + indexName: string; + ruleId: string; + num?: number; + sort?: 'asc' | 'desc'; + retryOptions?: TryWithRetriesOptions; + }): Promise { + return await retry.tryWithRetries( + `Alerting API - waiting.waitForDocumentInIndex, retryOptions: ${JSON.stringify( + retryOptions + )}`, + async () => { + const response = await esClient.search({ + index: indexName, + sort: `date:${sort}`, + query: { + bool: { + must: [ + { + term: { + 'ruleId.keyword': ruleId, + }, + }, + ], + }, + }, + }); + if (response.hits.hits.length < num) { + throw new Error(`Only found ${response.hits.hits.length} / ${num} documents`); + } + return response; + }, + retryOptions + ); + }, + + async getDocumentsInIndex({ + esClient, + indexName, + ruleId, + }: { + esClient: Client; + indexName: string; + ruleId: string; + }): Promise { + return await esClient.search({ + index: indexName, + query: { + bool: { + must: [ + { + term: { + 'ruleId.keyword': ruleId, + }, + }, + ], + }, + }, + }); + }, + + async waitForAllTasksIdle({ + esClient, + filter, + retryOptions = { retryCount: RETRY_COUNT, retryDelay: RETRY_DELAY }, + }: { + esClient: Client; + filter: Date; + retryOptions?: TryWithRetriesOptions; + }): Promise { + return await retry.tryWithRetries( + `Alerting API - waiting.waitForAllTasksIdle, retryOptions: ${JSON.stringify( + retryOptions + )}`, + async () => { + const response = await esClient.search({ + index: '.kibana_task_manager', + query: { + bool: { + must: [ + { + terms: { + 'task.scope': ['actions', 'alerting'], + }, + }, + { + range: { + 'task.scheduledAt': { + gte: filter.getTime().toString(), + }, + }, + }, + ], + must_not: [ + { + term: { + 'task.status': 'idle', + }, + }, + ], + }, + }, + }); + if (response.hits.hits.length !== 0) { + throw new Error(`Expected 0 hits but received ${response.hits.hits.length}`); + } + return response; + }, + retryOptions + ); + }, + + async waitForExecutionEventLog({ + esClient, + filter, + ruleId, + num = 1, + retryOptions = { retryCount: RETRY_COUNT, retryDelay: RETRY_DELAY }, + }: { + esClient: Client; + filter: Date; + ruleId: string; + num?: number; + retryOptions?: TryWithRetriesOptions; + }): Promise { + return await retry.tryWithRetries( + `Alerting API - waiting.waitForExecutionEventLog, retryOptions: ${JSON.stringify( + retryOptions + )}`, + async () => { + const response = await esClient.search({ + index: '.kibana-event-log*', + query: { + bool: { + filter: [ + { + term: { + 'rule.id': { + value: ruleId, + }, + }, + }, + { + term: { + 'event.provider': { + value: 'alerting', + }, + }, + }, + { + term: { + 'event.action': 'execute', + }, + }, + { + range: { + '@timestamp': { + gte: filter.getTime().toString(), + }, + }, + }, + ], + }, + }, + }); + if (response.hits.hits.length < num) { + throw new Error('No hits found'); + } + return response; + }, + retryOptions + ); + }, + + async createIndex({ esClient, indexName }: { esClient: Client; indexName: string }) { + return await esClient.indices.create( + { + index: indexName, + }, + { meta: true } + ); + }, + + async waitForAllTasks({ + esClient, + filter, + taskType, + attempts, + retryOptions = { retryCount: RETRY_COUNT, retryDelay: RETRY_DELAY }, + }: { + esClient: Client; + filter: Date; + taskType: string; + attempts: number; + retryOptions?: TryWithRetriesOptions; + }): Promise { + return await retry.tryWithRetries( + `Alerting API - waiting.waitForAllTasks, retryOptions: ${JSON.stringify(retryOptions)}`, + async () => { + const response = await esClient.search({ + index: '.kibana_task_manager', + query: { + bool: { + must: [ + { + term: { + 'task.status': 'idle', + }, + }, + { + term: { + 'task.attempts': attempts, + }, + }, + { + terms: { + 'task.scope': ['actions', 'alerting'], + }, + }, + { + term: { + 'task.taskType': taskType, + }, + }, + { + range: { + 'task.scheduledAt': { + gte: filter.getTime().toString(), + }, + }, + }, + ], + }, + }, + }); + if (response.hits.hits.length === 0) { + throw new Error('No hits found'); + } + return response; + }, + retryOptions + ); + }, + + async waitForDisabled({ + esClient, + ruleId, + filter, + retryOptions = { retryCount: RETRY_COUNT, retryDelay: RETRY_DELAY }, + }: { + esClient: Client; + ruleId: string; + filter: Date; + retryOptions?: TryWithRetriesOptions; + }): Promise { + return await retry.tryWithRetries( + `Alerting API - waiting.waitForDisabled, retryOptions: ${JSON.stringify(retryOptions)}`, + async () => { + const response = await esClient.search({ + index: '.kibana_task_manager', + query: { + bool: { + must: [ + { + term: { + 'task.id': `task:${ruleId}`, + }, + }, + { + terms: { + 'task.scope': ['actions', 'alerting'], + }, + }, + { + range: { + 'task.scheduledAt': { + gte: filter.getTime().toString(), + }, + }, + }, + { + term: { + 'task.enabled': true, + }, + }, + ], + }, + }, + }); + if (response.hits.hits.length !== 0) { + throw new Error(`Expected 0 hits but received ${response.hits.hits.length}`); + } + return response; + }, + retryOptions + ); + }, + }, + }; + + return { + helpers, + async waitForRuleStatus({ + ruleId, + expectedStatus, + roleAuthc, + spaceId, + timeout = retryTimeout, + }: { + ruleId: string; + expectedStatus: string; + roleAuthc: RoleCredentials; + spaceId?: string; + timeout?: number; + }) { + return await retry.tryForTime(timeout, async () => { + const response = await supertestWithoutAuth + .get(`${spaceId ? '/s/' + spaceId : ''}/api/alerting/rule/${ruleId}`) + .set(roleAuthc.apiKeyHeader) + .set(samlAuth.getInternalRequestHeader()) + .timeout(requestTimeout); + const { execution_status: executionStatus } = response.body || {}; + const { status } = executionStatus || {}; + if (status !== expectedStatus) { + throw new Error(`waitForStatus(${expectedStatus}): got ${status}`); + } + return executionStatus?.status; + }); + }, + + async waitForDocumentInIndex({ + indexName, + docCountTarget = 1, + ruleId, + }: { + indexName: string; + docCountTarget?: number; + ruleId?: string; + }): Promise>> { + return await retry.tryForTime(retryTimeout, async () => { + const response = await es.search({ + index: indexName, + rest_total_hits_as_int: true, + ...(ruleId + ? { + query: { + term: { + 'kibana.alert.rule.uuid': ruleId, + }, + }, + } + : {}), + }); + logger.debug(`Found ${response.hits.total} docs, looking for at least ${docCountTarget}.`); + + if ( + !response.hits.total || + (typeof response.hits.total === 'number' + ? response.hits.total < docCountTarget + : response.hits.total.value < docCountTarget) + ) { + throw new Error('No hits or not enough hits found'); + } + + return response; + }); + }, + + async waitForAlertInIndex({ + indexName, + ruleId, + filters = [], + }: { + indexName: string; + ruleId: string; + filters?: QueryDslQueryContainer[]; + }): Promise>> { + if (!ruleId) { + throw new Error(`'ruleId' is undefined`); + } + return await retry.tryForTime(retryTimeout, async () => { + const response = await es.search({ + index: indexName, + query: { + bool: { + filter: [ + { + term: { + 'kibana.alert.rule.uuid': ruleId, + }, + }, + ...filters, + ], + }, + }, + }); + if (response.hits.hits.length === 0) { + throw new Error('No hits found'); + } + return response; + }); + }, + + async createIndexConnector({ + name, + indexName, + roleAuthc, + spaceId, + }: { + name: string; + indexName: string; + roleAuthc: RoleCredentials; + spaceId?: string; + }) { + const { body } = await supertestWithoutAuth + .post(`${spaceId ? '/s/' + spaceId : ''}/api/actions/connector`) + .set(roleAuthc.apiKeyHeader) + .set(samlAuth.getInternalRequestHeader()) + .send({ + name, + config: { + index: indexName, + refresh: true, + }, + connector_type_id: '.index', + }); + return body.id as string; + }, + + async createRule({ + name, + ruleTypeId, + params, + actions = [], + tags = [], + schedule, + consumer, + roleAuthc, + spaceId, + }: { + ruleTypeId: string; + name: string; + params: + | CreateEsQueryRuleParams + | MetricThresholdParams + | ThresholdParams + | SloBurnRateRuleParams + | ApmRuleParamsType['apm.anomaly'] + | ApmRuleParamsType['apm.error_rate'] + | ApmRuleParamsType['apm.transaction_duration'] + | ApmRuleParamsType['apm.transaction_error_rate'] + | StatusRuleParams; + actions?: any[]; + tags?: any[]; + schedule?: { interval: string }; + consumer: string; + roleAuthc: RoleCredentials; + spaceId?: string; + }) { + const { body } = await supertestWithoutAuth + .post(`${spaceId ? '/s/' + spaceId : ''}/api/alerting/rule`) + .set(roleAuthc.apiKeyHeader) + .set(samlAuth.getInternalRequestHeader()) + .send({ + params, + consumer, + schedule: schedule || { + interval: '5m', + }, + tags, + name, + rule_type_id: ruleTypeId, + actions, + }); + return body; + }, + + async runRule(roleAuthc: RoleCredentials, ruleId: string) { + return await retry.tryForTime(retryTimeout, async () => { + try { + const response = await supertestWithoutAuth + .post(`/internal/alerting/rule/${ruleId}/_run_soon`) + .set(samlAuth.getInternalRequestHeader()) + .set(roleAuthc.apiKeyHeader) + .expect(204); + + if (response.status !== 204) { + throw new Error(`runRuleSoon got ${response.status} status`); + } + return response; + } catch (error) { + throw new Error(`[Rule] Running a rule ${ruleId} failed: ${error}`); + } + }); + }, + + async findInRules(roleAuthc: RoleCredentials, ruleId: string, spaceId?: string) { + const response = await supertestWithoutAuth + .get(`${spaceId ? '/s/' + spaceId : ''}/api/alerting/rules/_find`) + .set(roleAuthc.apiKeyHeader) + .set(samlAuth.getInternalRequestHeader()); + return response.body.data.find((obj: any) => obj.id === ruleId); + }, + + async searchRules(roleAuthc: RoleCredentials, filter: string, spaceId?: string) { + return supertestWithoutAuth + .get(`${spaceId ? '/s/' + spaceId : ''}/api/alerting/rules/_find`) + .query({ filter }) + .set(roleAuthc.apiKeyHeader) + .set(samlAuth.getInternalRequestHeader()); + }, + + async deleteRuleById({ roleAuthc, ruleId }: { roleAuthc: RoleCredentials; ruleId: string }) { + return supertestWithoutAuth + .delete(`/api/alerting/rule/${ruleId}`) + .set(roleAuthc.apiKeyHeader) + .set(samlAuth.getInternalRequestHeader()); + }, + + async deleteRules({ roleAuthc, filter = '' }: { roleAuthc: RoleCredentials; filter?: string }) { + const response = await this.searchRules(roleAuthc, filter); + return Promise.all( + response.body.data.map((rule: any) => this.deleteRuleById({ roleAuthc, ruleId: rule.id })) + ); + }, + + async deleteAllActionConnectors({ roleAuthc }: { roleAuthc: RoleCredentials }): Promise { + const res = await supertestWithoutAuth + .get(`/api/actions/connectors`) + .set(roleAuthc.apiKeyHeader) + .set(samlAuth.getInternalRequestHeader()); + + const body = res.body as Array<{ id: string; connector_type_id: string; name: string }>; + return Promise.all( + body.map(({ id }) => { + return this.deleteActionConnector({ + roleAuthc, + actionId: id, + }); + }) + ); + }, + + async deleteActionConnector({ + roleAuthc, + actionId, + }: { + roleAuthc: RoleCredentials; + actionId: string; + }) { + return supertestWithoutAuth + .delete(`/api/actions/connector/${actionId}`) + .set(roleAuthc.apiKeyHeader) + .set(samlAuth.getInternalRequestHeader()); + }, + + async cleanUpAlerts({ + roleAuthc, + ruleId, + consumer, + alertIndexName, + connectorIndexName, + }: { + roleAuthc: RoleCredentials; + ruleId?: string; + consumer?: string; + alertIndexName?: string; + connectorIndexName?: string; + }) { + return Promise.allSettled([ + // Delete the rule by ID + ruleId ? this.deleteRuleById({ roleAuthc, ruleId }) : this.deleteRules({ roleAuthc }), + // Delete all documents in the alert index if specified + alertIndexName + ? es.deleteByQuery({ + index: alertIndexName, + conflicts: 'proceed', + query: { match_all: {} }, + }) + : Promise.resolve(), + // Delete event logs for the specified consumer if provided + consumer + ? es.deleteByQuery({ + index: '.kibana-event-log-*', + query: { term: { 'kibana.alert.rule.consumer': consumer } }, + }) + : Promise.resolve(), + // Delete connector index if provided + connectorIndexName + ? es.indices.delete({ index: connectorIndexName }).catch((e) => { + if (e instanceof errors.ResponseError && e.statusCode === 404) { + return; + } + + throw e; + }) + : Promise.resolve(), + // Delete all action connectors + this.deleteAllActionConnectors({ roleAuthc }), + ]); + }, + }; +} diff --git a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/services/index.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/services/index.ts index aea8635236c10..bbf2cde5c195c 100644 --- a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/services/index.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/services/index.ts @@ -6,7 +6,11 @@ */ import { services as commonDeploymentAgnosticServices } from '@kbn/test-suites-xpack-platform/api_integration_deployment_agnostic/services'; +import { AlertingApiProvider } from './alerting_api'; import { ApmApiProvider } from './apm_api'; +import { SloApiProvider } from './slo_api'; +import { SynthtraceProvider } from './synthtrace'; +import { ObservabilityAIAssistantApiProvider } from './observability_ai_assistant_api'; export type { InternalRequestHeader, @@ -17,7 +21,12 @@ export type { export const services = { ...commonDeploymentAgnosticServices, // create a new deployment-agnostic service and load here + alertingApi: AlertingApiProvider, apmApi: ApmApiProvider, + sloApi: SloApiProvider, + synthtrace: SynthtraceProvider, + observabilityAIAssistantApi: ObservabilityAIAssistantApiProvider, }; +export type { SupertestWithRoleScopeType } from '@kbn/test-suites-xpack-platform/api_integration_deployment_agnostic/services'; export type DeploymentAgnosticCommonServices = typeof services; diff --git a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/services/observability_ai_assistant_api.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/services/observability_ai_assistant_api.ts new file mode 100644 index 0000000000000..ad325338b673e --- /dev/null +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/services/observability_ai_assistant_api.ts @@ -0,0 +1,182 @@ +/* + * 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. + */ + +import { format } from 'url'; +import request from 'superagent'; +import type { + APIReturnType, + ObservabilityAIAssistantAPIClientRequestParamsOf as APIClientRequestParamsOf, + ObservabilityAIAssistantAPIEndpoint as APIEndpoint, +} from '@kbn/observability-ai-assistant-plugin/public'; +import { formatRequest } from '@kbn/server-route-repository'; +import type { DeploymentAgnosticFtrProviderContext } from '../ftr_provider_context'; + +type Options = { + type?: 'form-data'; + endpoint: TEndpoint; + spaceId?: string; +} & APIClientRequestParamsOf & { + params?: { query?: { _inspect?: boolean } }; + }; + +function createObservabilityAIAssistantApiClient({ + getService, +}: DeploymentAgnosticFtrProviderContext) { + const supertestWithoutAuth = getService('supertestWithoutAuth'); + const samlAuth = getService('samlAuth'); + const logger = getService('log'); + + async function sendApiRequest({ + options, + headers, + }: { + options: Options; + headers: Record; + }): Promise> { + const { endpoint, type } = options; + + const params = 'params' in options ? (options.params as Record) : {}; + + const { method, pathname, version } = formatRequest(endpoint, params.path); + const pathnameWithSpaceId = options.spaceId ? `/s/${options.spaceId}${pathname}` : pathname; + const url = format({ pathname: pathnameWithSpaceId, query: params?.query }); + + logger.debug(`Calling observability_ai_assistant API: ${method.toUpperCase()} ${url}`); + + if (version) { + headers['Elastic-Api-Version'] = version; + } + + let res: request.Response; + + if (type === 'form-data') { + const fields: Array<[string, any]> = Object.entries(params.body); + const formDataRequest = supertestWithoutAuth[method](url) + .set(headers) + .set('Content-type', 'multipart/form-data'); + + for (const field of fields) { + void formDataRequest.field(field[0], field[1]); + } + + res = await formDataRequest; + } else if (params.body) { + res = await supertestWithoutAuth[method](url).send(params.body).set(headers); + } else { + res = await supertestWithoutAuth[method](url).set(headers); + } + + return res; + } + + function makeApiRequest(role: string) { + return async ( + options: Options + ): Promise> => { + const headers: Record = { + ...samlAuth.getInternalRequestHeader(), + ...(await samlAuth.getM2MApiCookieCredentialsWithRoleScope(role)), + }; + + return sendApiRequest({ + options, + headers, + }); + }; + } + + async function deleteAllActionConnectors(): Promise { + const internalReqHeader = samlAuth.getInternalRequestHeader(); + const roleAuthc = await samlAuth.createM2mApiKeyWithRoleScope('editor'); + const res = await supertestWithoutAuth + .get(`/api/actions/connectors`) + .set(roleAuthc.apiKeyHeader) + .set(internalReqHeader); + + const body = res.body as Array<{ id: string; connector_type_id: string; name: string }>; + return Promise.all(body.map(({ id }) => deleteActionConnector({ actionId: id }))); + } + + async function deleteActionConnector({ actionId }: { actionId: string }) { + const internalReqHeader = samlAuth.getInternalRequestHeader(); + const roleAuthc = await samlAuth.createM2mApiKeyWithRoleScope('editor'); + return supertestWithoutAuth + .delete(`/api/actions/connector/${actionId}`) + .set(roleAuthc.apiKeyHeader) + .set(internalReqHeader); + } + + async function createProxyActionConnector({ port }: { port: number }) { + const internalReqHeader = samlAuth.getInternalRequestHeader(); + const roleAuthc = await samlAuth.createM2mApiKeyWithRoleScope('editor'); + try { + const res = await supertestWithoutAuth + .post('/api/actions/connector') + .set(roleAuthc.apiKeyHeader) + .set(internalReqHeader) + .set('kbn-xsrf', 'foo') + .send({ + name: 'OpenAI Proxy', + connector_type_id: '.gen-ai', + config: { + apiProvider: 'OpenAI', + apiUrl: `http://localhost:${port}`, + }, + secrets: { + apiKey: 'my-api-key', + }, + }) + .expect(200); + + const connectorId = res.body.id as string; + return connectorId; + } catch (e) { + logger.error(`Failed to create action connector due to: ${e}`); + throw e; + } + } + + return { + makeApiRequest, + deleteAllActionConnectors, + deleteActionConnector, + createProxyActionConnector, + }; +} + +export type ApiSupertest = ReturnType; + +export class ApiError extends Error { + status: number; + + constructor(res: request.Response, endpoint: string) { + super(`Error calling ${endpoint}: ${res.status} - ${res.text}`); + this.name = 'ApiError'; + this.status = res.status; + } +} + +export interface SupertestReturnType { + status: number; + body: APIReturnType; +} + +export function ObservabilityAIAssistantApiProvider(context: DeploymentAgnosticFtrProviderContext) { + const observabilityAIAssistantApiClient = createObservabilityAIAssistantApiClient(context); + return { + admin: observabilityAIAssistantApiClient.makeApiRequest('admin'), + viewer: observabilityAIAssistantApiClient.makeApiRequest('viewer'), + editor: observabilityAIAssistantApiClient.makeApiRequest('editor'), + deleteAllActionConnectors: observabilityAIAssistantApiClient.deleteAllActionConnectors, + createProxyActionConnector: observabilityAIAssistantApiClient.createProxyActionConnector, + deleteActionConnector: observabilityAIAssistantApiClient.deleteActionConnector, + }; +} + +export type ObservabilityAIAssistantApiClient = ReturnType< + typeof ObservabilityAIAssistantApiProvider +>; diff --git a/x-pack/test/api_integration/deployment_agnostic/services/slo_api.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/services/slo_api.ts similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/services/slo_api.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/services/slo_api.ts diff --git a/x-pack/test/api_integration/deployment_agnostic/services/synthetics_monitor.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/services/synthetics_monitor.ts similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/services/synthetics_monitor.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/services/synthetics_monitor.ts diff --git a/x-pack/test/api_integration/deployment_agnostic/services/synthetics_private_location.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/services/synthetics_private_location.ts similarity index 100% rename from x-pack/test/api_integration/deployment_agnostic/services/synthetics_private_location.ts rename to x-pack/solutions/observability/test/api_integration_deployment_agnostic/services/synthetics_private_location.ts diff --git a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/services/synthtrace.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/services/synthtrace.ts new file mode 100644 index 0000000000000..c3a146a630ff6 --- /dev/null +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/services/synthtrace.ts @@ -0,0 +1,47 @@ +/* + * 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. + */ + +import { ApmSynthtraceKibanaClient, createLogger, LogLevel } from '@kbn/apm-synthtrace'; +import url, { format, UrlObject } from 'url'; + +import { getLogsSynthtraceEsClient } from '../../common/utils/synthtrace/logs_es_client'; +import { getApmSynthtraceEsClient } from '../../common/utils/synthtrace/apm_es_client'; +import type { DeploymentAgnosticFtrProviderContext } from '../ftr_provider_context'; + +function getSynthtraceKibanaClient(kibanaServerUrl: string) { + const kibanaServerUrlWithAuth = url + .format({ + ...url.parse(kibanaServerUrl), + }) + .slice(0, -1); + + const kibanaClient = new ApmSynthtraceKibanaClient({ + target: kibanaServerUrlWithAuth, + logger: createLogger(LogLevel.debug), + }); + + return kibanaClient; +} + +export function SynthtraceProvider({ getService }: DeploymentAgnosticFtrProviderContext) { + const client = getService('es'); + const config = getService('config'); + + const servers = config.get('servers'); + const kibanaServer = servers.kibana as UrlObject; + const kibanaServerUrl = format(kibanaServer); + const apmSynthtraceKibanaClient = getSynthtraceKibanaClient(kibanaServerUrl); + + return { + apmSynthtraceKibanaClient, + createLogsSynthtraceEsClient: () => getLogsSynthtraceEsClient(client), + async createApmSynthtraceEsClient() { + const packageVersion = (await apmSynthtraceKibanaClient.installApmPackage()).version; + return getApmSynthtraceEsClient({ client, packageVersion }); + }, + }; +} diff --git a/x-pack/solutions/observability/test/common/utils/server_route_repository/create_admin_service_from_repository.ts b/x-pack/solutions/observability/test/common/utils/server_route_repository/create_admin_service_from_repository.ts new file mode 100644 index 0000000000000..ad2f8137f3291 --- /dev/null +++ b/x-pack/solutions/observability/test/common/utils/server_route_repository/create_admin_service_from_repository.ts @@ -0,0 +1,237 @@ +/* + * 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. + */ + +import { + formatRequest, + ServerRouteRepository, + EndpointOf, + ReturnOf, + ClientRequestParamsOf, +} from '@kbn/server-route-repository'; +import { Subtract, RequiredKeys } from 'utility-types'; +import { format } from 'url'; +import supertest from 'supertest'; +import { + RoleScopedSupertestProvider, + SupertestWithRoleScope, +} from '@kbn/test-suites-xpack-platform/api_integration_deployment_agnostic/services/role_scoped_supertest'; +import { CustomRoleScopedSupertestProvider } from '@kbn/test-suites-xpack-platform/api_integration_deployment_agnostic/services/custom_role_scoped_supertest'; + +type MaybeOptional> = RequiredKeys extends never + ? [TArgs] | [] + : [TArgs]; + +export interface RepositorySupertestClient { + fetch: >( + endpoint: TEndpoint, + ...options: MaybeOptional< + { + type?: 'form-data'; + } & ClientRequestParamsOf + > + ) => RepositorySupertestReturnOf; + + sendFile: >( + endpoint: TEndpoint, + options: ClientRequestParamsOf & { + file: { key: string; filename: string }; + } + ) => RepositorySupertestReturnOf; +} + +type RepositorySupertestReturnOf< + TServerRouteRepository extends ServerRouteRepository, + TEndpoint extends EndpointOf +> = OverwriteThisMethods< + WithoutPromise, + Promise<{ + text: string; + status: number; + body: ReturnOf; + }> +>; + +async function getApiClient( + supertestWithRoleScoped: SupertestWithRoleScope +): Promise> { + return { + fetch: (endpoint, ...rest) => { + const options = rest.length ? rest[0] : { type: undefined }; + + const { type } = options; + + const params = 'params' in options ? (options.params as Record) : {}; + + const { method, pathname, version } = formatRequest(endpoint, params.path); + const url = format({ pathname, query: params?.query }); + + const headers: Record = { + 'kbn-xsrf': 'foo', + 'x-elastic-internal-origin': 'kibana', + }; + + if (version) { + headers['Elastic-Api-Version'] = version; + } + + let res: unknown; + if (type === 'form-data') { + const fields: Array<[string, any]> = Object.entries(params.body); + const formDataRequest = supertestWithRoleScoped[method](url) + .set(headers) + .set('Content-type', 'multipart/form-data'); + + for (const field of fields) { + void formDataRequest.field(field[0], field[1]); + } + + res = formDataRequest; + } else if (params.body) { + res = supertestWithRoleScoped[method](url).send(params.body).set(headers); + } else { + res = supertestWithRoleScoped[method](url).set(headers); + } + + return res as RepositorySupertestReturnOf< + TServerRouteRepository, + EndpointOf + >; + }, + + sendFile: (endpoint, options) => { + const params = 'params' in options ? (options.params as Record) : {}; + const { method, pathname, version } = formatRequest(endpoint, params.path); + const url = format({ pathname, query: params.query }); + + const headers: Record = { + 'kbn-xsrf': 'foo', + 'x-elastic-internal-origin': 'kibana', + }; + + if (version) { + headers['Elastic-Api-Version'] = version; + } + + const fields: Array<[string, any]> = Object.entries(params.body); + const formDataRequest = supertestWithRoleScoped[method](url) + .set(headers) + .set('Content-type', 'multipart/form-data') + .attach(options.file.key, params.body[options.file.key], { + filename: options.file.filename, + }); + + for (const field of fields.filter(([key]) => key !== options.file.key)) { + void formDataRequest.field(field[0], field[1]); + } + + return formDataRequest as RepositorySupertestReturnOf< + TServerRouteRepository, + EndpointOf + >; + }, + }; +} + +export async function getCustomRoleApiClient( + st: ReturnType +): Promise> { + const supertestWithCustomRoleScoped = await st.getSupertestWithCustomRoleScope({ + useCookieHeader: true, + withInternalHeaders: true, + }); + return await getApiClient(supertestWithCustomRoleScoped); +} + +export async function getAdminApiClient( + st: ReturnType +): Promise> { + const supertestWithRoleScoped = await st.getSupertestWithRoleScope('admin', { + useCookieHeader: true, + withInternalHeaders: true, + }); + return await getApiClient(supertestWithRoleScoped); +} + +type WithoutPromise> = Subtract>; + +// this is a little intense, but without it, method overrides are lost +// e.g., { +// end(one:string) +// end(one:string, two:string) +// } +// would lose the first signature. This keeps up to eight signatures. +type OverloadedParameters = T extends { + (...args: infer A1): any; + (...args: infer A2): any; + (...args: infer A3): any; + (...args: infer A4): any; + (...args: infer A5): any; + (...args: infer A6): any; + (...args: infer A7): any; + (...args: infer A8): any; +} + ? A1 | A2 | A3 | A4 | A5 | A6 | A7 | A8 + : T extends { + (...args: infer A1): any; + (...args: infer A2): any; + (...args: infer A3): any; + (...args: infer A4): any; + (...args: infer A5): any; + (...args: infer A6): any; + (...args: infer A7): any; + } + ? A1 | A2 | A3 | A4 | A5 | A6 | A7 + : T extends { + (...args: infer A1): any; + (...args: infer A2): any; + (...args: infer A3): any; + (...args: infer A4): any; + (...args: infer A5): any; + (...args: infer A6): any; + } + ? A1 | A2 | A3 | A4 | A5 | A6 + : T extends { + (...args: infer A1): any; + (...args: infer A2): any; + (...args: infer A3): any; + (...args: infer A4): any; + (...args: infer A5): any; + } + ? A1 | A2 | A3 | A4 | A5 + : T extends { + (...args: infer A1): any; + (...args: infer A2): any; + (...args: infer A3): any; + (...args: infer A4): any; + } + ? A1 | A2 | A3 | A4 + : T extends { + (...args: infer A1): any; + (...args: infer A2): any; + (...args: infer A3): any; + } + ? A1 | A2 | A3 + : T extends { + (...args: infer A1): any; + (...args: infer A2): any; + } + ? A1 | A2 + : T extends (...args: infer A) => any + ? A + : any; + +type OverrideReturnType any, TNextReturnType> = ( + ...args: OverloadedParameters +) => WithoutPromise> & TNextReturnType; + +type OverwriteThisMethods, TNextReturnType> = TNextReturnType & { + [key in keyof T]: T[key] extends (...args: infer TArgs) => infer TReturnType + ? TReturnType extends Promise + ? OverrideReturnType + : (...args: TArgs) => TReturnType + : T[key]; +}; diff --git a/x-pack/solutions/observability/test/common/utils/synthtrace/apm_es_client.ts b/x-pack/solutions/observability/test/common/utils/synthtrace/apm_es_client.ts new file mode 100644 index 0000000000000..932b55cafd056 --- /dev/null +++ b/x-pack/solutions/observability/test/common/utils/synthtrace/apm_es_client.ts @@ -0,0 +1,26 @@ +/* + * 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. + */ + +import { Client } from '@elastic/elasticsearch'; +import { ApmSynthtraceEsClient, createLogger, LogLevel } from '@kbn/apm-synthtrace'; + +interface GetApmSynthtraceEsClientParams { + client: Client; + packageVersion: string; +} + +export function getApmSynthtraceEsClient({ + client, + packageVersion, +}: GetApmSynthtraceEsClientParams) { + return new ApmSynthtraceEsClient({ + client, + logger: createLogger(LogLevel.info), + version: packageVersion, + refreshAfterIndex: true, + }); +} diff --git a/x-pack/solutions/observability/test/common/utils/synthtrace/infra_es_client.ts b/x-pack/solutions/observability/test/common/utils/synthtrace/infra_es_client.ts new file mode 100644 index 0000000000000..1eccad6a2ab3c --- /dev/null +++ b/x-pack/solutions/observability/test/common/utils/synthtrace/infra_es_client.ts @@ -0,0 +1,17 @@ +/* + * 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. + */ + +import { Client } from '@elastic/elasticsearch'; +import { InfraSynthtraceEsClient, createLogger, LogLevel } from '@kbn/apm-synthtrace'; + +export function getInfraSynthtraceEsClient(client: Client) { + return new InfraSynthtraceEsClient({ + client, + logger: createLogger(LogLevel.info), + refreshAfterIndex: true, + }); +} diff --git a/x-pack/solutions/observability/test/common/utils/synthtrace/logs_es_client.ts b/x-pack/solutions/observability/test/common/utils/synthtrace/logs_es_client.ts new file mode 100644 index 0000000000000..a6d049d8d3b6b --- /dev/null +++ b/x-pack/solutions/observability/test/common/utils/synthtrace/logs_es_client.ts @@ -0,0 +1,17 @@ +/* + * 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. + */ + +import { Client } from '@elastic/elasticsearch'; +import { LogsSynthtraceEsClient, createLogger, LogLevel } from '@kbn/apm-synthtrace'; + +export function getLogsSynthtraceEsClient(client: Client) { + return new LogsSynthtraceEsClient({ + client, + logger: createLogger(LogLevel.info), + refreshAfterIndex: true, + }); +} diff --git a/x-pack/solutions/observability/test/tsconfig.json b/x-pack/solutions/observability/test/tsconfig.json index 1a062fa60ee8d..5b477a333c9b2 100644 --- a/x-pack/solutions/observability/test/tsconfig.json +++ b/x-pack/solutions/observability/test/tsconfig.json @@ -53,5 +53,31 @@ "@kbn/logging", "@kbn/core-saved-objects-server", "@kbn/data-forge", + "@kbn/observability-ai-assistant-plugin", + "@kbn/inference-common", + "@kbn/alerts-ui-shared", + "@kbn/lock-manager", + "@kbn/ai-assistant-common", + "@kbn/core", + "@kbn/share-plugin", + "@kbn/es-query", + "@kbn/response-ops-rule-params", + "@kbn/alerting-types", + "@kbn/alerting-plugin", + "@kbn/observability-synthetics-test-data", + "@kbn/observability-shared-plugin", + "@kbn/data-views-plugin", + "@kbn/apm-data-view", + "@kbn/rison", + "@kbn/dataset-quality-plugin", + "@kbn/metrics-data-access-plugin", + "@kbn/observability-onboarding-plugin", + "@kbn/slo-plugin", + "@kbn/slo-schema", + "@kbn/streams-schema", + "@kbn/streams-plugin", + "@kbn/es-errors", + "@kbn/content-packs-schema", + "@kbn/server-route-repository-utils", ] } diff --git a/x-pack/solutions/security/test/alerting_api_integration/security_and_spaces/group2/config_non_dedicated_task_runner.ts b/x-pack/solutions/security/test/alerting_api_integration/security_and_spaces/group2/config_non_dedicated_task_runner.ts index 32179d9a17edd..d70b49ddd3aff 100644 --- a/x-pack/solutions/security/test/alerting_api_integration/security_and_spaces/group2/config_non_dedicated_task_runner.ts +++ b/x-pack/solutions/security/test/alerting_api_integration/security_and_spaces/group2/config_non_dedicated_task_runner.ts @@ -7,7 +7,6 @@ import { createTestConfig } from '@kbn/test-suites-xpack-platform/alerting_api_integration/common/config'; -// eslint-disable-next-line import/no-default-export export default createTestConfig('security_and_spaces', { disabledPlugins: [], license: 'trial', diff --git a/x-pack/solutions/security/test/cases_api_integration/security_and_spaces/config_basic.ts b/x-pack/solutions/security/test/cases_api_integration/security_and_spaces/config_basic.ts index 9fd63ddc84258..f7c7c6e191f75 100644 --- a/x-pack/solutions/security/test/cases_api_integration/security_and_spaces/config_basic.ts +++ b/x-pack/solutions/security/test/cases_api_integration/security_and_spaces/config_basic.ts @@ -7,7 +7,6 @@ import { createTestConfig } from '@kbn/test-suites-xpack-platform/cases_api_integration/common/config'; -// eslint-disable-next-line import/no-default-export export default createTestConfig('security_and_spaces', { license: 'trial', ssl: true, diff --git a/x-pack/solutions/security/test/cases_api_integration/security_and_spaces/config_trial.ts b/x-pack/solutions/security/test/cases_api_integration/security_and_spaces/config_trial.ts index 87573fba4d702..5fbd70025223c 100644 --- a/x-pack/solutions/security/test/cases_api_integration/security_and_spaces/config_trial.ts +++ b/x-pack/solutions/security/test/cases_api_integration/security_and_spaces/config_trial.ts @@ -7,7 +7,6 @@ import { createTestConfig } from '@kbn/test-suites-xpack-platform/cases_api_integration/common/config'; -// eslint-disable-next-line import/no-default-export export default createTestConfig('security_and_spaces', { license: 'trial', ssl: true, diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/alerts/helpers/alerting_helper.ts b/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/alerts/helpers/alerting_helper.ts index e5dcd4a45ac3b..dd51745179380 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/alerts/helpers/alerting_helper.ts +++ b/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/alerts/helpers/alerting_helper.ts @@ -6,91 +6,8 @@ */ import { ParsedTechnicalFields } from '@kbn/rule-registry-plugin/common'; -import { ApmDocumentType } from '@kbn/apm-plugin/common/document_type'; -import { RollupInterval } from '@kbn/apm-plugin/common/rollup'; import { ObservabilityApmAlert } from '@kbn/alerts-as-data-utils'; -import type { ApmApiClient } from '../../../../../services/apm_api'; export const APM_ALERTS_INDEX = '.alerts-observability.apm.alerts-*'; export const APM_ACTION_VARIABLE_INDEX = 'apm-index-connector-test'; - -function getTimerange() { - return { - start: new Date(Date.now() - 24 * 60 * 60 * 1000).toISOString(), - end: new Date(Date.now() + 5 * 60 * 1000).toISOString(), - }; -} - -export async function fetchServiceInventoryAlertCounts(apmApiClient: ApmApiClient) { - const timerange = getTimerange(); - const serviceInventoryResponse = await apmApiClient.readUser({ - endpoint: 'GET /internal/apm/services', - params: { - query: { - ...timerange, - environment: 'ENVIRONMENT_ALL', - kuery: '', - probability: 1, - documentType: ApmDocumentType.ServiceTransactionMetric, - rollupInterval: RollupInterval.SixtyMinutes, - useDurationSummary: true, - }, - }, - }); - - return serviceInventoryResponse.body.items.reduce>((acc, item) => { - return { ...acc, [item.serviceName]: item.alertsCount ?? 0 }; - }, {}); -} - -export async function fetchServiceTabAlertCount({ - apmApiClient, - serviceName, -}: { - apmApiClient: ApmApiClient; - serviceName: string; -}) { - const timerange = getTimerange(); - const alertsCountReponse = await apmApiClient.readUser({ - endpoint: 'GET /internal/apm/services/{serviceName}/alerts_count', - params: { - path: { - serviceName, - }, - query: { - ...timerange, - environment: 'ENVIRONMENT_ALL', - }, - }, - }); - - return alertsCountReponse.body.alertsCount; -} - -export function getIndexAction({ - actionId, - actionVariables, -}: { - actionId: string; - actionVariables: Array<{ name: string }>; -}) { - return { - group: 'threshold_met', - id: actionId, - params: { - documents: [ - actionVariables.reduce>((acc, actionVariable) => { - acc[actionVariable.name] = `{{context.${actionVariable.name}}}`; - return acc; - }, {}), - ], - }, - frequency: { - notify_when: 'onActionGroupChange', - throttle: null, - summary: false, - }, - }; -} - export type ApmAlertFields = ParsedTechnicalFields & ObservabilityApmAlert; diff --git a/x-pack/test/api_integration/deployment_agnostic/services/apm_api.ts b/x-pack/test/api_integration/deployment_agnostic/services/apm_api.ts deleted file mode 100644 index 12f571ccb55ba..0000000000000 --- a/x-pack/test/api_integration/deployment_agnostic/services/apm_api.ts +++ /dev/null @@ -1,211 +0,0 @@ -/* - * 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. - */ - -import { format } from 'url'; -import request from 'superagent'; -import type { - APIReturnType, - APIClientRequestParamsOf, -} from '@kbn/apm-plugin/public/services/rest/create_call_apm_api'; -import { APIEndpoint } from '@kbn/apm-plugin/server'; -import type { - APIEndpoint as SourcesAPIEndpoint, - APIReturnType as SourcesAPIReturnType, - APIClientRequestParamsOf as SourcesAPIClientRequestParamsOf, -} from '@kbn/apm-sources-access-plugin/server'; -import { formatRequest } from '@kbn/server-route-repository'; -import { RoleCredentials } from '@kbn/ftr-common-functional-services'; -import type { DeploymentAgnosticFtrProviderContext } from '../ftr_provider_context'; - -type CombinedAPIRequest = - TEndpoint extends APIEndpoint - ? APIReturnType - : TEndpoint extends SourcesAPIEndpoint - ? SourcesAPIReturnType - : never; - -type CombinedOptions = - TEndpoint extends APIEndpoint - ? Options - : TEndpoint extends SourcesAPIEndpoint - ? SourceOptions - : never; - -type Options = { - type?: 'form-data'; - endpoint: TEndpoint; - spaceId?: string; -} & APIClientRequestParamsOf & { - params?: { query?: { _inspect?: boolean } }; - }; - -type SourceOptions = { - type?: 'form-data'; - endpoint: TEndpoint; - spaceId?: string; -} & SourcesAPIClientRequestParamsOf; - -type InternalEndpoint = - T extends `${string} /internal/${string}` ? T : never; - -type PublicEndpoint = T extends `${string} /api/${string}` ? T : never; - -function createApmApiClient({ getService }: DeploymentAgnosticFtrProviderContext) { - const supertestWithoutAuth = getService('supertestWithoutAuth'); - const samlAuth = getService('samlAuth'); - const logger = getService('log'); - - async function makeApiRequest< - TEndpoint extends APIEndpoint | SourcesAPIEndpoint, - TOpts extends CombinedOptions - >({ - options, - headers, - }: { - options: TOpts; - headers: Record; - }): Promise> { - const { endpoint, type } = options; - - const params = 'params' in options ? (options.params as Record) : {}; - - const { method, pathname, version } = formatRequest(endpoint, params.path); - const pathnameWithSpaceId = options.spaceId ? `/s/${options.spaceId}${pathname}` : pathname; - const url = format({ pathname: pathnameWithSpaceId, query: params?.query }); - - logger.debug(`Calling APM API: ${method.toUpperCase()} ${url}`); - - if (version) { - headers['Elastic-Api-Version'] = version; - } - - let res: request.Response; - - if (type === 'form-data') { - const fields: Array<[string, any]> = Object.entries(params.body); - const formDataRequest = supertestWithoutAuth[method](url) - .set(headers) - .set('Content-type', 'multipart/form-data'); - - for (const field of fields) { - void formDataRequest.field(field[0], field[1]); - } - - res = await formDataRequest; - } else if (params.body) { - res = await supertestWithoutAuth[method](url).send(params.body).set(headers); - } else { - res = await supertestWithoutAuth[method](url).set(headers); - } - - // supertest doesn't throw on http errors - if (res?.status !== 200) { - throw new ApmApiError(res, endpoint); - } - - return res; - } - - function makeInternalApiRequest(role: string) { - return async >( - options: CombinedOptions - ): Promise> => { - const headers: Record = { - ...samlAuth.getInternalRequestHeader(), - ...(await samlAuth.getM2MApiCookieCredentialsWithRoleScope(role)), - }; - - return makeApiRequest({ - options, - headers, - }); - }; - } - - function makeInternalSourceRequest(role: string) { - return async >( - options: CombinedOptions - ): Promise> => { - const headers: Record = { - ...samlAuth.getInternalRequestHeader(), - ...(await samlAuth.getM2MApiCookieCredentialsWithRoleScope(role)), - }; - - return makeApiRequest({ - options, - headers, - }); - }; - } - - function makePublicApiRequest() { - return async >( - options: CombinedOptions & { - roleAuthc: RoleCredentials; - } - ): Promise> => { - const headers: Record = { - ...samlAuth.getInternalRequestHeader(), - ...options.roleAuthc.apiKeyHeader, - }; - - return makeApiRequest({ - options, - headers, - }); - }; - } - - return { - makeInternalApiRequest, - makePublicApiRequest, - makeInternalSourceRequest, - }; -} - -type ApiErrorResponse = Omit & { - body: { - statusCode: number; - error: string; - message: string; - attributes: object; - }; -}; - -export type ApmApiSupertest = ReturnType; - -export class ApmApiError extends Error { - res: ApiErrorResponse; - - constructor(res: request.Response, endpoint: string) { - super( - `Unhandled ApmApiError. -Status: "${res.status}" -Endpoint: "${endpoint}" -Body: ${JSON.stringify(res.body)}` - ); - - this.res = res; - } -} - -export interface SupertestReturnType { - status: number; - body: CombinedAPIRequest; -} - -export function ApmApiProvider(context: DeploymentAgnosticFtrProviderContext) { - const apmClient = createApmApiClient(context); - return { - readUser: apmClient.makeInternalApiRequest('viewer'), - adminUser: apmClient.makeInternalApiRequest('admin'), - writeUser: apmClient.makeInternalApiRequest('editor'), - publicApi: apmClient.makePublicApiRequest(), - }; -} - -export type ApmApiClient = ReturnType; diff --git a/x-pack/test/api_integration/deployment_agnostic/services/index.ts b/x-pack/test/api_integration/deployment_agnostic/services/index.ts index f8467e5b38834..92bb663aa0dc1 100644 --- a/x-pack/test/api_integration/deployment_agnostic/services/index.ts +++ b/x-pack/test/api_integration/deployment_agnostic/services/index.ts @@ -7,11 +7,9 @@ import { services as platformDeploymentAgnosticServices } from '@kbn/test-suites-xpack-platform/api_integration_deployment_agnostic/services'; import { SupertestWithRoleScope } from '@kbn/test-suites-xpack-platform/api_integration_deployment_agnostic/services/role_scoped_supertest'; -import { AlertingApiProvider } from './alerting_api'; -import { SloApiProvider } from './slo_api'; import { SynthtraceProvider } from './synthtrace'; -import { ApmApiProvider } from './apm_api'; import { ObservabilityAIAssistantApiProvider } from './observability_ai_assistant_api'; +import { AlertingApiProvider } from './alerting_api'; export type { InternalRequestHeader, @@ -21,11 +19,9 @@ export type { export const services = { ...platformDeploymentAgnosticServices, - // create a new deployment-agnostic service and load here + // these services are left for compatibility with existing tests in x-pack/test and should not be used in new tests alertingApi: AlertingApiProvider, - sloApi: SloApiProvider, synthtrace: SynthtraceProvider, - apmApi: ApmApiProvider, observabilityAIAssistantApi: ObservabilityAIAssistantApiProvider, }; diff --git a/x-pack/test/tsconfig.json b/x-pack/test/tsconfig.json index 7b9d3f34d60cb..cda2171367296 100644 --- a/x-pack/test/tsconfig.json +++ b/x-pack/test/tsconfig.json @@ -28,9 +28,7 @@ ], "kbn_references": [ "@kbn/test-suites-src", - "@kbn/core", "@kbn/data-plugin", - "@kbn/share-plugin", "@kbn/telemetry-collection-manager-plugin", "@kbn/alerting-plugin", "@kbn/apm-plugin", @@ -85,7 +83,6 @@ "@kbn/stdio-dev-helpers", "@kbn/cloud-integration-saml-provider-plugin", "@kbn/security-api-integration-helpers", - "@kbn/alerts-as-data-utils", "@kbn/discover-plugin", "@kbn/shared-ux-file-types", "@kbn/guided-onboarding-plugin", @@ -102,7 +99,6 @@ "@kbn/uptime-plugin", "@kbn/ml-category-validator", "@kbn/observability-ai-assistant-plugin", - "@kbn/metrics-data-access-plugin", "@kbn/dataset-quality-plugin", "@kbn/observability-logs-explorer-plugin", "@kbn/io-ts-utils", @@ -114,38 +110,35 @@ "@kbn/infra-forge", "@kbn/slo-plugin", "@kbn/observability-ai-assistant-app-plugin", - "@kbn/apm-data-view", "@kbn/search-types", "@kbn/alerting-comparators", "@kbn/data-quality-plugin", - "@kbn/observability-synthetics-test-data", "@kbn/openapi-common", "@kbn/securitysolution-lists-common", "@kbn/securitysolution-exceptions-common", "@kbn/securitysolution-endpoint-exceptions-common", "@kbn/osquery-plugin", - "@kbn/alerting-types", - "@kbn/ai-assistant-common", "@kbn/core-deprecations-common", "@kbn/usage-collection-plugin", "@kbn/palettes", "@kbn/sse-utils-server", "@kbn/gen-ai-functional-testing", - "@kbn/streams-schema", - "@kbn/server-route-repository-utils", - "@kbn/streams-plugin", - "@kbn/response-ops-rule-params", "@kbn/scout-info", "@kbn/inference-common", "@kbn/apm-sources-access-plugin", - "@kbn/es-errors", - "@kbn/content-packs-schema", - "@kbn/lock-manager", - "@kbn/alerts-ui-shared", "@kbn/test-suites-xpack-platform", "@kbn/apm-sources-access-plugin", "@kbn/dev-proc-runner", "@kbn/core-provider-plugin", "@kbn/management-settings-ids", + "@kbn/core-chrome-browser", + "@kbn/test-suites-xpack-platform", + "@kbn/core-chrome-browser", + "@kbn/core-provider-plugin", + "@kbn/ai-assistant-common", + "@kbn/core", + "@kbn/logging", + "@kbn/alerts-as-data-utils", + "@kbn/response-ops-rule-params", ] } diff --git a/x-pack/test_serverless/functional/test_suites/observability/streams/read_privilege.ts b/x-pack/test_serverless/functional/test_suites/observability/streams/read_privilege.ts index f0bead574bd69..66155cd86a06e 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/streams/read_privilege.ts +++ b/x-pack/test_serverless/functional/test_suites/observability/streams/read_privilege.ts @@ -6,18 +6,18 @@ */ import { Streams } from '@kbn/streams-schema'; -import { DeploymentAgnosticFtrProviderContext } from '@kbn/test-suites-xpack/api_integration/deployment_agnostic/ftr_provider_context'; +import { DeploymentAgnosticFtrProviderContext } from '@kbn/test-suites-xpack-observability/api_integration_deployment_agnostic/ftr_provider_context'; import { StreamsSupertestRepositoryClient, createStreamsRepositoryAdminClient, createStreamsRepositoryCustomRoleClient, -} from '@kbn/test-suites-xpack/api_integration/deployment_agnostic/apis/observability/streams/helpers/repository_client'; +} from '@kbn/test-suites-xpack-observability/api_integration_deployment_agnostic/apis/streams/helpers/repository_client'; import { disableStreams, enableStreams, getStream, putStream, -} from '@kbn/test-suites-xpack/api_integration/deployment_agnostic/apis/observability/streams/helpers/requests'; +} from '@kbn/test-suites-xpack-observability/api_integration_deployment_agnostic/apis/streams/helpers/requests'; const STREAM_NAME = 'logs.crud'; const request: Streams.WiredStream.UpsertRequest = { diff --git a/x-pack/test_serverless/tsconfig.json b/x-pack/test_serverless/tsconfig.json index 7dd195f06bd0f..0e30320e01711 100644 --- a/x-pack/test_serverless/tsconfig.json +++ b/x-pack/test_serverless/tsconfig.json @@ -94,5 +94,6 @@ "@kbn/streams-schema", "@kbn/test-suites-xpack-platform", "@kbn/test-suites-xpack-security", + "@kbn/test-suites-xpack-observability", ] } From c8242f8727544b9e6e5a347656ee285b88c30639 Mon Sep 17 00:00:00 2001 From: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Date: Fri, 1 Aug 2025 14:24:00 +0000 Subject: [PATCH 02/11] [CI] Auto-commit changed files from 'node scripts/lint_ts_projects --fix' --- x-pack/test/tsconfig.json | 1 - 1 file changed, 1 deletion(-) diff --git a/x-pack/test/tsconfig.json b/x-pack/test/tsconfig.json index cda2171367296..39efc722c5133 100644 --- a/x-pack/test/tsconfig.json +++ b/x-pack/test/tsconfig.json @@ -131,7 +131,6 @@ "@kbn/dev-proc-runner", "@kbn/core-provider-plugin", "@kbn/management-settings-ids", - "@kbn/core-chrome-browser", "@kbn/test-suites-xpack-platform", "@kbn/core-chrome-browser", "@kbn/core-provider-plugin", From 82e0c4fd6658f36fcb5c8bd9331cfd6d3b0bdd6d Mon Sep 17 00:00:00 2001 From: Dzmitry Lemechko Date: Fri, 1 Aug 2025 18:31:45 +0200 Subject: [PATCH 03/11] delete stale files --- .../oblt.ai_assistant_local.index.ts | 15 ---------- ...lt.ai_assistant_local.serverless.config.ts | 18 ------------ .../stateful/oblt.ai_assistant.index.ts | 13 --------- .../oblt.ai_assistant.stateful.config.ts | 29 ------------------- .../stateful/oblt.ai_assistant_local.index.ts | 13 --------- ...oblt.ai_assistant_local.stateful.config.ts | 17 ----------- 6 files changed, 105 deletions(-) delete mode 100644 x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.ai_assistant_local.index.ts delete mode 100644 x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.ai_assistant_local.serverless.config.ts delete mode 100644 x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.ai_assistant.index.ts delete mode 100644 x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.ai_assistant.stateful.config.ts delete mode 100644 x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.ai_assistant_local.index.ts delete mode 100644 x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.ai_assistant_local.stateful.config.ts diff --git a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.ai_assistant_local.index.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.ai_assistant_local.index.ts deleted file mode 100644 index 5d3f630667adf..0000000000000 --- a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.ai_assistant_local.index.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* - * 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. - */ -import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; - -export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) { - describe('Serverless Observability - Deployment-agnostic AI Assistant local-only tests', function () { - this.tags(['esGate']); - - loadTestFile(require.resolve('../../apis/ai_assistant/local')); - }); -} diff --git a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.ai_assistant_local.serverless.config.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.ai_assistant_local.serverless.config.ts deleted file mode 100644 index 46a9ece630ba8..0000000000000 --- a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.ai_assistant_local.serverless.config.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* - * 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. - */ - -import { createServerlessTestConfig } from '@kbn/test-suites-xpack-platform/api_integration_deployment_agnostic/default_configs/serverless.config.base'; -import { services } from '../../services'; - -export default createServerlessTestConfig({ - services, - serverlessProject: 'oblt', - testFiles: [require.resolve('./oblt.ai_assistant_local.index.ts')], - junit: { - reportName: 'Serverless Observability - Deployment-agnostic AI Assistant local-only tests', - }, -}); diff --git a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.ai_assistant.index.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.ai_assistant.index.ts deleted file mode 100644 index bc579533bdeb5..0000000000000 --- a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.ai_assistant.index.ts +++ /dev/null @@ -1,13 +0,0 @@ -/* - * 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. - */ -import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; - -export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) { - describe('Stateful Observability - Deployment-agnostic AI Assistant API integration tests', function () { - loadTestFile(require.resolve('../../apis/ai_assistant')); - }); -} diff --git a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.ai_assistant.stateful.config.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.ai_assistant.stateful.config.ts deleted file mode 100644 index 15758b95ca69d..0000000000000 --- a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.ai_assistant.stateful.config.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* - * 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. - */ - -import { createStatefulTestConfig } from '@kbn/test-suites-xpack-platform/api_integration_deployment_agnostic/default_configs/stateful.config.base'; -import { services } from '../../services'; - -export default createStatefulTestConfig({ - services, - testFiles: [require.resolve('./oblt.ai_assistant.index.ts')], - junit: { - reportName: 'Stateful Observability - Deployment-agnostic API Integration Tests', - }, - // @ts-expect-error - kbnTestServer: { - serverArgs: [ - `--logging.loggers=${JSON.stringify([ - { - name: 'plugins.observabilityAIAssistant', - level: 'all', - appenders: ['default'], - }, - ])}`, - ], - }, -}); diff --git a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.ai_assistant_local.index.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.ai_assistant_local.index.ts deleted file mode 100644 index 83a7071eb10ac..0000000000000 --- a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.ai_assistant_local.index.ts +++ /dev/null @@ -1,13 +0,0 @@ -/* - * 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. - */ -import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; - -export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) { - describe('Stateful Observability - Deployment-agnostic AI Assistant local-only tests', function () { - loadTestFile(require.resolve('../../apis/ai_assistant/local')); - }); -} diff --git a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.ai_assistant_local.stateful.config.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.ai_assistant_local.stateful.config.ts deleted file mode 100644 index 7b28c46e16459..0000000000000 --- a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.ai_assistant_local.stateful.config.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* - * 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. - */ - -import { createStatefulTestConfig } from '@kbn/test-suites-xpack-platform/api_integration_deployment_agnostic/default_configs/stateful.config.base'; -import { services } from '../../services'; - -export default createStatefulTestConfig({ - services, - testFiles: [require.resolve('./oblt.ai_assistant_local.index.ts')], - junit: { - reportName: 'Stateful Observability - Deployment-agnostic AI Assistant local-only tests', - }, -}); From 92667703716f1bfa4c7127b866f8977623b454ee Mon Sep 17 00:00:00 2001 From: Dzmitry Lemechko Date: Fri, 1 Aug 2025 18:46:14 +0200 Subject: [PATCH 04/11] delete stale files --- .../knowledge_base_bulk_import.spec.ts | 58 ------------------- 1 file changed, 58 deletions(-) delete mode 100644 x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/knowledge_base_bulk_import.spec.ts diff --git a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/knowledge_base_bulk_import.spec.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/knowledge_base_bulk_import.spec.ts deleted file mode 100644 index 7b7834b9731f5..0000000000000 --- a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/knowledge_base/knowledge_base_bulk_import.spec.ts +++ /dev/null @@ -1,58 +0,0 @@ -/* - * 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. - */ - -import expect from '@kbn/expect'; -import { ELSER_ON_ML_NODE_INFERENCE_ID } from '@kbn/observability-ai-assistant-plugin/common/preconfigured_inference_ids'; -import { - clearKnowledgeBase, - getKnowledgeBaseEntriesFromEs, - setupKnowledgeBase, - waitForKnowledgeBaseReady, -} from '../utils/knowledge_base'; -import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; - -export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) { - const es = getService('es'); - const observabilityAIAssistantAPIClient = getService('observabilityAIAssistantApi'); - - describe('Knowledge base: Bulk import operation with real ELSER model', function () { - // This test is intentionally skipped in both serverless and stateful - // since it is not meant to be run on CI but only as a manual test - before(async () => { - await setupKnowledgeBase(getService, ELSER_ON_ML_NODE_INFERENCE_ID); - await waitForKnowledgeBaseReady(getService); - }); - - after(async () => { - await clearKnowledgeBase(es); - }); - - describe('when importing a large number of entries', () => { - it('handles a large number of entries gracefully', async () => { - const entries = Array.from({ length: 2000 }, (_, i) => ({ - id: `my_doc_${i}`, - title: `My title ${i}`, - text: `My content ${i}`, - })); - - const { status } = await observabilityAIAssistantAPIClient.editor({ - endpoint: 'POST /internal/observability_ai_assistant/kb/entries/import', - params: { - body: { - entries, - }, - }, - }); - - expect(status).to.be(200); - - const hits = await getKnowledgeBaseEntriesFromEs(es, 2000); - expect(hits.length).to.be(2000); - }); - }); - }); -} From 9cf0d05bb89a77c0cf8a07d9e63d28fe4eb687a2 Mon Sep 17 00:00:00 2001 From: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Date: Fri, 1 Aug 2025 17:29:44 +0000 Subject: [PATCH 05/11] [CI] Auto-commit changed files from 'node scripts/lint_ts_projects --fix' --- x-pack/test/tsconfig.json | 1 - 1 file changed, 1 deletion(-) diff --git a/x-pack/test/tsconfig.json b/x-pack/test/tsconfig.json index 39efc722c5133..63b5b5770f07e 100644 --- a/x-pack/test/tsconfig.json +++ b/x-pack/test/tsconfig.json @@ -132,7 +132,6 @@ "@kbn/core-provider-plugin", "@kbn/management-settings-ids", "@kbn/test-suites-xpack-platform", - "@kbn/core-chrome-browser", "@kbn/core-provider-plugin", "@kbn/ai-assistant-common", "@kbn/core", From 33dca8055f945839a617fcf416ac167cd5a8070c Mon Sep 17 00:00:00 2001 From: Dzmitry Lemechko Date: Fri, 1 Aug 2025 19:42:29 +0200 Subject: [PATCH 06/11] remove stale files --- .../ai_assistant/utils/model_and_inference.ts | 27 +++---------------- .../create_monitor_project_multi_space.ts | 2 +- .../serverless/oblt.index.ts | 27 ------------------- .../stateful/oblt.index.ts | 27 ------------------- 4 files changed, 4 insertions(+), 79 deletions(-) delete mode 100644 x-pack/test/api_integration/deployment_agnostic/feature_flag_configs/serverless/oblt.index.ts delete mode 100644 x-pack/test/api_integration/deployment_agnostic/feature_flag_configs/stateful/oblt.index.ts diff --git a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/utils/model_and_inference.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/utils/model_and_inference.ts index a434be04f3745..5af3c5131aef6 100644 --- a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/utils/model_and_inference.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/utils/model_and_inference.ts @@ -8,8 +8,7 @@ import { Client, errors } from '@elastic/elasticsearch'; import { ToolingLog } from '@kbn/tooling-log'; import { InferenceTaskType } from '@elastic/elasticsearch/lib/api/types'; -import pRetry, { AbortError } from 'p-retry'; -import pTimeout, { TimeoutError } from 'p-timeout'; +import pRetry from 'p-retry'; import { SUPPORTED_TRAINED_MODELS } from '@kbn/test-suites-xpack-platform/functional/services/ml/api'; import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; import { setupKnowledgeBase, waitForKnowledgeBaseReady } from './knowledge_base'; @@ -38,7 +37,6 @@ export async function importModel( try { await ml.api.importTrainedModel(modelId, modelId, config); - log.info(`Model "${modelId}" imported successfully.`); } catch (error) { if ( error.message.includes('resource_already_exists_exception') || @@ -85,10 +83,8 @@ export async function startModelDeployment( export async function setupTinyElserModelAndInferenceEndpoint( getService: DeploymentAgnosticFtrProviderContext['getService'] ) { - await retryOnTimeout(() => importModel(getService, { modelId: TINY_ELSER_MODEL_ID })); - await retryOnTimeout(() => - createTinyElserInferenceEndpoint(getService, { inferenceId: TINY_ELSER_INFERENCE_ID }) - ); + await importModel(getService, { modelId: TINY_ELSER_MODEL_ID }); + await createTinyElserInferenceEndpoint(getService, { inferenceId: TINY_ELSER_INFERENCE_ID }); } export async function teardownTinyElserModelAndInferenceEndpoint( @@ -254,20 +250,3 @@ export async function stopTinyElserModel( log.error(`Could not stop knowledge base model (${TINY_ELSER_MODEL_ID}): ${e}`); } } - -async function retryOnTimeout(fn: () => Promise, timeout = 60_000): Promise { - return pRetry( - async () => { - try { - return await pTimeout(fn(), { milliseconds: timeout }); - } catch (err: any) { - if (!(err instanceof TimeoutError)) { - throw new AbortError(err); // don't retry on non-timeout errors - } - - throw err; // retry on timeout errors - } - }, - { retries: 2, minTimeout: 5_000, maxTimeout: 5_000 } - ); -} diff --git a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/create_monitor_project_multi_space.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/create_monitor_project_multi_space.ts index ee41dfdf00a1e..2f2092ecd4633 100644 --- a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/create_monitor_project_multi_space.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/create_monitor_project_multi_space.ts @@ -14,7 +14,7 @@ import { import { SYNTHETICS_API_URLS } from '@kbn/synthetics-plugin/common/constants'; import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; import { getFixtureJson } from './helpers/get_fixture_json'; -import { PrivateLocationTestService } from '../../../services/synthetics_private_location'; +import { PrivateLocationTestService } from '../../services/synthetics_private_location'; export default function ({ getService }: DeploymentAgnosticFtrProviderContext) { describe('CreateProjectMonitorsMultiSpace', function () { diff --git a/x-pack/test/api_integration/deployment_agnostic/feature_flag_configs/serverless/oblt.index.ts b/x-pack/test/api_integration/deployment_agnostic/feature_flag_configs/serverless/oblt.index.ts deleted file mode 100644 index e39af9f6d5227..0000000000000 --- a/x-pack/test/api_integration/deployment_agnostic/feature_flag_configs/serverless/oblt.index.ts +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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. - */ -import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; - -export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) { - describe('Serverless Observability feature flag testing - Deployment-agnostic API integration tests', function () { - loadTestFile( - require.resolve('../../apis/observability/alerting/synthetics/synthetics_default_rule') - ); - loadTestFile( - require.resolve('../../apis/observability/alerting/synthetics/custom_status_rule') - ); - loadTestFile( - require.resolve('../../apis/observability/alerting/custom_threshold/consumers_and_privileges') - ); - loadTestFile( - require.resolve('../../apis/observability/alerting/es_query/consumers_and_privileges') - ); - loadTestFile( - require.resolve('../../apis/observability/alerting/burn_rate/consumers_and_privileges') - ); - }); -} diff --git a/x-pack/test/api_integration/deployment_agnostic/feature_flag_configs/stateful/oblt.index.ts b/x-pack/test/api_integration/deployment_agnostic/feature_flag_configs/stateful/oblt.index.ts deleted file mode 100644 index 93aba5912eb04..0000000000000 --- a/x-pack/test/api_integration/deployment_agnostic/feature_flag_configs/stateful/oblt.index.ts +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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. - */ -import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; - -export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) { - describe('Stateful Observability feature flag testing - Deployment-agnostic API integration tests', function () { - loadTestFile( - require.resolve('../../apis/observability/alerting/synthetics/synthetics_default_rule') - ); - loadTestFile( - require.resolve('../../apis/observability/alerting/synthetics/custom_status_rule') - ); - loadTestFile( - require.resolve('../../apis/observability/alerting/custom_threshold/consumers_and_privileges') - ); - loadTestFile( - require.resolve('../../apis/observability/alerting/es_query/consumers_and_privileges') - ); - loadTestFile( - require.resolve('../../apis/observability/alerting/burn_rate/consumers_and_privileges') - ); - }); -} From 453e16d4887b821454a8885f4ffa85e539319567 Mon Sep 17 00:00:00 2001 From: Dzmitry Lemechko Date: Fri, 1 Aug 2025 20:48:14 +0200 Subject: [PATCH 07/11] delete stale files --- .../ai_assistant/complete/product_docs/index.xml | 16 ---------------- .../apis/ai_assistant/local/index.ts | 16 ---------------- 2 files changed, 32 deletions(-) delete mode 100644 x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/product_docs/index.xml delete mode 100644 x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/local/index.ts diff --git a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/product_docs/index.xml b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/product_docs/index.xml deleted file mode 100644 index b690a69175c7d..0000000000000 --- a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/product_docs/index.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - kibana-ai-assistant-kb-artifacts - - kb-product-doc-kibana-0.0.zip - - - kb-product-doc-elasticsearch-0.0.zip - - - kb-product-doc-observability-0.0.zip - - - kb-product-doc-security-0.0.zip - - \ No newline at end of file diff --git a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/local/index.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/local/index.ts deleted file mode 100644 index 8d462f749292b..0000000000000 --- a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/local/index.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* - * 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. - */ - -import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; - -export default function aiAssistantApiIntegrationTests({ - loadTestFile, -}: DeploymentAgnosticFtrProviderContext) { - describe('observability AI Assistant local-only tests', function () { - loadTestFile(require.resolve('../knowledge_base/knowledge_base_bulk_import.spec.ts')); - }); -} From 7ba279ac5cdac12b059594764a0180040d5e13da Mon Sep 17 00:00:00 2001 From: Dzmitry Lemechko Date: Sun, 3 Aug 2025 20:33:58 +0200 Subject: [PATCH 08/11] restore services, delete stale spec --- .../apis/onboarding/update_progress.ts | 122 -------- .../services/alerting_api.ts | 293 ++++++++++-------- .../services/apm_api.ts | 64 +++- 3 files changed, 211 insertions(+), 268 deletions(-) delete mode 100644 x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/onboarding/update_progress.ts diff --git a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/onboarding/update_progress.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/onboarding/update_progress.ts deleted file mode 100644 index 174aa33fb9993..0000000000000 --- a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/onboarding/update_progress.ts +++ /dev/null @@ -1,122 +0,0 @@ -/* - * 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. - */ - -import expect from '@kbn/expect'; -import { OBSERVABILITY_ONBOARDING_STATE_SAVED_OBJECT_TYPE } from '@kbn/observability-onboarding-plugin/server/saved_objects/observability_onboarding_status'; -import { type DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; -import { type SupertestWithRoleScopeType } from '../../services'; - -export default function ({ getService }: DeploymentAgnosticFtrProviderContext) { - const kibanaServer = getService('kibanaServer'); - const roleScopedSupertest = getService('roleScopedSupertest'); - let adminClient: SupertestWithRoleScopeType; - let adminClientWithAPIKey: SupertestWithRoleScopeType; - - describe('Update step progress', () => { - before(async () => { - adminClient = await roleScopedSupertest.getSupertestWithRoleScope('admin', { - withInternalHeaders: true, - useCookieHeader: true, - }); - adminClientWithAPIKey = await roleScopedSupertest.getSupertestWithRoleScope('admin', { - withInternalHeaders: true, - }); - }); - - after(async () => { - await adminClientWithAPIKey.destroy(); - }); - - describe("when onboardingId doesn't exists", () => { - it('fails with a 404 error', async () => { - const response = await adminClient - .post(`/internal/observability_onboarding/flow/test-onboarding-id/step/ea-download`) - .send({ - status: 'complete', - }); - - expect(response.status).to.be(404); - expect(response.body.message).to.contain('onboarding session not found'); - }); - }); - - describe('when onboardingId exists', () => { - let onboardingId: string; - - beforeEach(async () => { - const createFlowResponse = await adminClient.post( - '/internal/observability_onboarding/flow' - ); - - onboardingId = createFlowResponse.body.onboardingFlow.id; - - const savedState = await kibanaServer.savedObjects.get({ - type: OBSERVABILITY_ONBOARDING_STATE_SAVED_OBJECT_TYPE, - id: onboardingId, - }); - - expect(savedState.attributes.progress).eql({}); - }); - - afterEach(async () => { - await kibanaServer.savedObjects.delete({ - type: OBSERVABILITY_ONBOARDING_STATE_SAVED_OBJECT_TYPE, - id: onboardingId, - }); - }); - - it('updates step status', async () => { - const step = { - name: 'ea-download', - status: 'complete', - }; - - const response = await adminClientWithAPIKey - .post(`/internal/observability_onboarding/flow/${onboardingId}/step/${step.name}`) - .send({ - status: step.status, - }); - - expect(response.status).to.be(200); - - const savedState = await kibanaServer.savedObjects.get({ - type: OBSERVABILITY_ONBOARDING_STATE_SAVED_OBJECT_TYPE, - id: onboardingId, - }); - - const stepProgress = savedState.attributes.progress?.[step.name]; - expect(stepProgress).to.have.property('status', step.status); - }); - - it('updates step status with message', async () => { - const message = 'Download failed'; - const step = { - name: 'ea-download', - status: 'danger', - message: Buffer.from(message, 'utf8').toString('base64'), - }; - const response = await adminClientWithAPIKey - .post(`/internal/observability_onboarding/flow/${onboardingId}/step/${step.name}`) - .send({ - status: step.status, - message: step.message, - }); - - expect(response.status).to.be(200); - - const savedState = await kibanaServer.savedObjects.get({ - type: OBSERVABILITY_ONBOARDING_STATE_SAVED_OBJECT_TYPE, - id: onboardingId, - }); - - const stepProgress = savedState.attributes.progress?.[step.name]; - expect(stepProgress).to.have.property('status', step.status); - expect(stepProgress).to.have.property('message', message); - }); - }); - }); -} diff --git a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/services/alerting_api.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/services/alerting_api.ts index dedc24e7e6614..7a4b85b759458 100644 --- a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/services/alerting_api.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/services/alerting_api.ts @@ -102,22 +102,24 @@ export function AlertingApiProvider({ getService }: DeploymentAgnosticFtrProvide async () => { const response = await esClient.search({ index: indexName, - query: { - bool: { - must: [ - { - term: { - 'kibana.alert.rule.uuid': ruleId, + body: { + query: { + bool: { + must: [ + { + term: { + 'kibana.alert.rule.uuid': ruleId, + }, }, - }, - { - range: { - '@timestamp': { - gte: filter.getTime().toString(), + { + range: { + '@timestamp': { + gte: filter.getTime().toString(), + }, }, }, - }, - ], + ], + }, }, }, }); @@ -149,15 +151,17 @@ export function AlertingApiProvider({ getService }: DeploymentAgnosticFtrProvide const response = await esClient.search({ index: indexName, sort: `date:${sort}`, - query: { - bool: { - must: [ - { - term: { - 'ruleId.keyword': ruleId, + body: { + query: { + bool: { + must: [ + { + term: { + 'ruleId.keyword': ruleId, + }, }, - }, - ], + ], + }, }, }, }); @@ -189,15 +193,17 @@ export function AlertingApiProvider({ getService }: DeploymentAgnosticFtrProvide const response = await esClient.search({ index: indexName, sort: `date:${sort}`, - query: { - bool: { - must: [ - { - term: { - 'ruleId.keyword': ruleId, + body: { + query: { + bool: { + must: [ + { + term: { + 'ruleId.keyword': ruleId, + }, }, - }, - ], + ], + }, }, }, }); @@ -636,15 +642,17 @@ export function AlertingApiProvider({ getService }: DeploymentAgnosticFtrProvide const response = await esClient.search({ index: indexName, sort: `date:${sort}`, - query: { - bool: { - must: [ - { - term: { - 'ruleId.keyword': ruleId, + body: { + query: { + bool: { + must: [ + { + term: { + 'ruleId.keyword': ruleId, + }, }, - }, - ], + ], + }, }, }, }); @@ -668,15 +676,17 @@ export function AlertingApiProvider({ getService }: DeploymentAgnosticFtrProvide }): Promise { return await esClient.search({ index: indexName, - query: { - bool: { - must: [ - { - term: { - 'ruleId.keyword': ruleId, + body: { + query: { + bool: { + must: [ + { + term: { + 'ruleId.keyword': ruleId, + }, }, - }, - ], + ], + }, }, }, }); @@ -698,29 +708,31 @@ export function AlertingApiProvider({ getService }: DeploymentAgnosticFtrProvide async () => { const response = await esClient.search({ index: '.kibana_task_manager', - query: { - bool: { - must: [ - { - terms: { - 'task.scope': ['actions', 'alerting'], + body: { + query: { + bool: { + must: [ + { + terms: { + 'task.scope': ['actions', 'alerting'], + }, }, - }, - { - range: { - 'task.scheduledAt': { - gte: filter.getTime().toString(), + { + range: { + 'task.scheduledAt': { + gte: filter.getTime().toString(), + }, }, }, - }, - ], - must_not: [ - { - term: { - 'task.status': 'idle', + ], + must_not: [ + { + term: { + 'task.status': 'idle', + }, }, - }, - ], + ], + }, }, }, }); @@ -753,36 +765,38 @@ export function AlertingApiProvider({ getService }: DeploymentAgnosticFtrProvide async () => { const response = await esClient.search({ index: '.kibana-event-log*', - query: { - bool: { - filter: [ - { - term: { - 'rule.id': { - value: ruleId, + body: { + query: { + bool: { + filter: [ + { + term: { + 'rule.id': { + value: ruleId, + }, }, }, - }, - { - term: { - 'event.provider': { - value: 'alerting', + { + term: { + 'event.provider': { + value: 'alerting', + }, }, }, - }, - { - term: { - 'event.action': 'execute', + { + term: { + 'event.action': 'execute', + }, }, - }, - { - range: { - '@timestamp': { - gte: filter.getTime().toString(), + { + range: { + '@timestamp': { + gte: filter.getTime().toString(), + }, }, }, - }, - ], + ], + }, }, }, }); @@ -799,6 +813,7 @@ export function AlertingApiProvider({ getService }: DeploymentAgnosticFtrProvide return await esClient.indices.create( { index: indexName, + body: {}, }, { meta: true } ); @@ -822,37 +837,39 @@ export function AlertingApiProvider({ getService }: DeploymentAgnosticFtrProvide async () => { const response = await esClient.search({ index: '.kibana_task_manager', - query: { - bool: { - must: [ - { - term: { - 'task.status': 'idle', + body: { + query: { + bool: { + must: [ + { + term: { + 'task.status': 'idle', + }, }, - }, - { - term: { - 'task.attempts': attempts, + { + term: { + 'task.attempts': attempts, + }, }, - }, - { - terms: { - 'task.scope': ['actions', 'alerting'], + { + terms: { + 'task.scope': ['actions', 'alerting'], + }, }, - }, - { - term: { - 'task.taskType': taskType, + { + term: { + 'task.taskType': taskType, + }, }, - }, - { - range: { - 'task.scheduledAt': { - gte: filter.getTime().toString(), + { + range: { + 'task.scheduledAt': { + gte: filter.getTime().toString(), + }, }, }, - }, - ], + ], + }, }, }, }); @@ -881,32 +898,34 @@ export function AlertingApiProvider({ getService }: DeploymentAgnosticFtrProvide async () => { const response = await esClient.search({ index: '.kibana_task_manager', - query: { - bool: { - must: [ - { - term: { - 'task.id': `task:${ruleId}`, + body: { + query: { + bool: { + must: [ + { + term: { + 'task.id': `task:${ruleId}`, + }, }, - }, - { - terms: { - 'task.scope': ['actions', 'alerting'], + { + terms: { + 'task.scope': ['actions', 'alerting'], + }, }, - }, - { - range: { - 'task.scheduledAt': { - gte: filter.getTime().toString(), + { + range: { + 'task.scheduledAt': { + gte: filter.getTime().toString(), + }, }, }, - }, - { - term: { - 'task.enabled': true, + { + term: { + 'task.enabled': true, + }, }, - }, - ], + ], + }, }, }, }); @@ -966,9 +985,11 @@ export function AlertingApiProvider({ getService }: DeploymentAgnosticFtrProvide rest_total_hits_as_int: true, ...(ruleId ? { - query: { - term: { - 'kibana.alert.rule.uuid': ruleId, + body: { + query: { + term: { + 'kibana.alert.rule.uuid': ruleId, + }, }, }, } diff --git a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/services/apm_api.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/services/apm_api.ts index ed2c5ba7ccf1f..12f571ccb55ba 100644 --- a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/services/apm_api.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/services/apm_api.ts @@ -12,10 +12,29 @@ import type { APIClientRequestParamsOf, } from '@kbn/apm-plugin/public/services/rest/create_call_apm_api'; import { APIEndpoint } from '@kbn/apm-plugin/server'; +import type { + APIEndpoint as SourcesAPIEndpoint, + APIReturnType as SourcesAPIReturnType, + APIClientRequestParamsOf as SourcesAPIClientRequestParamsOf, +} from '@kbn/apm-sources-access-plugin/server'; import { formatRequest } from '@kbn/server-route-repository'; import { RoleCredentials } from '@kbn/ftr-common-functional-services'; import type { DeploymentAgnosticFtrProviderContext } from '../ftr_provider_context'; +type CombinedAPIRequest = + TEndpoint extends APIEndpoint + ? APIReturnType + : TEndpoint extends SourcesAPIEndpoint + ? SourcesAPIReturnType + : never; + +type CombinedOptions = + TEndpoint extends APIEndpoint + ? Options + : TEndpoint extends SourcesAPIEndpoint + ? SourceOptions + : never; + type Options = { type?: 'form-data'; endpoint: TEndpoint; @@ -24,9 +43,14 @@ type Options = { params?: { query?: { _inspect?: boolean } }; }; -type InternalEndpoint = T extends `${string} /internal/${string}` - ? T - : never; +type SourceOptions = { + type?: 'form-data'; + endpoint: TEndpoint; + spaceId?: string; +} & SourcesAPIClientRequestParamsOf; + +type InternalEndpoint = + T extends `${string} /internal/${string}` ? T : never; type PublicEndpoint = T extends `${string} /api/${string}` ? T : never; @@ -35,11 +59,14 @@ function createApmApiClient({ getService }: DeploymentAgnosticFtrProviderContext const samlAuth = getService('samlAuth'); const logger = getService('log'); - async function makeApiRequest({ + async function makeApiRequest< + TEndpoint extends APIEndpoint | SourcesAPIEndpoint, + TOpts extends CombinedOptions + >({ options, headers, }: { - options: Options; + options: TOpts; headers: Record; }): Promise> { const { endpoint, type } = options; @@ -84,8 +111,24 @@ function createApmApiClient({ getService }: DeploymentAgnosticFtrProviderContext } function makeInternalApiRequest(role: string) { - return async >( - options: Options + return async >( + options: CombinedOptions + ): Promise> => { + const headers: Record = { + ...samlAuth.getInternalRequestHeader(), + ...(await samlAuth.getM2MApiCookieCredentialsWithRoleScope(role)), + }; + + return makeApiRequest({ + options, + headers, + }); + }; + } + + function makeInternalSourceRequest(role: string) { + return async >( + options: CombinedOptions ): Promise> => { const headers: Record = { ...samlAuth.getInternalRequestHeader(), @@ -101,7 +144,7 @@ function createApmApiClient({ getService }: DeploymentAgnosticFtrProviderContext function makePublicApiRequest() { return async >( - options: Options & { + options: CombinedOptions & { roleAuthc: RoleCredentials; } ): Promise> => { @@ -120,6 +163,7 @@ function createApmApiClient({ getService }: DeploymentAgnosticFtrProviderContext return { makeInternalApiRequest, makePublicApiRequest, + makeInternalSourceRequest, }; } @@ -149,9 +193,9 @@ Body: ${JSON.stringify(res.body)}` } } -export interface SupertestReturnType { +export interface SupertestReturnType { status: number; - body: APIReturnType; + body: CombinedAPIRequest; } export function ApmApiProvider(context: DeploymentAgnosticFtrProviderContext) { From 78972905efc913099061c458a32b91aecf755dcb Mon Sep 17 00:00:00 2001 From: Dzmitry Lemechko Date: Sun, 3 Aug 2025 20:35:56 +0200 Subject: [PATCH 09/11] Update CODEOWNERS --- .github/CODEOWNERS | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 1c4f4d1a9ef25..1c69efe232cba 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1274,11 +1274,6 @@ x-pack/solutions/observability/plugins/observability/server/lib/esql_extensions /x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.ai_assistant.serverless.config.ts @elastic/obs-ai-assistant /x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.ai_assistant.index.ts @elastic/obs-ai-assistant /x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.ai_assistant.stateful.config.ts @elastic/obs-ai-assistant -/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.ai_assistant_local.index.ts @elastic/obs-ai-assistant -/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.ai_assistant_local.serverless.config.ts @elastic/obs-ai-assistant -/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.ai_assistant_local.index.ts @elastic/obs-ai-assistant -/x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.ai_assistant_local.stateful.config.ts @elastic/obs-ai-assistant - # Infra Obs ## This plugin mostly contains the codebase for the infra services, but also includes some code for the Logs UI app. ## To keep @elastic/obs-ux-logs-team as codeowner of the plugin manifest without requiring a review for all the other code changes From 9ab4899e389f057337e4a19e585457f228fff813 Mon Sep 17 00:00:00 2001 From: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Date: Sun, 3 Aug 2025 18:52:22 +0000 Subject: [PATCH 10/11] [CI] Auto-commit changed files from 'node scripts/lint_ts_projects --fix' --- x-pack/solutions/observability/test/tsconfig.json | 1 - 1 file changed, 1 deletion(-) diff --git a/x-pack/solutions/observability/test/tsconfig.json b/x-pack/solutions/observability/test/tsconfig.json index 5b477a333c9b2..b304820aefd4a 100644 --- a/x-pack/solutions/observability/test/tsconfig.json +++ b/x-pack/solutions/observability/test/tsconfig.json @@ -71,7 +71,6 @@ "@kbn/rison", "@kbn/dataset-quality-plugin", "@kbn/metrics-data-access-plugin", - "@kbn/observability-onboarding-plugin", "@kbn/slo-plugin", "@kbn/slo-schema", "@kbn/streams-schema", From d26d70079d6eb150502ee7676dc65b56a8a769e0 Mon Sep 17 00:00:00 2001 From: Dzmitry Lemechko Date: Sun, 3 Aug 2025 22:53:17 +0200 Subject: [PATCH 11/11] cleanup --- .github/CODEOWNERS | 4 - .../kb-product-doc-elasticsearch-0.0.zip | Bin 626 -> 0 bytes .../kb-product-doc-kibana-0.0.zip | Bin 5225 -> 0 bytes .../kb-product-doc-observability-0.0.zip | Bin 626 -> 0 bytes .../kb-product-doc-security-0.0.zip | Bin 621 -> 0 bytes .../apis/streams/metadata.ts | 74 ------------------ .../serverless/oblt.index.ts | 1 - .../stateful/oblt.index.ts | 1 - 8 files changed, 80 deletions(-) delete mode 100644 x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/product_docs/kb-product-doc-elasticsearch-0.0.zip delete mode 100644 x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/product_docs/kb-product-doc-kibana-0.0.zip delete mode 100644 x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/product_docs/kb-product-doc-observability-0.0.zip delete mode 100644 x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/product_docs/kb-product-doc-security-0.0.zip delete mode 100644 x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/metadata.ts diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 1c4f4d1a9ef25..a4cb93f582d4f 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1400,10 +1400,6 @@ x-pack/solutions/observability/plugins/observability/server/lib/esql_extensions /x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/synthetics/ @elastic/obs-ux-management-team /x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.synthetics.index.ts @elastic/obs-ux-management-team /x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.synthetics.serverless.config.ts @elastic/obs-ux-management-team -/x-pack/solutions/observability/test/api_integration_deployment_agnostic/feature_flag_configs/serverless/oblt.synthetics.index.ts @elastic/obs-ux-management-team -/x-pack/solutions/observability/test/api_integration_deployment_agnostic/feature_flag_configs/serverless/oblt.synthetics.serverless.config.ts @elastic/obs-ux-management-team -/x-pack/solutions/observability/test/api_integration_deployment_agnostic/feature_flag_configs/stateful/oblt.synthetics.index.ts @elastic/obs-ux-management-team -/x-pack/solutions/observability/test/api_integration_deployment_agnostic/feature_flag_configs/stateful/oblt.synthetics.stateful.config.ts @elastic/obs-ux-management-team /x-pack/solutions/observability/test/api_integration_deployment_agnostic/services/synthetics_monitors @elastic/obs-ux-management-team /x-pack/solutions/observability/test/api_integration_deployment_agnostic/services/synthetics_private_location @elastic/obs-ux-management-team /x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/incident_management/ @elastic/obs-ux-management-team diff --git a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/product_docs/kb-product-doc-elasticsearch-0.0.zip b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/product_docs/kb-product-doc-elasticsearch-0.0.zip deleted file mode 100644 index 7f3ede30e98b05dfc03da5b9fe5e30c983ceaa8a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 626 zcmWIWW@Zs#VBp|jXb+he<-C8{VipDl1|}eu0OI8Qypq(s5`8GGYp9o(l2x3aw|X5b zLja0S!Sb%Xu0S2pK+Froxruq1X{p5}dSKEpkh%Seamb@p==NPod;H@x z(4NOYr$X#2D9Fr9F9zGUb)sX}VFMo5@0P6}tc=-Tr1oU5cD*vqc+wrSDfjlOY-x2^ zFw<2$>cwl@lr_=p4=$Zp7*JwekmYnS#{OvY6~?0+SKmIk#>lWE;^u_2(vio?c^>4* zEW0NeclPYVz42PVXB{(j-pFFsRTuXA`ivh9O)?jQXKlFO(tcsn--NI!PrDqmvM$=R zZ~C=DxNo{vrl#lGXY-GkITu^!watEV_Kl?L%1=`NrF4Hd#NGZUZ$6_nsHx^PQ{$g_ zXVX<{>^8&&7}VxZZ(UsX?{40z-^>Btj7%cTxMK(y1YoeF5k%pNFLYDTV+&#i1H+O= lDFBPdY6O}KsplXpmb@{qz4pGxJ=VA!OvN000#gAknhe)>q<%Bq=ih zU?u?oumb=9SAW0Y$9};w|ASI;(td8^G!&{ZTHiCM#^+!We?Bz}SHvSu9`V zyn^PDpWBk%Xsk@pe8mOoCsA_QI2UqNx>vnczPjIc->1C@W$qZbiG#dT$NA=@YtU)XMQ!I~ z(POrKj=e&ePtd!(+h>(UOAgC)9kb5G(=F(CsFp8X&rZGHsUMU#*X}L9gcR z;wG&?_l@#caxw$UbDO73qBRd}jiNH#}w(4WcwH0wpEmpxyi`+a4CeBNESb*Un= z7S>*l@1;M0hlO)g5qFDnrv12g^)uh@Camr9j&8m9nWcWY2gOQZl=pBJ$B4~>qqWn_ zN|~%sUZg9gaeYhb7qqJoel{&V(M41mGxZM>znVS1yjX3749QA|xGkoO^{tCBoYmW@ zY5;ww>273>q19jP(N9}Z^yS}Zi!u{ax!vte>!phV+VOa1an=ECZ5^}nTZWS0cRgBHBH?jBKD*$%-DiRo-UUeVvMb+ zGaUu*yw-U`}2O15d-obYv~=G+5QqJfzv$$X@CxVF!IyU<5`va}z34P8XZrP)c* zKxP<)Ga;_K#;w7LKiZl6kqCU57OQ&4*l?Nu%9b%;-3RTNC-Fl|*5@!kh;*O5K1m2t zFq*reX0)N{qCN6`u(E``{>`bO0nLi*OR6zp&x2AYr`VTsLqnp86zN!1HV4nbJLQ+I zyTR698SC}ufurgZ6bLMNn{O5aM&6jB%rj|851A)0wjS|%-{3J=XkR|Q-EXcWUY|jZ zy{)&Xrx!iU{xZ`b`6)E)%kW*;TubWu8v*{z)&V5)?4lL!1xTOlsvZ#1jLQB2=hOF3 zLgVm;J!A3<+{a?(wtxh)>%NP*nkGU1ui;_qlZ|0i2vuY=%HTkx%-~43j zI>D(xt;x6dk*8UG7)zN}$@5C!{v7hAf%OK|wlf0dyckO&_`Cul;W2jGnkA(d@nXcu z&BmfPB`ZO};!fHUE^H#0kvtd5w`23Kr+`N#Zkb*h**zORkmw*6#M~@%&F^?n!AWvcR0ra#AaiOCpd~K_1G$OGnnI~jYR_5n2XtfzRKDnTx5kke}Ec-ps zy-PyTqYs_J31H6rMdhkf+rilqs15>^c#tum`vKZ>f5V5))-Bk!G9ma29&E`yWi5?f zOie_{?z5WZH1Q^e?Q{+0JfvJdEHC_m`U@u|Dds{h;-!`wM4!Gcs1#7?rmb1;A;rIC zO~Nvjv#s2dQ~35!`cMMDR?ptTju++aEGq(?wl_@ga<#9W1CL z)q~GesBKwf!5UuTOL`;!_L4#k>ct4A!nE| z*XnZ+w_&+cz)p|l$vHB_4n#@FtFWYzdiV+HBD6Mww{h=O+a?vX?uxg{&mk|FUzj{I zPP!~zp;Y$#2C;)b(H60?%v-FG8NPWdzaPamiHYQ_2xMdbrXRBml_t8dS)a`zt)Ft_ zOa0lU4;%=e1uaVWDE#|);X^?AtY;5wk)ez7EDhfT_>KKB{OJ@fEjk|?5YnTzfT4DG z+qOkcSs}XfqJ-U`dAF(8&kW4L79=p6S6dxiDiq&zt5n-fhU~U>GT*X)V_RyRcw!O0FuaQSYZ7Eei2V^-V97M0ew?=Dv>0JOd z3q*4yExA)k^;tc6)BTZaVqIw|Cmx%BmbtNYN46erEl-?x^<6oN8}=!5e|d<~^T z@fEYd_&3+6C@0HgV;<40EJPosw}Tr}Xu0)hHIs4XV`2fcBh|Jwsa-s`0)i)zM?2HX zCN)m{;YRzvHkAza20Odu9|PC(j6}~{oaP|9toOA}?6ue>17XaAG8QU$#a9E&h+imY z$Ie0Jet~QIgG;Y^6ZK^g3RJ6lX%H)tH9AjX7%OFeypRvRxQO=5TX)y;-^w=OEy>CF3RdcU;tR-cX#2-yrx5IiI0ww#Do{%< z2j(+0e2ih=9>^Yr2$!WY+FX0r39$hwd1yH$i6w3LNmjQ~*5^vT4GJ-51!4I!1N*Kn z@yk*EgB_| zfUsSU#5aL=FTEBg=3jl)PNP_Nd)i+7&xw+ksI@`ZTom=_VUiovKjwZlBQ{>mz3MZI~pp-v)^j%VK zyp59C-JdEWi@S7(vTGY`YS?f}b4pbB|6+xW-QYoVaJ*c%3EdE}qsTA2ee7OWqKk0b zb6|kYHD`Y@%1_ddp&#?z=4@p}yzXi+qPo514_eb=q**eoV~aK)1$XYpD_l2@(RHqO zq+xu`<_A@v+BZ`)DmR+e3Gyt@gU{X7;f=}ASiH&PW2)RGHp>`m)zGwStgCyYq=RS} zOEaaXT%k%3wmy=h%3Zim?)xF;q;7$MlBE7j2u`L;O^?9|lM4aOcR*!3Y83jxRnuyT zp7G`%f{@Ldj9azOx$zwvEH4>5J0kNUhoeq72%fW`!nJV$ z;y})k%l!D^P9hg}iU-mR=_N46s0Z3`8L`&%Nm*;A@7$qoBU&z~5PF2Zh@hM*`gM5K zS-hVVf#$w>(2%@m^4P%YHErth8XUukI()2i4?QfOej{b3z*`k6Zqt(UuL{{;h3y(f za_oIlb*msvjCBew*Z`Tig4r`8uXKaB@I?o0GMQK#`f<2SRUn7r*ue_zng<9vCzCnr{7Mg8MAa?V5r zKkxQ>9ygH1S^6wxrsUXDYWXvJ9FKJxUX5VJE*ov^({kVeU{;$2Zgmj4bRXW8gWVFz z4y>&O|7O?K__MhM>ICh$+|;Tv;iS>w*o#mpZ>6#%Ayp`zE7{|R6}?ruk)>h)73jbq z2JrY=Z)f;=Ons*d14Ber9TV>-&%sIjorXCogth;%d|vrjwM0*c_?H;X-i2q0RsjlK z>~5Q`JYU1|4K;87RU5)Dp=xTG`SqhJhv8hD0*^)qhXB7Bn+3MwAzR7h$~Gj+nPo#| zO}J`9?H_wdr zUxl`}0Z$zblkS&${@j$a%}4;5FzGrf-?&+I$6*_q)*!4#JjfTUO?~!tOHKf$U;c7E z!fMHkwOQx5=bS!6)3|($hgOv5q*8T?%fz@0D#?t6!0y?hS>?iEL2&|!wMhxm%-d7= zba@Ytlvl&tH*P=d9mx<4|7DkkF~3DapINawNzXC8dhpGLQcx_B!%nSf?prp%BiK*%U-I1N0~8qax*^zChIB?AA5bnB$uW9kK!>{B+HoN4Mh2+^vh~prl2` z)OwP=&+El4=*!ok#2EuC>Dk_D2LvMxY+|%mueWX>EtjG-1p$qHD6x_hFLmlZoZc? zxcpSj7n0M!Gq4l}=@3HUMW^X+hO$gi;VR3Z=`a$g_e)O@>#|7ZC(N*oJHs8W5c2qVd8{cJA1ps5gpA`TIQpz{p155 z1$p4f-Z^U=e{@^c^RX#=Dv#aECf>xTCL*^6T(vsk}q4 zo{vU}?RO;6?HjiG7d1aQ$v$;?NS$ei6VlpQ7*(Fc1Jd>$zaJ(fdrSLYa*RvG304(& zv({F~%39Ca{h02|NA$6dMRs2HE=BscdmD{%%UYS?rGMwUEbwRCSf z_aMw!E2Fa>zwx`ubTy~V#`^&nndL+w=C&}YsE@9xMxi>(R1BRwg(7k=hEqG9-ZvtB zJ>~P~p|+C|)4=%}|Kfsaggvf`H!?ITDym+3axL#D>aWm?79`YR0Yh|HFiH5UXumH_1j1{TX>vSYq(us&Bsl zYumZ~13$oh@*2dWY_3z$Y)K#cWc$NydtPF|TM3h#?yh7$C7H{WC*plCNt6ZMe@!@6`aRM-Oeq7j>Rnte zoBmsFRF~?rrv4`{viwtYf6CX{&&&NWG+6rYu&54aZfa_Xlo>aYybh5PpZxOG0%2|{ zKcnzX!4yUE`3CDoRrc-N6JcCstQ$fhi=eNjp4W%l3}XZpDS}DfREOTuP3-{MxN2G_;6QZIUFY@R(l?a zpB0QKYB!MslOrFT&F7s&$8t|u6f`csO#FtpaC(rvk*w+MJq1og{H|t6%N6$$yVrnw z_X(&CRrO0KT%XwC(5*S(yyBEPx$B6&x}-WB!K!6x02)%Rg=U?;Zd^d5qGZ(C^<&`zQ6Ega1Ej a>A$G|&jwQn1?Au0WPfh=AIxR>`}JRv(BxzQ diff --git a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/product_docs/kb-product-doc-observability-0.0.zip b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/product_docs/kb-product-doc-observability-0.0.zip deleted file mode 100644 index 97c1408a442ebfd4e73897691803ea3e49962766..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 626 zcmWIWW@Zs#VBp|jXb+he<-C8{VipDl1|}eu0OI8Qypq(s5`8GGYp9o(l2x3aw|X5b zLja1-ule4cu0S2pK+Froxruq1X{p5}dSK-w^m??Lgw}>#vzYZq1$&U?eUM( zKzkkooeHt9pdd3Zy%=oY)`^Z?hYfgKzgxC`urg+Uk=m2J+V#pb<4JeSrrg`BvZd8w z!Aw{2s28toQ`SVYKe%*aVL*v>L6+0S82h8mR~V0STz&iC8Y9Dwh?^76N=F_m=XsDL zv+SN^+}X1a_r`1eo^{OBc_WKiS6$fe>oa~dG|5~Hp0(kAOZ$aQe-px{JneGK%DQON zzUkKr;lAlwnVOz!pUppF=3H!@*Eajf**B7|D?ds7m(u;=5O@2Zy!njQpr)GFOpSly zolRG*vD*+AU{ISsy>)Tjzq@&>elrJnGct)V99`FdQtH4^3q9MSWl?^1#41{}t^a4f@4*;db+e!cc diff --git a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/product_docs/kb-product-doc-security-0.0.zip b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/ai_assistant/complete/product_docs/kb-product-doc-security-0.0.zip deleted file mode 100644 index 76e81a2a04dd2ab4f7c6b07a924179f8c7360c47..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 621 zcmWIWW@Zs#VBp|jXb+he<-C8{VipDl1|}eu0OI8Qypq(s5`8GGYp9o(l2x3aw|X5b zLja0S<5V7J2cV8HAm#<)+{C=hwAA7fJ+Sg;K>-0?r}aTr7NYMncCK6q15fYBA> z3&sJL7*C3dJY7CTZTb(@XUm#Wx`HQrcN=+Y1*%LeiFzfeRd|&N&8kajkAIv7TJad@ zN{Cej1(|v2#bB$pPIT-#Y{29C-LmzAl`;E^)Sm3su2-fRPr73^<=$SEEv*g4S!KD)m14^t5vYal)*dJ}a!g!S9>e~m`7#Vg%+?;S$I`UXK&x0J9W%nfG z&Ypd^H(u-atYfCm8(GY{>cW0spYfxiN#oOnkx7IZcjN$r01TEif+$>3g>DLZL_y48U|7;<1!ST` g8@g8XfJbOu3f77g4FTS)Y#?c7Alw6_XETC$02%SsM*si- diff --git a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/metadata.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/metadata.ts deleted file mode 100644 index 47f74c54182cf..0000000000000 --- a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/streams/metadata.ts +++ /dev/null @@ -1,74 +0,0 @@ -/* - * 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. - */ - -import expect from '@kbn/expect'; -import { Streams } from '@kbn/streams-schema'; -import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; -import { - StreamsSupertestRepositoryClient, - createStreamsRepositoryAdminClient, -} from './helpers/repository_client'; -import { disableStreams, enableStreams, getStream, putStream } from './helpers/requests'; - -export default function ({ getService }: DeploymentAgnosticFtrProviderContext) { - const roleScopedSupertest = getService('roleScopedSupertest'); - let apiClient: StreamsSupertestRepositoryClient; - - describe('Stream metadata', () => { - before(async () => { - apiClient = await createStreamsRepositoryAdminClient(roleScopedSupertest); - await enableStreams(apiClient); - }); - - after(async () => { - await disableStreams(apiClient); - }); - - it('should set a description for a stream', async () => { - const body: Streams.WiredStream.UpsertRequest = { - dashboards: [], - queries: [], - stream: { - description: 'This is a test stream', - ingest: { - lifecycle: { inherit: {} }, - processing: [], - wired: { - fields: {}, - routing: [], - }, - }, - }, - }; - await putStream(apiClient, 'logs.test', body, 200); - - const response = await getStream(apiClient, 'logs.test'); - expect(response.stream).to.have.property('description', 'This is a test stream'); - }); - - it('should update a stream description', async () => { - const body: Streams.WiredStream.UpsertRequest = { - dashboards: [], - queries: [], - stream: { - description: 'Updated test stream description', - ingest: { - lifecycle: { inherit: {} }, - processing: [], - wired: { - fields: {}, - routing: [], - }, - }, - }, - }; - await putStream(apiClient, 'logs.test', body, 200); - const response = await getStream(apiClient, 'logs.test'); - expect(response.stream).to.have.property('description', 'Updated test stream description'); - }); - }); -} diff --git a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/feature_flag_configs/serverless/oblt.index.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/feature_flag_configs/serverless/oblt.index.ts index 16799be9883c6..b9b8349931e57 100644 --- a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/feature_flag_configs/serverless/oblt.index.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/feature_flag_configs/serverless/oblt.index.ts @@ -10,7 +10,6 @@ export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) describe('Serverless Observability feature flag testing - Deployment-agnostic API integration tests', function () { loadTestFile(require.resolve('../../apis/alerting/synthetics/synthetics_default_rule')); loadTestFile(require.resolve('../../apis/alerting/synthetics/custom_status_rule')); - loadTestFile(require.resolve('../../apis/alerting/synthetics/alert_on_no_data')); loadTestFile(require.resolve('../../apis/alerting/custom_threshold/consumers_and_privileges')); loadTestFile(require.resolve('../../apis/alerting/es_query/consumers_and_privileges')); loadTestFile(require.resolve('../../apis/alerting/burn_rate/consumers_and_privileges')); diff --git a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/feature_flag_configs/stateful/oblt.index.ts b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/feature_flag_configs/stateful/oblt.index.ts index 8968f41762a3a..51a65c2a50a26 100644 --- a/x-pack/solutions/observability/test/api_integration_deployment_agnostic/feature_flag_configs/stateful/oblt.index.ts +++ b/x-pack/solutions/observability/test/api_integration_deployment_agnostic/feature_flag_configs/stateful/oblt.index.ts @@ -10,7 +10,6 @@ export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) describe('Stateful Observability feature flag testing - Deployment-agnostic API integration tests', function () { loadTestFile(require.resolve('../../apis/alerting/synthetics/synthetics_default_rule')); loadTestFile(require.resolve('../../apis/alerting/synthetics/custom_status_rule')); - loadTestFile(require.resolve('../../apis/alerting/synthetics/alert_on_no_data')); loadTestFile(require.resolve('../../apis/alerting/custom_threshold/consumers_and_privileges')); loadTestFile(require.resolve('../../apis/alerting/es_query/consumers_and_privileges')); loadTestFile(require.resolve('../../apis/alerting/burn_rate/consumers_and_privileges'));