mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
Co-authored-by: spalger <spalger@users.noreply.github.com> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Dario Gieselaar <dario.gieselaar@elastic.co> Co-authored-by: Spencer <email@spalger.com> Co-authored-by: spalger <spalger@users.noreply.github.com> Co-authored-by: Dario Gieselaar <dario.gieselaar@elastic.co>
This commit is contained in:
parent
44fdcd67ad
commit
006840ed39
72 changed files with 350 additions and 307 deletions
|
@ -27,6 +27,7 @@ export async function cleanWriteTargets({
|
|||
index: targets,
|
||||
allow_no_indices: true,
|
||||
conflicts: 'proceed',
|
||||
refresh: true,
|
||||
body: {
|
||||
query: {
|
||||
match_all: {},
|
||||
|
|
|
@ -78,18 +78,33 @@ export class FunctionalTestRunner {
|
|||
// replace the function of custom service providers so that they return
|
||||
// promise-like objects which never resolve, essentially disabling them
|
||||
// allowing us to load the test files and populate the mocha suites
|
||||
const readStubbedProviderSpec = (type: string, providers: any) =>
|
||||
const readStubbedProviderSpec = (type: string, providers: any, skip: string[]) =>
|
||||
readProviderSpec(type, providers).map((p) => ({
|
||||
...p,
|
||||
fn: () => ({
|
||||
then: () => {},
|
||||
}),
|
||||
fn: skip.includes(p.name)
|
||||
? (...args: unknown[]) => {
|
||||
const result = p.fn(...args);
|
||||
if ('then' in result) {
|
||||
throw new Error(
|
||||
`Provider [${p.name}] returns a promise so it can't loaded during test analysis`
|
||||
);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
: () => ({
|
||||
then: () => {},
|
||||
}),
|
||||
}));
|
||||
|
||||
const providers = new ProviderCollection(this.log, [
|
||||
...coreProviders,
|
||||
...readStubbedProviderSpec('Service', config.get('services')),
|
||||
...readStubbedProviderSpec('PageObject', config.get('pageObjects')),
|
||||
...readStubbedProviderSpec(
|
||||
'Service',
|
||||
config.get('services'),
|
||||
config.get('servicesRequiredForTestAnalysis')
|
||||
),
|
||||
...readStubbedProviderSpec('PageObject', config.get('pageObjects'), []),
|
||||
]);
|
||||
|
||||
const mocha = await setupMocha(this.lifecycle, this.log, config, providers);
|
||||
|
|
|
@ -89,6 +89,7 @@ export const schema = Joi.object()
|
|||
})
|
||||
.default(),
|
||||
|
||||
servicesRequiredForTestAnalysis: Joi.array().items(Joi.string()).default([]),
|
||||
services: Joi.object().pattern(ID_PATTERN, Joi.func().required()).default(),
|
||||
|
||||
pageObjects: Joi.object().pattern(ID_PATTERN, Joi.func().required()).default(),
|
||||
|
|
|
@ -26,26 +26,30 @@ export function transformDataToMetricsChart(
|
|||
title: chartBase.title,
|
||||
key: chartBase.key,
|
||||
yUnit: chartBase.yUnit,
|
||||
series: Object.keys(chartBase.series).map((seriesKey, i) => {
|
||||
const overallValue = aggregations?.[seriesKey]?.value;
|
||||
series:
|
||||
result.hits.total.value > 0
|
||||
? Object.keys(chartBase.series).map((seriesKey, i) => {
|
||||
const overallValue = aggregations?.[seriesKey]?.value;
|
||||
|
||||
return {
|
||||
title: chartBase.series[seriesKey].title,
|
||||
key: seriesKey,
|
||||
type: chartBase.type,
|
||||
color:
|
||||
chartBase.series[seriesKey].color || getVizColorForIndex(i, theme),
|
||||
overallValue,
|
||||
data:
|
||||
timeseriesData?.buckets.map((bucket) => {
|
||||
const { value } = bucket[seriesKey];
|
||||
const y = value === null || isNaN(value) ? null : value;
|
||||
return {
|
||||
x: bucket.key,
|
||||
y,
|
||||
title: chartBase.series[seriesKey].title,
|
||||
key: seriesKey,
|
||||
type: chartBase.type,
|
||||
color:
|
||||
chartBase.series[seriesKey].color ||
|
||||
getVizColorForIndex(i, theme),
|
||||
overallValue,
|
||||
data:
|
||||
timeseriesData?.buckets.map((bucket) => {
|
||||
const { value } = bucket[seriesKey];
|
||||
const y = value === null || isNaN(value) ? null : value;
|
||||
return {
|
||||
x: bucket.key,
|
||||
y,
|
||||
};
|
||||
}) || [],
|
||||
};
|
||||
}) || [],
|
||||
};
|
||||
}),
|
||||
})
|
||||
: [],
|
||||
};
|
||||
}
|
||||
|
|
|
@ -98,6 +98,9 @@ Object {
|
|||
},
|
||||
},
|
||||
"size": 1,
|
||||
"sort": Object {
|
||||
"_score": "desc",
|
||||
},
|
||||
},
|
||||
"terminate_after": 1,
|
||||
}
|
||||
|
|
|
@ -13,7 +13,6 @@ import {
|
|||
} from '../../../common/elasticsearch_fieldnames';
|
||||
import { rangeQuery } from '../../../../observability/server';
|
||||
import { Setup } from '../helpers/setup_request';
|
||||
import { getProcessorEventForTransactions } from '../helpers/transactions';
|
||||
|
||||
interface ServiceAgent {
|
||||
agent?: {
|
||||
|
@ -29,13 +28,11 @@ interface ServiceAgent {
|
|||
export async function getServiceAgent({
|
||||
serviceName,
|
||||
setup,
|
||||
searchAggregatedTransactions,
|
||||
start,
|
||||
end,
|
||||
}: {
|
||||
serviceName: string;
|
||||
setup: Setup;
|
||||
searchAggregatedTransactions: boolean;
|
||||
start: number;
|
||||
end: number;
|
||||
}) {
|
||||
|
@ -46,7 +43,7 @@ export async function getServiceAgent({
|
|||
apm: {
|
||||
events: [
|
||||
ProcessorEvent.error,
|
||||
getProcessorEventForTransactions(searchAggregatedTransactions),
|
||||
ProcessorEvent.transaction,
|
||||
ProcessorEvent.metric,
|
||||
],
|
||||
},
|
||||
|
@ -71,6 +68,9 @@ export async function getServiceAgent({
|
|||
},
|
||||
},
|
||||
},
|
||||
sort: {
|
||||
_score: 'desc' as const,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
@ -28,7 +28,6 @@ describe('services queries', () => {
|
|||
getServiceAgent({
|
||||
serviceName: 'foo',
|
||||
setup,
|
||||
searchAggregatedTransactions: false,
|
||||
start: 0,
|
||||
end: 50000,
|
||||
})
|
||||
|
|
|
@ -191,18 +191,9 @@ const serviceAgentRoute = createApmServerRoute({
|
|||
const { serviceName } = params.path;
|
||||
const { start, end } = params.query;
|
||||
|
||||
const searchAggregatedTransactions = await getSearchAggregatedTransactions({
|
||||
apmEventClient: setup.apmEventClient,
|
||||
config: setup.config,
|
||||
start,
|
||||
end,
|
||||
kuery: '',
|
||||
});
|
||||
|
||||
return getServiceAgent({
|
||||
serviceName,
|
||||
setup,
|
||||
searchAggregatedTransactions,
|
||||
start,
|
||||
end,
|
||||
});
|
||||
|
|
|
@ -14,10 +14,10 @@ import { PromiseReturnType } from '../../../plugins/observability/typings/common
|
|||
import { createApmUser, APM_TEST_PASSWORD, ApmUser } from './authentication';
|
||||
import { APMFtrConfigName } from '../configs';
|
||||
import { createApmApiClient } from './apm_api_supertest';
|
||||
import { registry } from './registry';
|
||||
import { RegistryProvider } from './registry';
|
||||
import { synthtraceEsClientService } from './synthtrace_es_client_service';
|
||||
|
||||
interface Config {
|
||||
export interface ApmFtrConfig {
|
||||
name: APMFtrConfigName;
|
||||
license: 'basic' | 'trial';
|
||||
kibanaConfig?: Record<string, string | string[]>;
|
||||
|
@ -58,7 +58,7 @@ async function getApmApiClient(
|
|||
|
||||
export type CreateTestConfig = ReturnType<typeof createTestConfig>;
|
||||
|
||||
export function createTestConfig(config: Config) {
|
||||
export function createTestConfig(config: ApmFtrConfig) {
|
||||
const { license, name, kibanaConfig } = config;
|
||||
|
||||
return async ({ readConfigFile }: FtrConfigProviderContext) => {
|
||||
|
@ -70,13 +70,14 @@ export function createTestConfig(config: Config) {
|
|||
const servers = xPackAPITestsConfig.get('servers');
|
||||
const kibanaServer = servers.kibana;
|
||||
|
||||
registry.init(config.name);
|
||||
|
||||
return {
|
||||
testFiles: [require.resolve('../tests')],
|
||||
servers,
|
||||
servicesRequiredForTestAnalysis: ['apmFtrConfig', 'registry'],
|
||||
services: {
|
||||
...services,
|
||||
apmFtrConfig: () => config,
|
||||
registry: RegistryProvider,
|
||||
synthtraceEsClient: synthtraceEsClientService,
|
||||
apmApiClient: async (context: InheritedFtrProviderContext) => {
|
||||
const security = context.getService('security');
|
||||
|
|
|
@ -28,168 +28,165 @@ interface RunCondition {
|
|||
archives: ArchiveName[];
|
||||
}
|
||||
|
||||
const callbacks: Array<
|
||||
RunCondition & {
|
||||
runs: Array<{
|
||||
cb: () => void;
|
||||
}>;
|
||||
}
|
||||
> = [];
|
||||
export function RegistryProvider({ getService }: FtrProviderContext) {
|
||||
const apmFtrConfig = getService('apmFtrConfig');
|
||||
|
||||
let configName: APMFtrConfigName | undefined;
|
||||
|
||||
let running: boolean = false;
|
||||
|
||||
function when(
|
||||
title: string,
|
||||
conditions: RunCondition | RunCondition[],
|
||||
callback: (condition: RunCondition) => void,
|
||||
skip?: boolean
|
||||
) {
|
||||
const allConditions = castArray(conditions);
|
||||
|
||||
if (!allConditions.length) {
|
||||
throw new Error('At least one condition should be defined');
|
||||
}
|
||||
|
||||
if (running) {
|
||||
throw new Error("Can't add tests when running");
|
||||
}
|
||||
|
||||
const frame = maybe(callsites()[1]);
|
||||
|
||||
const file = frame?.getFileName();
|
||||
|
||||
if (!file) {
|
||||
throw new Error('Could not infer file for suite');
|
||||
}
|
||||
|
||||
allConditions.forEach((matchedCondition) => {
|
||||
callbacks.push({
|
||||
...matchedCondition,
|
||||
runs: [
|
||||
{
|
||||
cb: () => {
|
||||
const suite: ReturnType<typeof describe> = (skip ? describe.skip : describe)(
|
||||
title,
|
||||
() => {
|
||||
callback(matchedCondition);
|
||||
}
|
||||
) as any;
|
||||
|
||||
suite.file = file;
|
||||
suite.eachTest((test) => {
|
||||
test.file = file;
|
||||
});
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
when.skip = (
|
||||
title: string,
|
||||
conditions: RunCondition | RunCondition[],
|
||||
callback: (condition: RunCondition) => void
|
||||
) => {
|
||||
when(title, conditions, callback, true);
|
||||
};
|
||||
|
||||
export const registry = {
|
||||
init: (config: APMFtrConfigName) => {
|
||||
configName = config;
|
||||
callbacks.length = 0;
|
||||
running = false;
|
||||
},
|
||||
when,
|
||||
run: (context: FtrProviderContext) => {
|
||||
if (!configName) {
|
||||
throw new Error(`registry was not init() before running`);
|
||||
const callbacks: Array<
|
||||
RunCondition & {
|
||||
runs: Array<{
|
||||
cb: () => void;
|
||||
}>;
|
||||
}
|
||||
running = true;
|
||||
const esArchiver = context.getService('esArchiver');
|
||||
const logger = context.getService('log');
|
||||
> = [];
|
||||
|
||||
const supertest = context.getService('legacySupertestAsApmWriteUser');
|
||||
let running: boolean = false;
|
||||
|
||||
const logWithTimer = () => {
|
||||
const start = process.hrtime();
|
||||
function when(
|
||||
title: string,
|
||||
conditions: RunCondition | RunCondition[],
|
||||
callback: (condition: RunCondition) => void,
|
||||
skip?: boolean
|
||||
) {
|
||||
const allConditions = castArray(conditions);
|
||||
|
||||
return (message: string) => {
|
||||
const diff = process.hrtime(start);
|
||||
const time = `${Math.round(diff[0] * 1000 + diff[1] / 1e6)}ms`;
|
||||
logger.info(`(${time}) ${message}`);
|
||||
if (!allConditions.length) {
|
||||
throw new Error('At least one condition should be defined');
|
||||
}
|
||||
|
||||
if (running) {
|
||||
throw new Error("Can't add tests when running");
|
||||
}
|
||||
|
||||
const frame = maybe(callsites()[1]);
|
||||
|
||||
const file = frame?.getFileName();
|
||||
|
||||
if (!file) {
|
||||
throw new Error('Could not infer file for suite');
|
||||
}
|
||||
|
||||
allConditions.forEach((matchedCondition) => {
|
||||
callbacks.push({
|
||||
...matchedCondition,
|
||||
runs: [
|
||||
{
|
||||
cb: () => {
|
||||
const suite: ReturnType<typeof describe> = (skip ? describe.skip : describe)(
|
||||
title,
|
||||
() => {
|
||||
callback(matchedCondition);
|
||||
}
|
||||
) as any;
|
||||
|
||||
suite.file = file;
|
||||
suite.eachTest((test) => {
|
||||
test.file = file;
|
||||
});
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
when.skip = (
|
||||
title: string,
|
||||
conditions: RunCondition | RunCondition[],
|
||||
callback: (condition: RunCondition) => void
|
||||
) => {
|
||||
when(title, conditions, callback, true);
|
||||
};
|
||||
|
||||
const registry = {
|
||||
when,
|
||||
run: () => {
|
||||
running = true;
|
||||
|
||||
const esArchiver = getService('esArchiver');
|
||||
const logger = getService('log');
|
||||
|
||||
const supertest = getService('legacySupertestAsApmWriteUser');
|
||||
|
||||
const logWithTimer = () => {
|
||||
const start = process.hrtime();
|
||||
|
||||
return (message: string) => {
|
||||
const diff = process.hrtime(start);
|
||||
const time = `${Math.round(diff[0] * 1000 + diff[1] / 1e6)}ms`;
|
||||
logger.info(`(${time}) ${message}`);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
const groups = joinByKey(callbacks, ['config', 'archives'], (a, b) => ({
|
||||
...a,
|
||||
...b,
|
||||
runs: a.runs.concat(b.runs),
|
||||
}));
|
||||
const groups = joinByKey(callbacks, ['config', 'archives'], (a, b) => ({
|
||||
...a,
|
||||
...b,
|
||||
runs: a.runs.concat(b.runs),
|
||||
}));
|
||||
|
||||
callbacks.length = 0;
|
||||
callbacks.length = 0;
|
||||
|
||||
const byConfig = groupBy(groups, 'config');
|
||||
const byConfig = groupBy(groups, 'config');
|
||||
|
||||
Object.keys(byConfig).forEach((config) => {
|
||||
const groupsForConfig = byConfig[config];
|
||||
// register suites for other configs, but skip them so tests are marked as such
|
||||
// and their snapshots are not marked as obsolete
|
||||
(config === configName ? describe : describe.skip)(config, () => {
|
||||
groupsForConfig.forEach((group) => {
|
||||
const { runs, ...condition } = group;
|
||||
Object.keys(byConfig).forEach((config) => {
|
||||
const groupsForConfig = byConfig[config];
|
||||
// register suites for other configs, but skip them so tests are marked as such
|
||||
// and their snapshots are not marked as obsolete
|
||||
(config === apmFtrConfig.name ? describe : describe.skip)(config, () => {
|
||||
groupsForConfig.forEach((group) => {
|
||||
const { runs, ...condition } = group;
|
||||
|
||||
const runBefore = async () => {
|
||||
const log = logWithTimer();
|
||||
for (const archiveName of condition.archives) {
|
||||
log(`Loading ${archiveName}`);
|
||||
const runBefore = async () => {
|
||||
const log = logWithTimer();
|
||||
for (const archiveName of condition.archives) {
|
||||
log(`Loading ${archiveName}`);
|
||||
|
||||
await esArchiver.load(
|
||||
Path.join(
|
||||
'x-pack/test/apm_api_integration/common/fixtures/es_archiver',
|
||||
archiveName
|
||||
)
|
||||
);
|
||||
await esArchiver.load(
|
||||
Path.join(
|
||||
'x-pack/test/apm_api_integration/common/fixtures/es_archiver',
|
||||
archiveName
|
||||
)
|
||||
);
|
||||
|
||||
// sync jobs from .ml-config to .kibana SOs
|
||||
await supertest.get('/api/ml/saved_objects/sync').set('kbn-xsrf', 'foo');
|
||||
}
|
||||
if (condition.archives.length) {
|
||||
log('Loaded all archives');
|
||||
}
|
||||
};
|
||||
// sync jobs from .ml-config to .kibana SOs
|
||||
await supertest.get('/api/ml/saved_objects/sync').set('kbn-xsrf', 'foo');
|
||||
}
|
||||
if (condition.archives.length) {
|
||||
log('Loaded all archives');
|
||||
}
|
||||
};
|
||||
|
||||
const runAfter = async () => {
|
||||
const log = logWithTimer();
|
||||
for (const archiveName of condition.archives) {
|
||||
log(`Unloading ${archiveName}`);
|
||||
await esArchiver.unload(
|
||||
Path.join(
|
||||
'x-pack/test/apm_api_integration/common/fixtures/es_archiver',
|
||||
archiveName
|
||||
)
|
||||
);
|
||||
}
|
||||
if (condition.archives.length) {
|
||||
log('Unloaded all archives');
|
||||
}
|
||||
};
|
||||
const runAfter = async () => {
|
||||
const log = logWithTimer();
|
||||
for (const archiveName of condition.archives) {
|
||||
log(`Unloading ${archiveName}`);
|
||||
await esArchiver.unload(
|
||||
Path.join(
|
||||
'x-pack/test/apm_api_integration/common/fixtures/es_archiver',
|
||||
archiveName
|
||||
)
|
||||
);
|
||||
}
|
||||
if (condition.archives.length) {
|
||||
log('Unloaded all archives');
|
||||
}
|
||||
};
|
||||
|
||||
describe(condition.archives.join(',') || 'no data', () => {
|
||||
before(runBefore);
|
||||
describe(condition.archives.join(',') || 'no data', () => {
|
||||
before(runBefore);
|
||||
|
||||
runs.forEach((run) => {
|
||||
run.cb();
|
||||
runs.forEach((run) => {
|
||||
run.cb();
|
||||
});
|
||||
|
||||
after(runAfter);
|
||||
});
|
||||
|
||||
after(runAfter);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
running = false;
|
||||
},
|
||||
};
|
||||
running = false;
|
||||
},
|
||||
};
|
||||
|
||||
return registry;
|
||||
}
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
import expect from '@kbn/expect';
|
||||
import archives from '../../common/fixtures/es_archiver/archives_metadata';
|
||||
import { FtrProviderContext } from '../../common/ftr_provider_context';
|
||||
import { registry } from '../../common/registry';
|
||||
|
||||
export default function ApiTest({ getService }: FtrProviderContext) {
|
||||
const registry = getService('registry');
|
||||
const apmApiClient = getService('apmApiClient');
|
||||
const archiveName = 'apm_8.0.0';
|
||||
const { end } = archives[archiveName];
|
||||
|
|
|
@ -18,7 +18,6 @@ import {
|
|||
} from '@kbn/rule-data-utils';
|
||||
import { merge, omit } from 'lodash';
|
||||
import { FtrProviderContext } from '../../common/ftr_provider_context';
|
||||
import { registry } from '../../common/registry';
|
||||
|
||||
interface Alert {
|
||||
schedule: {
|
||||
|
@ -36,6 +35,7 @@ interface Alert {
|
|||
}
|
||||
|
||||
export default function ApiTest({ getService }: FtrProviderContext) {
|
||||
const registry = getService('registry');
|
||||
const supertest = getService('legacySupertestAsApmWriteUser');
|
||||
const es = getService('es');
|
||||
|
||||
|
|
|
@ -14,10 +14,10 @@ import type { RawSearchStrategyClientParams } from '../../../../plugins/apm/comm
|
|||
import { APM_SEARCH_STRATEGIES } from '../../../../plugins/apm/common/search_strategies/constants';
|
||||
|
||||
import { FtrProviderContext } from '../../common/ftr_provider_context';
|
||||
import { registry } from '../../common/registry';
|
||||
import { parseBfetchResponse } from '../../common/utils/parse_b_fetch';
|
||||
|
||||
export default function ApiTest({ getService }: FtrProviderContext) {
|
||||
const registry = getService('registry');
|
||||
const retry = getService('retry');
|
||||
const supertest = getService('legacySupertestAsApmReadUser');
|
||||
|
||||
|
@ -45,7 +45,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
};
|
||||
|
||||
registry.when('failed transactions without data', { config: 'trial', archives: [] }, () => {
|
||||
it('queries the search strategy and returns results', async () => {
|
||||
it.skip('queries the search strategy and returns results', async () => {
|
||||
const intialResponse = await supertest
|
||||
.post(`/internal/bsearch`)
|
||||
.set('kbn-xsrf', 'foo')
|
||||
|
@ -134,7 +134,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
registry.when('failed transactions with data', { config: 'trial', archives: ['8.0.0'] }, () => {
|
||||
it('queries the search strategy and returns results', async () => {
|
||||
it.skip('queries the search strategy and returns results', async () => {
|
||||
const intialResponse = await supertest
|
||||
.post(`/internal/bsearch`)
|
||||
.set('kbn-xsrf', 'foo')
|
||||
|
|
|
@ -14,10 +14,10 @@ import type { RawSearchStrategyClientParams } from '../../../../plugins/apm/comm
|
|||
import { APM_SEARCH_STRATEGIES } from '../../../../plugins/apm/common/search_strategies/constants';
|
||||
|
||||
import { FtrProviderContext } from '../../common/ftr_provider_context';
|
||||
import { registry } from '../../common/registry';
|
||||
import { parseBfetchResponse } from '../../common/utils/parse_b_fetch';
|
||||
|
||||
export default function ApiTest({ getService }: FtrProviderContext) {
|
||||
const registry = getService('registry');
|
||||
const retry = getService('retry');
|
||||
const supertest = getService('legacySupertestAsApmReadUser');
|
||||
|
||||
|
@ -144,7 +144,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
{ config: 'trial', archives: ['8.0.0'] },
|
||||
() => {
|
||||
// putting this into a single `it` because the responses depend on each other
|
||||
it('queries the search strategy and returns results', async () => {
|
||||
it.skip('queries the search strategy and returns results', async () => {
|
||||
const intialResponse = await supertest
|
||||
.post(`/internal/bsearch`)
|
||||
.set('kbn-xsrf', 'foo')
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
|
||||
import expect from '@kbn/expect';
|
||||
import { FtrProviderContext } from '../../common/ftr_provider_context';
|
||||
import { registry } from '../../common/registry';
|
||||
|
||||
export default function rumServicesApiTests({ getService }: FtrProviderContext) {
|
||||
const registry = getService('registry');
|
||||
const supertest = getService('legacySupertestAsApmReadUser');
|
||||
|
||||
registry.when('CSM Services without data', { config: 'trial', archives: [] }, () => {
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
|
||||
import expect from '@kbn/expect';
|
||||
import { FtrProviderContext } from '../../common/ftr_provider_context';
|
||||
import { registry } from '../../common/registry';
|
||||
|
||||
export default function rumHasDataApiTests({ getService }: FtrProviderContext) {
|
||||
const registry = getService('registry');
|
||||
const supertest = getService('legacySupertestAsApmReadUser');
|
||||
|
||||
registry.when('has_rum_data without data', { config: 'trial', archives: [] }, () => {
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
|
||||
import expect from '@kbn/expect';
|
||||
import { FtrProviderContext } from '../../common/ftr_provider_context';
|
||||
import { registry } from '../../common/registry';
|
||||
|
||||
export default function rumJsErrorsApiTests({ getService }: FtrProviderContext) {
|
||||
const registry = getService('registry');
|
||||
const supertest = getService('legacySupertestAsApmReadUser');
|
||||
|
||||
registry.when('CSM JS errors with data', { config: 'trial', archives: [] }, () => {
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
|
||||
import expect from '@kbn/expect';
|
||||
import { FtrProviderContext } from '../../common/ftr_provider_context';
|
||||
import { registry } from '../../common/registry';
|
||||
|
||||
export default function rumServicesApiTests({ getService }: FtrProviderContext) {
|
||||
const registry = getService('registry');
|
||||
const supertest = getService('legacySupertestAsApmReadUser');
|
||||
|
||||
registry.when('CSM long task metrics without data', { config: 'trial', archives: [] }, () => {
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
|
||||
import expect from '@kbn/expect';
|
||||
import { FtrProviderContext } from '../../common/ftr_provider_context';
|
||||
import { registry } from '../../common/registry';
|
||||
|
||||
export default function rumServicesApiTests({ getService }: FtrProviderContext) {
|
||||
const registry = getService('registry');
|
||||
const supertest = getService('legacySupertestAsApmReadUser');
|
||||
|
||||
registry.when('UX page load dist without data', { config: 'trial', archives: [] }, () => {
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
|
||||
import expect from '@kbn/expect';
|
||||
import { FtrProviderContext } from '../../common/ftr_provider_context';
|
||||
import { registry } from '../../common/registry';
|
||||
|
||||
export default function rumServicesApiTests({ getService }: FtrProviderContext) {
|
||||
const registry = getService('registry');
|
||||
const supertest = getService('legacySupertestAsApmReadUser');
|
||||
|
||||
registry.when('CSM page views without data', { config: 'trial', archives: [] }, () => {
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
|
||||
import expect from '@kbn/expect';
|
||||
import { FtrProviderContext } from '../../common/ftr_provider_context';
|
||||
import { registry } from '../../common/registry';
|
||||
|
||||
export default function rumServicesApiTests({ getService }: FtrProviderContext) {
|
||||
const registry = getService('registry');
|
||||
const supertest = getService('legacySupertestAsApmReadUser');
|
||||
|
||||
registry.when('CSM url search api without data', { config: 'trial', archives: [] }, () => {
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
|
||||
import expect from '@kbn/expect';
|
||||
import { FtrProviderContext } from '../../common/ftr_provider_context';
|
||||
import { registry } from '../../common/registry';
|
||||
|
||||
export default function rumServicesApiTests({ getService }: FtrProviderContext) {
|
||||
const registry = getService('registry');
|
||||
const supertest = getService('legacySupertestAsApmReadUser');
|
||||
|
||||
registry.when('CSM web core vitals without data', { config: 'trial', archives: [] }, () => {
|
||||
|
|
|
@ -6,10 +6,10 @@
|
|||
*/
|
||||
import expect from '@kbn/expect';
|
||||
import { FtrProviderContext } from '../../common/ftr_provider_context';
|
||||
import { registry } from '../../common/registry';
|
||||
import { dataConfig, generateData } from './generate_data';
|
||||
|
||||
export default function ApiTest({ getService }: FtrProviderContext) {
|
||||
const registry = getService('registry');
|
||||
const apmApiClient = getService('apmApiClient');
|
||||
const synthtraceEsClient = getService('synthtraceEsClient');
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
import expect from '@kbn/expect';
|
||||
import { APIReturnType } from '../../../../plugins/apm/public/services/rest/createCallApmApi';
|
||||
import { FtrProviderContext } from '../../common/ftr_provider_context';
|
||||
import { registry } from '../../common/registry';
|
||||
import { dataConfig, generateData } from './generate_data';
|
||||
import { NodeType, BackendNode } from '../../../../plugins/apm/common/connections';
|
||||
import { roundNumber } from '../../utils';
|
||||
|
@ -15,6 +14,7 @@ import { roundNumber } from '../../utils';
|
|||
type TopDependencies = APIReturnType<'GET /internal/apm/backends/top_backends'>;
|
||||
|
||||
export default function ApiTest({ getService }: FtrProviderContext) {
|
||||
const registry = getService('registry');
|
||||
const apmApiClient = getService('apmApiClient');
|
||||
const synthtraceEsClient = getService('synthtraceEsClient');
|
||||
|
||||
|
|
|
@ -11,9 +11,9 @@ import { LatencyAggregationType } from '../../../../plugins/apm/common/latency_a
|
|||
import { isFiniteNumber } from '../../../../plugins/apm/common/utils/is_finite_number';
|
||||
import { PromiseReturnType } from '../../../../plugins/observability/typings/common';
|
||||
import { FtrProviderContext } from '../../common/ftr_provider_context';
|
||||
import { registry } from '../../common/registry';
|
||||
|
||||
export default function ApiTest({ getService }: FtrProviderContext) {
|
||||
const registry = getService('registry');
|
||||
const apmApiClient = getService('apmApiClient');
|
||||
const synthtraceEsClient = getService('synthtraceEsClient');
|
||||
|
||||
|
|
|
@ -13,13 +13,13 @@ import {
|
|||
} from '../../../../plugins/apm/public/services/rest/createCallApmApi';
|
||||
import { RecursivePartial } from '../../../../plugins/apm/typings/common';
|
||||
import { FtrProviderContext } from '../../common/ftr_provider_context';
|
||||
import { registry } from '../../common/registry';
|
||||
import { config, generateData } from './generate_data';
|
||||
|
||||
type ErrorsDistribution =
|
||||
APIReturnType<'GET /internal/apm/services/{serviceName}/errors/distribution'>;
|
||||
|
||||
export default function ApiTest({ getService }: FtrProviderContext) {
|
||||
const registry = getService('registry');
|
||||
const apmApiClient = getService('apmApiClient');
|
||||
const synthtraceEsClient = getService('synthtraceEsClient');
|
||||
|
||||
|
|
|
@ -12,11 +12,11 @@ import {
|
|||
} from '../../../../plugins/apm/public/services/rest/createCallApmApi';
|
||||
import { RecursivePartial } from '../../../../plugins/apm/typings/common';
|
||||
import { FtrProviderContext } from '../../common/ftr_provider_context';
|
||||
import { registry } from '../../common/registry';
|
||||
|
||||
type ErrorGroups = APIReturnType<'GET /internal/apm/services/{serviceName}/errors'>['errorGroups'];
|
||||
|
||||
export default function ApiTest({ getService }: FtrProviderContext) {
|
||||
const registry = getService('registry');
|
||||
const apmApiClient = getService('apmApiClient');
|
||||
const synthtraceEsClient = getService('synthtraceEsClient');
|
||||
|
||||
|
|
|
@ -11,13 +11,13 @@ import {
|
|||
} from '../../../../plugins/apm/public/services/rest/createCallApmApi';
|
||||
import { RecursivePartial } from '../../../../plugins/apm/typings/common';
|
||||
import { FtrProviderContext } from '../../common/ftr_provider_context';
|
||||
import { registry } from '../../common/registry';
|
||||
import { config, generateData } from './generate_data';
|
||||
|
||||
type ErrorsDistribution =
|
||||
APIReturnType<'GET /internal/apm/services/{serviceName}/errors/{groupId}'>;
|
||||
|
||||
export default function ApiTest({ getService }: FtrProviderContext) {
|
||||
const registry = getService('registry');
|
||||
const apmApiClient = getService('apmApiClient');
|
||||
const synthtraceEsClient = getService('synthtraceEsClient');
|
||||
|
||||
|
|
|
@ -8,9 +8,9 @@ import expect from '@kbn/expect';
|
|||
import { PROCESSOR_EVENT } from '../../../../plugins/apm/common/elasticsearch_fieldnames';
|
||||
import { ProcessorEvent } from '../../../../plugins/apm/common/processor_event';
|
||||
import { FtrProviderContext } from '../../common/ftr_provider_context';
|
||||
import { registry } from '../../common/registry';
|
||||
|
||||
export default function ApiTest({ getService }: FtrProviderContext) {
|
||||
const registry = getService('registry');
|
||||
const apmApiClient = getService('apmApiClient');
|
||||
const esClient = getService('es');
|
||||
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
|
||||
import expect from '@kbn/expect';
|
||||
import { FtrProviderContext } from '../common/ftr_provider_context';
|
||||
import { registry } from '../common/registry';
|
||||
|
||||
export default function featureControlsTests({ getService }: FtrProviderContext) {
|
||||
const registry = getService('registry');
|
||||
const supertest = getService('legacySupertestAsApmWriteUser');
|
||||
const supertestWithoutAuth = getService('supertestWithoutAuth');
|
||||
const security = getService('security');
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
|
||||
import expect from '@kbn/expect';
|
||||
import { FtrProviderContext } from '../../common/ftr_provider_context';
|
||||
import { registry } from '../../common/registry';
|
||||
|
||||
export default function ApiTest({ getService }: FtrProviderContext) {
|
||||
const registry = getService('registry');
|
||||
const supertest = getService('supertest');
|
||||
const archiveName = 'apm_8.0.0';
|
||||
|
||||
|
|
|
@ -6,10 +6,9 @@
|
|||
*/
|
||||
|
||||
import { FtrProviderContext } from '../common/ftr_provider_context';
|
||||
import { registry } from '../common/registry';
|
||||
|
||||
export default function apmApiIntegrationTests(providerContext: FtrProviderContext) {
|
||||
const { loadTestFile } = providerContext;
|
||||
export default function apmApiIntegrationTests({ getService, loadTestFile }: FtrProviderContext) {
|
||||
const registry = getService('registry');
|
||||
|
||||
describe('APM API tests', function () {
|
||||
this.tags('ciGroup1');
|
||||
|
@ -263,6 +262,6 @@ export default function apmApiIntegrationTests(providerContext: FtrProviderConte
|
|||
loadTestFile(require.resolve('./dependencies/top_dependencies'));
|
||||
});
|
||||
|
||||
registry.run(providerContext);
|
||||
registry.run();
|
||||
});
|
||||
}
|
||||
|
|
|
@ -7,11 +7,11 @@
|
|||
|
||||
import expect from '@kbn/expect';
|
||||
import { FtrProviderContext } from '../../common/ftr_provider_context';
|
||||
import { registry } from '../../common/registry';
|
||||
|
||||
import archives_metadata from '../../common/fixtures/es_archiver/archives_metadata';
|
||||
|
||||
export default function customLinksTests({ getService }: FtrProviderContext) {
|
||||
const registry = getService('registry');
|
||||
const apmApiClient = getService('apmApiClient');
|
||||
|
||||
const archiveName = 'apm_8.0.0';
|
||||
|
@ -49,7 +49,7 @@ export default function customLinksTests({ getService }: FtrProviderContext) {
|
|||
},
|
||||
});
|
||||
expect(status).to.be(200);
|
||||
expect(body._inspect?.length).to.be(1);
|
||||
expect(body._inspect).not.to.be.empty();
|
||||
|
||||
// @ts-expect-error
|
||||
expect(Object.keys(body._inspect[0])).to.eql([
|
||||
|
|
|
@ -11,9 +11,9 @@ import { LatencyAggregationType } from '../../../../plugins/apm/common/latency_a
|
|||
import { isFiniteNumber } from '../../../../plugins/apm/common/utils/is_finite_number';
|
||||
import { PromiseReturnType } from '../../../../plugins/observability/typings/common';
|
||||
import { FtrProviderContext } from '../../common/ftr_provider_context';
|
||||
import { registry } from '../../common/registry';
|
||||
|
||||
export default function ApiTest({ getService }: FtrProviderContext) {
|
||||
const registry = getService('registry');
|
||||
const apmApiClient = getService('apmApiClient');
|
||||
const synthtraceEsClient = getService('synthtraceEsClient');
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@ import { first } from 'lodash';
|
|||
import { MetricsChartsByAgentAPIResponse } from '../../../../plugins/apm/server/lib/metrics/get_metrics_chart_data_by_agent';
|
||||
import { GenericMetricsChart } from '../../../../plugins/apm/server/lib/metrics/transform_metrics_chart';
|
||||
import { FtrProviderContext } from '../../common/ftr_provider_context';
|
||||
import { registry } from '../../common/registry';
|
||||
|
||||
interface ChartResponse {
|
||||
body: MetricsChartsByAgentAPIResponse;
|
||||
|
@ -18,6 +17,7 @@ interface ChartResponse {
|
|||
}
|
||||
|
||||
export default function ApiTest({ getService }: FtrProviderContext) {
|
||||
const registry = getService('registry');
|
||||
const supertest = getService('legacySupertestAsApmReadUser');
|
||||
|
||||
registry.when(
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
import expect from '@kbn/expect';
|
||||
|
||||
import { FtrProviderContext } from '../../common/ftr_provider_context';
|
||||
import { registry } from '../../common/registry';
|
||||
|
||||
export default function ApiTest({ getService }: FtrProviderContext) {
|
||||
const registry = getService('registry');
|
||||
const apmApiClient = getService('apmApiClient');
|
||||
|
||||
registry.when(
|
||||
|
|
|
@ -8,11 +8,11 @@ import { service, timerange } from '@elastic/apm-synthtrace';
|
|||
import expect from '@kbn/expect';
|
||||
import { meanBy, sumBy } from 'lodash';
|
||||
import { FtrProviderContext } from '../../common/ftr_provider_context';
|
||||
import { registry } from '../../common/registry';
|
||||
import { PromiseReturnType } from '../../../../plugins/observability/typings/common';
|
||||
import { roundNumber } from '../../utils';
|
||||
|
||||
export default function ApiTest({ getService }: FtrProviderContext) {
|
||||
const registry = getService('registry');
|
||||
const apmApiClient = getService('apmApiClient');
|
||||
|
||||
const synthtraceEsClient = getService('synthtraceEsClient');
|
||||
|
|
|
@ -12,9 +12,9 @@ import { isEmpty, orderBy, uniq } from 'lodash';
|
|||
import archives_metadata from '../../common/fixtures/es_archiver/archives_metadata';
|
||||
import { PromiseReturnType } from '../../../../plugins/observability/typings/common';
|
||||
import { FtrProviderContext } from '../../common/ftr_provider_context';
|
||||
import { registry } from '../../common/registry';
|
||||
|
||||
export default function serviceMapsApiTests({ getService }: FtrProviderContext) {
|
||||
const registry = getService('registry');
|
||||
const supertest = getService('legacySupertestAsApmReadUser');
|
||||
const supertestAsApmReadUserWithoutMlAccess = getService(
|
||||
'legacySupertestAsApmReadUserWithoutMlAccess'
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
exports[`APM API tests basic apm_8.0.0 Instance details when data is loaded fetch instance details return the correct data 1`] = `
|
||||
Object {
|
||||
"@timestamp": "2021-08-03T06:57:50.204Z",
|
||||
"agent": Object {
|
||||
"ephemeral_id": "2745d454-f57f-4473-a09b-fe6bef295860",
|
||||
"name": "java",
|
||||
|
|
|
@ -17,10 +17,10 @@ import {
|
|||
import { APIReturnType } from '../../../../../plugins/apm/public/services/rest/createCallApmApi';
|
||||
import archives from '../../../common/fixtures/es_archiver/archives_metadata';
|
||||
import { FtrProviderContext } from '../../../common/ftr_provider_context';
|
||||
import { registry } from '../../../common/registry';
|
||||
import { apmDependenciesMapping, createServiceDependencyDocs } from './es_utils';
|
||||
|
||||
export default function ApiTest({ getService }: FtrProviderContext) {
|
||||
const registry = getService('registry');
|
||||
const apmApiClient = getService('apmApiClient');
|
||||
const es = getService('es');
|
||||
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
*/
|
||||
import url from 'url';
|
||||
import expect from '@kbn/expect';
|
||||
import { omit } from 'lodash';
|
||||
import { FtrProviderContext } from '../../common/ftr_provider_context';
|
||||
import archives from '../../common/fixtures/es_archiver/archives_metadata';
|
||||
import { registry } from '../../common/registry';
|
||||
import { APIReturnType } from '../../../../plugins/apm/public/services/rest/createCallApmApi';
|
||||
import { getServiceNodeIds } from './get_service_node_ids';
|
||||
import { createApmApiClient } from '../../common/apm_api_supertest';
|
||||
|
@ -17,6 +17,7 @@ type ServiceOverviewInstanceDetails =
|
|||
APIReturnType<'GET /internal/apm/services/{serviceName}/service_overview_instances/details/{serviceNodeName}'>;
|
||||
|
||||
export default function ApiTest({ getService }: FtrProviderContext) {
|
||||
const registry = getService('registry');
|
||||
const supertest = getService('legacySupertestAsApmReadUser');
|
||||
const apmApiSupertest = createApmApiClient(supertest);
|
||||
|
||||
|
@ -77,7 +78,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('return the correct data', () => {
|
||||
expectSnapshot(response.body).toMatch();
|
||||
expectSnapshot(omit(response.body, '@timestamp')).toMatch();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
@ -13,11 +13,11 @@ import { isFiniteNumber } from '../../../../plugins/apm/common/utils/is_finite_n
|
|||
import { APIReturnType } from '../../../../plugins/apm/public/services/rest/createCallApmApi';
|
||||
import { FtrProviderContext } from '../../common/ftr_provider_context';
|
||||
import archives from '../../common/fixtures/es_archiver/archives_metadata';
|
||||
import { registry } from '../../common/registry';
|
||||
import { createApmApiClient } from '../../common/apm_api_supertest';
|
||||
import { getServiceNodeIds } from './get_service_node_ids';
|
||||
|
||||
export default function ApiTest({ getService }: FtrProviderContext) {
|
||||
const registry = getService('registry');
|
||||
const supertest = getService('legacySupertestAsApmReadUser');
|
||||
const apmApiSupertest = createApmApiClient(supertest);
|
||||
|
||||
|
|
|
@ -13,13 +13,13 @@ import { APIReturnType } from '../../../../plugins/apm/public/services/rest/crea
|
|||
import { isFiniteNumber } from '../../../../plugins/apm/common/utils/is_finite_number';
|
||||
import { FtrProviderContext } from '../../common/ftr_provider_context';
|
||||
import archives from '../../common/fixtures/es_archiver/archives_metadata';
|
||||
import { registry } from '../../common/registry';
|
||||
|
||||
import { LatencyAggregationType } from '../../../../plugins/apm/common/latency_aggregation_types';
|
||||
import { ENVIRONMENT_ALL } from '../../../../plugins/apm/common/environment_filter_values';
|
||||
import { SERVICE_NODE_NAME_MISSING } from '../../../../plugins/apm/common/service_nodes';
|
||||
|
||||
export default function ApiTest({ getService }: FtrProviderContext) {
|
||||
const registry = getService('registry');
|
||||
const apmApiClient = getService('apmApiClient');
|
||||
const synthtraceEsClient = getService('synthtraceEsClient');
|
||||
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
import expect from '@kbn/expect';
|
||||
import { FtrProviderContext } from '../../common/ftr_provider_context';
|
||||
import archives from '../../common/fixtures/es_archiver/archives_metadata';
|
||||
import { registry } from '../../common/registry';
|
||||
|
||||
export default function ApiTest({ getService }: FtrProviderContext) {
|
||||
const registry = getService('registry');
|
||||
const supertest = getService('legacySupertestAsApmReadUser');
|
||||
|
||||
const archiveName = 'apm_8.0.0';
|
||||
|
|
|
@ -9,11 +9,11 @@ import expect from '@kbn/expect';
|
|||
import { merge, cloneDeep, isPlainObject } from 'lodash';
|
||||
import { JsonObject } from '@kbn/utility-types';
|
||||
import { FtrProviderContext } from '../../common/ftr_provider_context';
|
||||
import { registry } from '../../common/registry';
|
||||
|
||||
const DEFAULT_INDEX_NAME = 'observability-annotations';
|
||||
|
||||
export default function annotationApiTests({ getService }: FtrProviderContext) {
|
||||
const registry = getService('registry');
|
||||
const supertestRead = getService('legacySupertestAsApmReadUser');
|
||||
const supertestWrite = getService('legacySupertestAsApmAnnotationsWriteUser');
|
||||
const es = getService('es');
|
||||
|
|
|
@ -9,9 +9,9 @@ import expect from '@kbn/expect';
|
|||
import { APIReturnType } from '../../../../plugins/apm/public/services/rest/createCallApmApi';
|
||||
|
||||
import { FtrProviderContext } from '../../common/ftr_provider_context';
|
||||
import { registry } from '../../common/registry';
|
||||
|
||||
export default function annotationApiTests({ getService }: FtrProviderContext) {
|
||||
const registry = getService('registry');
|
||||
const apmApiClient = getService('apmApiClient');
|
||||
const es = getService('es');
|
||||
|
||||
|
|
|
@ -15,7 +15,6 @@ import {
|
|||
} from '../../../../../plugins/apm/public/services/rest/createCallApmApi';
|
||||
import { RecursivePartial } from '../../../../../plugins/apm/typings/common';
|
||||
import { FtrProviderContext } from '../../../common/ftr_provider_context';
|
||||
import { registry } from '../../../common/registry';
|
||||
import { config, generateData } from './generate_data';
|
||||
import { getErrorGroupIds } from './get_error_group_ids';
|
||||
|
||||
|
@ -23,6 +22,7 @@ type ErrorGroupsDetailedStatistics =
|
|||
APIReturnType<'GET /internal/apm/services/{serviceName}/error_groups/detailed_statistics'>;
|
||||
|
||||
export default function ApiTest({ getService }: FtrProviderContext) {
|
||||
const registry = getService('registry');
|
||||
const apmApiClient = getService('apmApiClient');
|
||||
const synthtraceEsClient = getService('synthtraceEsClient');
|
||||
|
||||
|
|
|
@ -12,13 +12,13 @@ import {
|
|||
} from '../../../../../plugins/apm/public/services/rest/createCallApmApi';
|
||||
import { RecursivePartial } from '../../../../../plugins/apm/typings/common';
|
||||
import { FtrProviderContext } from '../../../common/ftr_provider_context';
|
||||
import { registry } from '../../../common/registry';
|
||||
import { generateData, config } from './generate_data';
|
||||
|
||||
type ErrorGroupsMainStatistics =
|
||||
APIReturnType<'GET /internal/apm/services/{serviceName}/error_groups/main_statistics'>;
|
||||
|
||||
export default function ApiTest({ getService }: FtrProviderContext) {
|
||||
const registry = getService('registry');
|
||||
const apmApiClient = getService('apmApiClient');
|
||||
const synthtraceEsClient = getService('synthtraceEsClient');
|
||||
|
||||
|
|
|
@ -9,9 +9,9 @@ import expect from '@kbn/expect';
|
|||
import url from 'url';
|
||||
import { FtrProviderContext } from '../../common/ftr_provider_context';
|
||||
import archives from '../../common/fixtures/es_archiver/archives_metadata';
|
||||
import { registry } from '../../common/registry';
|
||||
|
||||
export default function ApiTest({ getService }: FtrProviderContext) {
|
||||
const registry = getService('registry');
|
||||
const supertest = getService('legacySupertestAsApmReadUser');
|
||||
|
||||
const archiveName = 'apm_8.0.0';
|
||||
|
|
|
@ -9,9 +9,9 @@ import expect from '@kbn/expect';
|
|||
import url from 'url';
|
||||
import { FtrProviderContext } from '../../common/ftr_provider_context';
|
||||
import archives from '../../common/fixtures/es_archiver/archives_metadata';
|
||||
import { registry } from '../../common/registry';
|
||||
|
||||
export default function ApiTest({ getService }: FtrProviderContext) {
|
||||
const registry = getService('registry');
|
||||
const supertest = getService('legacySupertestAsApmReadUser');
|
||||
|
||||
const archiveName = 'apm_8.0.0';
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
import expect from '@kbn/expect';
|
||||
import url from 'url';
|
||||
import moment from 'moment';
|
||||
import { registry } from '../../common/registry';
|
||||
import archives_metadata from '../../common/fixtures/es_archiver/archives_metadata';
|
||||
import { FtrProviderContext } from '../../common/ftr_provider_context';
|
||||
import { APIReturnType } from '../../../../plugins/apm/public/services/rest/createCallApmApi';
|
||||
|
@ -17,6 +16,7 @@ type ServicesDetailedStatisticsReturn =
|
|||
APIReturnType<'GET /internal/apm/services/detailed_statistics'>;
|
||||
|
||||
export default function ApiTest({ getService }: FtrProviderContext) {
|
||||
const registry = getService('registry');
|
||||
const supertest = getService('legacySupertestAsApmReadUser');
|
||||
|
||||
const archiveName = 'apm_8.0.0';
|
||||
|
|
|
@ -16,12 +16,12 @@ import {
|
|||
} from '../../../../plugins/apm/public/services/rest/createCallApmApi';
|
||||
import { RecursivePartial } from '../../../../plugins/apm/typings/common';
|
||||
import { FtrProviderContext } from '../../common/ftr_provider_context';
|
||||
import { registry } from '../../common/registry';
|
||||
import { roundNumber } from '../../utils';
|
||||
|
||||
type ThroughputReturn = APIReturnType<'GET /internal/apm/services/{serviceName}/throughput'>;
|
||||
|
||||
export default function ApiTest({ getService }: FtrProviderContext) {
|
||||
const registry = getService('registry');
|
||||
const apmApiClient = getService('apmApiClient');
|
||||
const synthtraceEsClient = getService('synthtraceEsClient');
|
||||
|
||||
|
@ -64,7 +64,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
registry.when(
|
||||
'data is loaded',
|
||||
'Throughput when data is loaded',
|
||||
{ config: 'basic', archives: ['apm_mappings_only_8.0.0'] },
|
||||
() => {
|
||||
describe('Throughput chart api', () => {
|
||||
|
|
|
@ -12,10 +12,10 @@ import { APIReturnType } from '../../../../plugins/apm/public/services/rest/crea
|
|||
import { PromiseReturnType } from '../../../../plugins/observability/typings/common';
|
||||
import { FtrProviderContext } from '../../common/ftr_provider_context';
|
||||
import archives_metadata from '../../common/fixtures/es_archiver/archives_metadata';
|
||||
import { registry } from '../../common/registry';
|
||||
import { ENVIRONMENT_ALL } from '../../../../plugins/apm/common/environment_filter_values';
|
||||
|
||||
export default function ApiTest({ getService }: FtrProviderContext) {
|
||||
const registry = getService('registry');
|
||||
const supertest = getService('legacySupertestAsApmReadUser');
|
||||
|
||||
const apmApiClient = getService('apmApiClient');
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
import expect from '@kbn/expect';
|
||||
import archives_metadata from '../../common/fixtures/es_archiver/archives_metadata';
|
||||
import { FtrProviderContext } from '../../common/ftr_provider_context';
|
||||
import { registry } from '../../common/registry';
|
||||
|
||||
export default function ApiTest({ getService }: FtrProviderContext) {
|
||||
const registry = getService('registry');
|
||||
const supertest = getService('legacySupertestAsApmReadUser');
|
||||
|
||||
const archiveName = 'apm_8.0.0';
|
||||
|
|
|
@ -5,15 +5,17 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { inspect } from 'util';
|
||||
|
||||
import expect from '@kbn/expect';
|
||||
import { omit, orderBy } from 'lodash';
|
||||
import { AgentConfigurationIntake } from '../../../../plugins/apm/common/agent_configuration/configuration_types';
|
||||
import { AgentConfigSearchParams } from '../../../../plugins/apm/server/routes/settings/agent_configuration';
|
||||
|
||||
import { FtrProviderContext } from '../../common/ftr_provider_context';
|
||||
import { registry } from '../../common/registry';
|
||||
|
||||
export default function agentConfigurationTests({ getService }: FtrProviderContext) {
|
||||
const registry = getService('registry');
|
||||
const apmApiClient = getService('apmApiClient');
|
||||
|
||||
const log = getService('log');
|
||||
|
@ -133,19 +135,19 @@ export default function agentConfigurationTests({ getService }: FtrProviderConte
|
|||
|
||||
it('can create and delete config', async () => {
|
||||
// assert that config does not exist
|
||||
await expectStatusCode(() => searchConfigurations(searchParams), 404);
|
||||
await expectMissing(() => searchConfigurations(searchParams));
|
||||
|
||||
// create config
|
||||
await createConfiguration(newConfig);
|
||||
|
||||
// assert that config now exists
|
||||
await expectStatusCode(() => searchConfigurations(searchParams), 200);
|
||||
await expectExists(() => searchConfigurations(searchParams));
|
||||
|
||||
// delete config
|
||||
await deleteConfiguration(newConfig);
|
||||
|
||||
// assert that config was deleted
|
||||
await expectStatusCode(() => searchConfigurations(searchParams), 404);
|
||||
await expectMissing(() => searchConfigurations(searchParams));
|
||||
});
|
||||
|
||||
describe('when a configuration exists', () => {
|
||||
|
@ -439,6 +441,16 @@ export default function agentConfigurationTests({ getService }: FtrProviderConte
|
|||
});
|
||||
}
|
||||
);
|
||||
|
||||
async function expectExists(fn: () => ReturnType<typeof searchConfigurations>) {
|
||||
const response = await fn();
|
||||
expect(response.body).not.to.be.empty();
|
||||
}
|
||||
|
||||
async function expectMissing(fn: () => ReturnType<typeof searchConfigurations>) {
|
||||
const response = await fn();
|
||||
expect(response.body).to.be.empty();
|
||||
}
|
||||
}
|
||||
|
||||
async function waitFor(cb: () => Promise<boolean>, retries = 50): Promise<boolean> {
|
||||
|
@ -464,10 +476,23 @@ async function expectStatusCode(
|
|||
}>,
|
||||
statusCode: number
|
||||
) {
|
||||
let res;
|
||||
try {
|
||||
const res = await fn();
|
||||
expect(res.status).to.be(statusCode);
|
||||
res = await fn();
|
||||
} catch (e) {
|
||||
expect(e.res.status).to.be(statusCode);
|
||||
if (e && e.res && e.res.status) {
|
||||
if (e.res.status === statusCode) {
|
||||
return;
|
||||
}
|
||||
throw new Error(
|
||||
`Expected a [${statusCode}] response, got [${e.res.status}]: ${inspect(e.res)}`
|
||||
);
|
||||
} else {
|
||||
throw new Error(
|
||||
`Unexpected rejection value, expected error with .res response property: ${inspect(e)}`
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
expect(res.status).to.be(statusCode);
|
||||
}
|
||||
|
|
|
@ -6,10 +6,10 @@
|
|||
*/
|
||||
|
||||
import expect from '@kbn/expect';
|
||||
import { registry } from '../../../common/registry';
|
||||
import { FtrProviderContext } from '../../../common/ftr_provider_context';
|
||||
|
||||
export default function apiTest({ getService }: FtrProviderContext) {
|
||||
const registry = getService('registry');
|
||||
const noAccessUser = getService('legacySupertestAsNoAccessUser');
|
||||
const readUser = getService('legacySupertestAsApmReadUser');
|
||||
const writeUser = getService('legacySupertestAsApmWriteUser');
|
||||
|
|
|
@ -6,10 +6,10 @@
|
|||
*/
|
||||
|
||||
import expect from '@kbn/expect';
|
||||
import { registry } from '../../../common/registry';
|
||||
import { FtrProviderContext } from '../../../common/ftr_provider_context';
|
||||
|
||||
export default function apiTest({ getService }: FtrProviderContext) {
|
||||
const registry = getService('registry');
|
||||
const noAccessUser = getService('legacySupertestAsNoAccessUser');
|
||||
|
||||
function getJobs() {
|
||||
|
|
|
@ -6,10 +6,10 @@
|
|||
*/
|
||||
|
||||
import expect from '@kbn/expect';
|
||||
import { registry } from '../../../common/registry';
|
||||
import { FtrProviderContext } from '../../../common/ftr_provider_context';
|
||||
|
||||
export default function apiTest({ getService }: FtrProviderContext) {
|
||||
const registry = getService('registry');
|
||||
const apmReadUser = getService('legacySupertestAsApmReadUser');
|
||||
|
||||
function getJobs() {
|
||||
|
|
|
@ -7,10 +7,10 @@
|
|||
|
||||
import expect from '@kbn/expect';
|
||||
import { countBy } from 'lodash';
|
||||
import { registry } from '../../../common/registry';
|
||||
import { FtrProviderContext } from '../../../common/ftr_provider_context';
|
||||
|
||||
export default function apiTest({ getService }: FtrProviderContext) {
|
||||
const registry = getService('registry');
|
||||
const apmApiClient = getService('apmApiClient');
|
||||
const legacyWriteUserClient = getService('legacySupertestAsApmWriteUser');
|
||||
|
||||
|
|
|
@ -8,10 +8,10 @@
|
|||
import expect from '@kbn/expect';
|
||||
import { CustomLink } from '../../../../plugins/apm/common/custom_link/custom_link_types';
|
||||
import { FtrProviderContext } from '../../common/ftr_provider_context';
|
||||
import { registry } from '../../common/registry';
|
||||
import { ApmApiError } from '../../common/apm_api_supertest';
|
||||
|
||||
export default function customLinksTests({ getService }: FtrProviderContext) {
|
||||
const registry = getService('registry');
|
||||
const apmApiClient = getService('apmApiClient');
|
||||
const log = getService('log');
|
||||
|
||||
|
|
|
@ -10,9 +10,9 @@ import {
|
|||
TRANSACTION_TYPE,
|
||||
} from '../../../../plugins/apm/common/elasticsearch_fieldnames';
|
||||
import { FtrProviderContext } from '../../common/ftr_provider_context';
|
||||
import { registry } from '../../common/registry';
|
||||
|
||||
export default function suggestionsTests({ getService }: FtrProviderContext) {
|
||||
const registry = getService('registry');
|
||||
const apmApiClient = getService('apmApiClient');
|
||||
const archiveName = 'apm_8.0.0';
|
||||
|
||||
|
|
|
@ -10,10 +10,10 @@ import { meanBy, sumBy } from 'lodash';
|
|||
import { BackendNode, ServiceNode } from '../../../../plugins/apm/common/connections';
|
||||
import { PromiseReturnType } from '../../../../plugins/observability/typings/common';
|
||||
import { FtrProviderContext } from '../../common/ftr_provider_context';
|
||||
import { registry } from '../../common/registry';
|
||||
import { roundNumber } from '../../utils';
|
||||
|
||||
export default function ApiTest({ getService }: FtrProviderContext) {
|
||||
const registry = getService('registry');
|
||||
const apmApiClient = getService('apmApiClient');
|
||||
const synthtraceEsClient = getService('synthtraceEsClient');
|
||||
|
||||
|
|
|
@ -10,10 +10,10 @@ import { meanBy, sumBy } from 'lodash';
|
|||
import { LatencyAggregationType } from '../../../../plugins/apm/common/latency_aggregation_types';
|
||||
import { PromiseReturnType } from '../../../../plugins/observability/typings/common';
|
||||
import { FtrProviderContext } from '../../common/ftr_provider_context';
|
||||
import { registry } from '../../common/registry';
|
||||
import { roundNumber } from '../../utils';
|
||||
|
||||
export default function ApiTest({ getService }: FtrProviderContext) {
|
||||
const registry = getService('registry');
|
||||
const apmApiClient = getService('apmApiClient');
|
||||
const synthtraceEsClient = getService('synthtraceEsClient');
|
||||
|
||||
|
|
|
@ -9,9 +9,9 @@ import expect from '@kbn/expect';
|
|||
import { sortBy } from 'lodash';
|
||||
import archives_metadata from '../../common/fixtures/es_archiver/archives_metadata';
|
||||
import { FtrProviderContext } from '../../common/ftr_provider_context';
|
||||
import { registry } from '../../common/registry';
|
||||
|
||||
export default function ApiTest({ getService }: FtrProviderContext) {
|
||||
const registry = getService('registry');
|
||||
const supertest = getService('legacySupertestAsApmReadUser');
|
||||
|
||||
const archiveName = 'apm_8.0.0';
|
||||
|
|
|
@ -8,10 +8,10 @@
|
|||
import expect from '@kbn/expect';
|
||||
import archives_metadata from '../../common/fixtures/es_archiver/archives_metadata';
|
||||
import { FtrProviderContext } from '../../common/ftr_provider_context';
|
||||
import { registry } from '../../common/registry';
|
||||
import { createApmApiClient, SupertestReturnType } from '../../common/apm_api_supertest';
|
||||
|
||||
export default function ApiTest({ getService }: FtrProviderContext) {
|
||||
const registry = getService('registry');
|
||||
const supertest = getService('supertest');
|
||||
const apmApiSupertest = createApmApiClient(supertest);
|
||||
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
import expect from '@kbn/expect';
|
||||
import archives_metadata from '../../common/fixtures/es_archiver/archives_metadata';
|
||||
import { FtrProviderContext } from '../../common/ftr_provider_context';
|
||||
import { registry } from '../../common/registry';
|
||||
|
||||
export default function ApiTest({ getService }: FtrProviderContext) {
|
||||
const registry = getService('registry');
|
||||
const supertest = getService('legacySupertestAsApmReadUser');
|
||||
|
||||
const archiveName = 'apm_8.0.0';
|
||||
|
|
|
@ -12,12 +12,12 @@ import moment from 'moment';
|
|||
import { APIReturnType } from '../../../../plugins/apm/public/services/rest/createCallApmApi';
|
||||
import archives_metadata from '../../common/fixtures/es_archiver/archives_metadata';
|
||||
import { FtrProviderContext } from '../../common/ftr_provider_context';
|
||||
import { registry } from '../../common/registry';
|
||||
|
||||
type ErrorRate =
|
||||
APIReturnType<'GET /internal/apm/services/{serviceName}/transactions/charts/error_rate'>;
|
||||
|
||||
export default function ApiTest({ getService }: FtrProviderContext) {
|
||||
const registry = getService('registry');
|
||||
const supertest = getService('legacySupertestAsApmReadUser');
|
||||
|
||||
const archiveName = 'apm_8.0.0';
|
||||
|
|
|
@ -12,12 +12,12 @@ import { APIReturnType } from '../../../../plugins/apm/public/services/rest/crea
|
|||
import { PromiseReturnType } from '../../../../plugins/observability/typings/common';
|
||||
import { FtrProviderContext } from '../../common/ftr_provider_context';
|
||||
import archives_metadata from '../../common/fixtures/es_archiver/archives_metadata';
|
||||
import { registry } from '../../common/registry';
|
||||
|
||||
type LatencyChartReturnType =
|
||||
APIReturnType<'GET /internal/apm/services/{serviceName}/transactions/charts/latency'>;
|
||||
|
||||
export default function ApiTest({ getService }: FtrProviderContext) {
|
||||
const registry = getService('registry');
|
||||
const supertest = getService('legacySupertestAsApmReadUser');
|
||||
|
||||
const archiveName = 'apm_8.0.0';
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
|
||||
import expect from '@kbn/expect';
|
||||
import { FtrProviderContext } from '../../common/ftr_provider_context';
|
||||
import { registry } from '../../common/registry';
|
||||
|
||||
export default function ApiTest({ getService }: FtrProviderContext) {
|
||||
const registry = getService('registry');
|
||||
const apmApiClient = getService('apmApiClient');
|
||||
|
||||
const endpoint = 'POST /internal/apm/latency/overall_distribution';
|
||||
|
|
|
@ -7,11 +7,13 @@
|
|||
|
||||
import expect from '@kbn/expect';
|
||||
import qs from 'querystring';
|
||||
import { sortBy } from 'lodash';
|
||||
import { APIReturnType } from '../../../../plugins/apm/public/services/rest/createCallApmApi';
|
||||
import archives_metadata from '../../common/fixtures/es_archiver/archives_metadata';
|
||||
import { FtrProviderContext } from '../../common/ftr_provider_context';
|
||||
import { registry } from '../../common/registry';
|
||||
|
||||
export default function ApiTest({ getService }: FtrProviderContext) {
|
||||
const registry = getService('registry');
|
||||
const supertest = getService('legacySupertestAsApmReadUser');
|
||||
|
||||
const archiveName = 'apm_8.0.0';
|
||||
|
@ -31,11 +33,13 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
{ config: 'basic', archives: [] },
|
||||
() => {
|
||||
it('handles empty state', async () => {
|
||||
const response = await supertest.get(url);
|
||||
const response: {
|
||||
body: APIReturnType<'GET /internal/apm/services/{serviceName}/transactions/traces/samples'>;
|
||||
status: number;
|
||||
} = await supertest.get(url);
|
||||
|
||||
expect(response.status).to.be(200);
|
||||
|
||||
expect(response.body.noHits).to.be(true);
|
||||
expect(response.body.traceSamples.length).to.be(0);
|
||||
});
|
||||
}
|
||||
|
@ -45,14 +49,17 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
'Transaction trace samples response structure when data is loaded',
|
||||
{ config: 'basic', archives: [archiveName] },
|
||||
() => {
|
||||
let response: any;
|
||||
let response: {
|
||||
body: APIReturnType<'GET /internal/apm/services/{serviceName}/transactions/traces/samples'>;
|
||||
status: number;
|
||||
};
|
||||
|
||||
before(async () => {
|
||||
response = await supertest.get(url);
|
||||
});
|
||||
|
||||
it('returns the correct metadata', () => {
|
||||
expect(response.status).to.be(200);
|
||||
expect(response.body.noHits).to.be(false);
|
||||
expect(response.body.traceSamples.length).to.be.greaterThan(0);
|
||||
});
|
||||
|
||||
|
@ -63,51 +70,15 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
it('returns the correct samples', () => {
|
||||
const { traceSamples } = response.body;
|
||||
|
||||
expectSnapshot(traceSamples.sort((sample: any) => sample.traceId)).toMatchInline(`
|
||||
expectSnapshot(sortBy(traceSamples, (sample) => sample.traceId)).toMatchInline(`
|
||||
Array [
|
||||
Object {
|
||||
"traceId": "5267685738bf75b68b16bf3426ba858c",
|
||||
"transactionId": "5223f43bc3154c5a",
|
||||
},
|
||||
Object {
|
||||
"traceId": "9a84d15e5a0e32098d569948474e8e2f",
|
||||
"transactionId": "b85db78a9824107b",
|
||||
},
|
||||
Object {
|
||||
"traceId": "e123f0466fa092f345d047399db65aa2",
|
||||
"transactionId": "c0af16286229d811",
|
||||
},
|
||||
Object {
|
||||
"traceId": "4943691f87b7eb97d442d1ef33ca65c7",
|
||||
"transactionId": "f6f4677d731e57c5",
|
||||
},
|
||||
Object {
|
||||
"traceId": "66bd97c457f5675665397ac9201cc050",
|
||||
"transactionId": "592b60cc9ddabb15",
|
||||
},
|
||||
Object {
|
||||
"traceId": "10d882b7118870015815a27c37892375",
|
||||
"transactionId": "0cf9db0b1e321239",
|
||||
},
|
||||
Object {
|
||||
"traceId": "6d85d8f1bc4bbbfdb19cdba59d2fc164",
|
||||
"transactionId": "d0a16f0f52f25d6b",
|
||||
},
|
||||
Object {
|
||||
"traceId": "0996b09e42ad4dbfaaa6a069326c6e66",
|
||||
"transactionId": "5721364b179716d0",
|
||||
},
|
||||
Object {
|
||||
"traceId": "d9415d102c0634e1e8fa53ceef07be70",
|
||||
"transactionId": "fab91c68c9b1c42b",
|
||||
},
|
||||
Object {
|
||||
"traceId": "ca7a2072e7974ae84b5096706c6b6255",
|
||||
"transactionId": "92ab7f2ef11685dd",
|
||||
},
|
||||
Object {
|
||||
"traceId": "d250e2a1bad40f78653d8858db65326b",
|
||||
"transactionId": "6fcd12599c1b57fa",
|
||||
"traceId": "10d882b7118870015815a27c37892375",
|
||||
"transactionId": "0cf9db0b1e321239",
|
||||
},
|
||||
Object {
|
||||
"traceId": "2ca82e99453c58584c4b8de9a8ba4ec3",
|
||||
|
@ -117,14 +88,50 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
"traceId": "45b3d1a86003938687a55e49bf3610b8",
|
||||
"transactionId": "a707456bda99ee98",
|
||||
},
|
||||
Object {
|
||||
"traceId": "4943691f87b7eb97d442d1ef33ca65c7",
|
||||
"transactionId": "f6f4677d731e57c5",
|
||||
},
|
||||
Object {
|
||||
"traceId": "5267685738bf75b68b16bf3426ba858c",
|
||||
"transactionId": "5223f43bc3154c5a",
|
||||
},
|
||||
Object {
|
||||
"traceId": "66bd97c457f5675665397ac9201cc050",
|
||||
"transactionId": "592b60cc9ddabb15",
|
||||
},
|
||||
Object {
|
||||
"traceId": "6d85d8f1bc4bbbfdb19cdba59d2fc164",
|
||||
"transactionId": "d0a16f0f52f25d6b",
|
||||
},
|
||||
Object {
|
||||
"traceId": "7483bd52150d1c93a858c60bfdd0c138",
|
||||
"transactionId": "e20e701ff93bdb55",
|
||||
},
|
||||
Object {
|
||||
"traceId": "9a84d15e5a0e32098d569948474e8e2f",
|
||||
"transactionId": "b85db78a9824107b",
|
||||
},
|
||||
Object {
|
||||
"traceId": "a21ea39b41349a4614a86321d965c957",
|
||||
"transactionId": "338bd7908cbf7f2d",
|
||||
},
|
||||
Object {
|
||||
"traceId": "ca7a2072e7974ae84b5096706c6b6255",
|
||||
"transactionId": "92ab7f2ef11685dd",
|
||||
},
|
||||
Object {
|
||||
"traceId": "d250e2a1bad40f78653d8858db65326b",
|
||||
"transactionId": "6fcd12599c1b57fa",
|
||||
},
|
||||
Object {
|
||||
"traceId": "d9415d102c0634e1e8fa53ceef07be70",
|
||||
"transactionId": "fab91c68c9b1c42b",
|
||||
},
|
||||
Object {
|
||||
"traceId": "e123f0466fa092f345d047399db65aa2",
|
||||
"transactionId": "c0af16286229d811",
|
||||
},
|
||||
]
|
||||
`);
|
||||
});
|
||||
|
|
|
@ -12,13 +12,13 @@ import { LatencyAggregationType } from '../../../../plugins/apm/common/latency_a
|
|||
import { asPercent } from '../../../../plugins/apm/common/utils/formatters';
|
||||
import { APIReturnType } from '../../../../plugins/apm/public/services/rest/createCallApmApi';
|
||||
import { FtrProviderContext } from '../../common/ftr_provider_context';
|
||||
import { registry } from '../../common/registry';
|
||||
import { roundNumber } from '../../utils';
|
||||
|
||||
type TransactionsGroupsDetailedStatistics =
|
||||
APIReturnType<'GET /internal/apm/services/{serviceName}/transactions/groups/detailed_statistics'>;
|
||||
|
||||
export default function ApiTest({ getService }: FtrProviderContext) {
|
||||
const registry = getService('registry');
|
||||
const apmApiClient = getService('apmApiClient');
|
||||
const synthtraceEsClient = getService('synthtraceEsClient');
|
||||
|
||||
|
|
|
@ -11,12 +11,12 @@ import url from 'url';
|
|||
import { APIReturnType } from '../../../../plugins/apm/public/services/rest/createCallApmApi';
|
||||
import { FtrProviderContext } from '../../common/ftr_provider_context';
|
||||
import archives from '../../common/fixtures/es_archiver/archives_metadata';
|
||||
import { registry } from '../../common/registry';
|
||||
|
||||
type TransactionsGroupsPrimaryStatistics =
|
||||
APIReturnType<'GET /internal/apm/services/{serviceName}/transactions/groups/main_statistics'>;
|
||||
|
||||
export default function ApiTest({ getService }: FtrProviderContext) {
|
||||
const registry = getService('registry');
|
||||
const supertest = getService('legacySupertestAsApmReadUser');
|
||||
|
||||
const archiveName = 'apm_8.0.0';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue