Skip to content

Commit

Permalink
[ftr/services/es] use apiVersion from es plugin in x-pack (elastic#30853
Browse files Browse the repository at this point in the history
  • Loading branch information
mattapperson authored Feb 14, 2019
1 parent fc4dc9e commit c803b83
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion x-pack/test/api_integration/services/es.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@ import { format as formatUrl } from 'url';

import elasticsearch from 'elasticsearch';
import shieldPlugin from '../../../server/lib/esjs_shield_plugin';
import { DEFAULT_API_VERSION } from '../../../../src/legacy/core_plugins/elasticsearch/lib/default_api_version';

export function EsProvider({ getService }) {
const config = getService('config');

return new elasticsearch.Client({
apiVersion: DEFAULT_API_VERSION,
host: formatUrl(config.get('servers.elasticsearch')),
requestTimeout: config.get('timeouts.esRequestTimeout'),
plugins: [shieldPlugin]
plugins: [shieldPlugin],
});
}

0 comments on commit c803b83

Please sign in to comment.