[kbn/test] switch to @elastic/elasticsearch (#95443)

Co-authored-by: spalger <spalger@users.noreply.github.com>
This commit is contained in:
Spencer 2021-03-25 12:57:32 -07:00 committed by GitHub
parent 3bb9220db9
commit dd10c8b5f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -12,9 +12,9 @@ import { get, toPath } from 'lodash';
import { Cluster } from '@kbn/es';
import { CI_PARALLEL_PROCESS_PREFIX } from '../ci_parallel_process_prefix';
import { esTestConfig } from './es_test_config';
import { Client } from '@elastic/elasticsearch';
import { KIBANA_ROOT } from '../';
import * as legacyElasticsearch from 'elasticsearch';
const path = require('path');
const del = require('del');
@ -102,8 +102,8 @@ export function createLegacyEsTestCluster(options = {}) {
* Returns an ES Client to the configured cluster
*/
getClient() {
return new legacyElasticsearch.Client({
host: this.getUrl(),
return new Client({
node: this.getUrl(),
});
}