Skip to content

Commit

Permalink
Remove legacyEs test service (#107567)
Browse files Browse the repository at this point in the history
* migrate uptime tests to the new client. it didn't use legacy one anyway

* remove legacyEs service
  • Loading branch information
mshustov committed Aug 4, 2021
1 parent 2ad7d68 commit 41b6a99
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 61 deletions.
2 changes: 0 additions & 2 deletions test/common/services/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
*/

import { DeploymentService } from './deployment';
import { LegacyEsProvider } from './legacy_es';
import { ElasticsearchProvider } from './elasticsearch';
import { EsArchiverProvider } from './es_archiver';
import { KibanaServerProvider } from './kibana_server';
Expand All @@ -19,7 +18,6 @@ import { SavedObjectInfoService } from './saved_object_info';

export const services = {
deployment: DeploymentService,
legacyEs: LegacyEsProvider,
es: ElasticsearchProvider,
esArchiver: EsArchiverProvider,
kibanaServer: KibanaServerProvider,
Expand Down
24 changes: 0 additions & 24 deletions test/common/services/legacy_es.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@

import uuid from 'uuid';
import { merge } from 'lodash';
import { KibanaClient } from '@elastic/elasticsearch/api/kibana';
import { makeTls, TlsProps } from './make_tls';

const DEFAULT_INDEX_NAME = 'heartbeat-8-generated-test';
const DATA_STREAM_INDEX_NAME = 'synthetics-http-default';

export const makePing = async (
es: any,
es: KibanaClient,
monitorId: string,
fields: { [key: string]: any },
mogrify: (doc: any) => any,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { makeChecksWithStatus } from './helper/make_checks';

export default function ({ getService }: FtrProviderContext) {
const supertest = getService('supertest');
const es = getService('legacyEs');
const client = getService('es');

describe('telemetry collectors fleet', () => {
Expand All @@ -36,7 +35,7 @@ export default function ({ getService }: FtrProviderContext) {
};

await makeChecksWithStatus(
es,
client,
'upMonitorId',
1,
1,
Expand All @@ -55,7 +54,7 @@ export default function ({ getService }: FtrProviderContext) {
);

await makeChecksWithStatus(
es,
client,
'downMonitorId',
1,
1,
Expand All @@ -74,7 +73,7 @@ export default function ({ getService }: FtrProviderContext) {
);

await makeChecksWithStatus(
es,
client,
'noGeoNameMonitor',
1,
1,
Expand All @@ -91,7 +90,7 @@ export default function ({ getService }: FtrProviderContext) {
true
);
await makeChecksWithStatus(
es,
client,
'downMonitorId',
1,
1,
Expand All @@ -110,7 +109,7 @@ export default function ({ getService }: FtrProviderContext) {
);

await makeChecksWithStatus(
es,
client,
'mixMonitorId',
1,
1,
Expand All @@ -121,7 +120,7 @@ export default function ({ getService }: FtrProviderContext) {
undefined,
true
);
await es.indices.refresh();
await client.indices.refresh();
});

after('unload heartbeat index', () => {
Expand All @@ -140,7 +139,7 @@ export default function ({ getService }: FtrProviderContext) {
});

beforeEach(async () => {
await es.indices.refresh();
await client.indices.refresh();
});

it('should receive expected results for fleet managed monitors after calling monitor logging', async () => {
Expand Down
3 changes: 0 additions & 3 deletions x-pack/test/api_integration/services/index.ts