diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/index.ts b/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/index.ts index e2e94772880ea..07be7d905f774 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/index.ts +++ b/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/index.ts @@ -34,5 +34,6 @@ export default function apmApiIntegrationTests({ loadTestFile(require.resolve('./service_groups')); loadTestFile(require.resolve('./diagnostics')); loadTestFile(require.resolve('./service_nodes')); + loadTestFile(require.resolve('./span_links')); }); } diff --git a/x-pack/test/apm_api_integration/tests/span_links/data_generator.ts b/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/span_links/data_generator.ts similarity index 100% rename from x-pack/test/apm_api_integration/tests/span_links/data_generator.ts rename to x-pack/test/api_integration/deployment_agnostic/apis/observability/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/test/api_integration/deployment_agnostic/apis/observability/apm/span_links/index.ts new file mode 100644 index 0000000000000..e7772daa131af --- /dev/null +++ b/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/span_links/index.ts @@ -0,0 +1,14 @@ +/* + * 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('span_links', () => { + loadTestFile(require.resolve('./span_links.spec.ts')); + }); +} diff --git a/x-pack/test/apm_api_integration/tests/span_links/span_links.spec.ts b/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/span_links/span_links.spec.ts similarity index 97% rename from x-pack/test/apm_api_integration/tests/span_links/span_links.spec.ts rename to x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/span_links/span_links.spec.ts index 871f44da4cdc1..5638d5d620d7b 100644 --- a/x-pack/test/apm_api_integration/tests/span_links/span_links.spec.ts +++ b/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/span_links/span_links.spec.ts @@ -7,23 +7,24 @@ import expect from '@kbn/expect'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; import { Readable } from 'stream'; -import { FtrProviderContext } from '../../common/ftr_provider_context'; +import type { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; +import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provider_context'; import { generateSpanLinksData } from './data_generator'; -export default function ApiTest({ getService }: FtrProviderContext) { - const registry = getService('registry'); - const apmApiClient = getService('apmApiClient'); - const apmSynthtraceEsClient = getService('apmSynthtraceEsClient'); +export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) { + const apmApiClient = getService('apmApi'); + const synthtrace = getService('synthtrace'); const start = new Date('2022-01-01T00:00:00.000Z').getTime(); const end = new Date('2022-01-01T00:15:00.000Z').getTime() - 1; - // FLAKY: https://github.com/elastic/kibana/issues/177520 - registry.when('contains linked children', { config: 'basic', archives: [] }, () => { + describe('contains linked children', () => { let ids: ReturnType['ids']; + let apmSynthtraceEsClient: ApmSynthtraceEsClient; before(async () => { const spanLinksData = generateSpanLinksData(); + apmSynthtraceEsClient = await synthtrace.createApmSynthtraceEsClient(); ids = spanLinksData.ids;