kibana/test/common/services/es_archiver.ts
Mikhail Shustov 641cef7ca6
Functional tests for execution context (#110299)
* remove unnecessary ts-ignore

* add context propagation to x-opaque-id header tests

* run tests on CI

* simplify logging. the action purpose follows from the context name

* extend tests with the assertion against execution_context from the Kibana logs

* split JSON log records only

* apply suggestions proposed by Spencer
2021-09-03 05:48:32 -04:00

34 lines
1 KiB
TypeScript

/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
import { EsArchiver } from '@kbn/es-archiver';
import { FtrProviderContext } from '../ftr_provider_context';
import * as KibanaServer from './kibana_server';
export function EsArchiverProvider({ getService }: FtrProviderContext): EsArchiver {
const config = getService('config');
const client = getService('es');
const log = getService('log');
const kibanaServer = getService('kibanaServer');
const retry = getService('retry');
const esArchiver = new EsArchiver({
client,
log,
kbnClient: kibanaServer,
});
KibanaServer.extendEsArchiver({
esArchiver,
kibanaServer,
retry,
defaults: config.get('uiSettings.defaults'),
});
return esArchiver;
}