[stack_functional_integration] remove esArchiver service (#141842)

This commit is contained in:
Spencer 2022-09-26 14:50:28 -05:00 committed by GitHub
parent 0edfb0b1f3
commit c494c0402f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 14 additions and 57 deletions

View file

@ -18,6 +18,7 @@ export function EsArchiverProvider({ getService }: FtrProviderContext): EsArchiv
const retry = getService('retry');
const esArchiver = new EsArchiver({
baseDir: config.get('esArchiver.baseDirectory'),
client,
log,
kbnClient: kibanaServer,

View file

@ -260,6 +260,13 @@ export const schema = Joi.object()
// definition of apps that work with `common.navigateToApp()`
apps: Joi.object().pattern(ID_PATTERN, appUrlPartsSchema()).default(),
// settings for the saved objects svc
esArchiver: Joi.object()
.keys({
baseDirectory: Joi.string().optional(),
})
.default(),
// settings for the saved objects svc
kbnArchiver: Joi.object()
.keys({

View file

@ -12,7 +12,6 @@ import { REPO_ROOT } from '@kbn/utils';
import chalk from 'chalk';
import { esTestConfig, kbnTestConfig } from '@kbn/test';
import { TriggersActionsPageProvider } from '../../functional_with_es_ssl/page_objects/triggers_actions_ui_page';
import { services } from '../services';
const log = new ToolingLog({
level: 'info',
@ -28,13 +27,14 @@ export default async ({ readConfigFile }) => {
const xpackFunctionalConfig = await readConfigFile(
require.resolve('../../functional/config.base.js')
);
const externalConf = consumeState(resolve(__dirname, stateFilePath));
const externalConf = consumeState(resolve(__dirname, stateFilePath)) ?? {
TESTS_LIST: 'alerts',
};
process.env.stack_functional_integration = true;
logAll(log);
const settings = {
...xpackFunctionalConfig.getAll(),
services,
pageObjects: {
triggersActionsUI: TriggersActionsPageProvider,
...xpackFunctionalConfig.get('pageObjects'),
@ -53,6 +53,9 @@ export default async ({ readConfigFile }) => {
...xpackFunctionalConfig.get('kbnTestServer'),
serverArgs: [...xpackFunctionalConfig.get('kbnTestServer.serverArgs')],
},
esArchiver: {
baseDirectory: INTEGRATION_TEST_ROOT,
},
testFiles: tests(externalConf.TESTS_LIST).map(prepend).map(logTest),
// testFiles: ['alerts'].map(prepend).map(logTest),
// If we need to do things like disable animations, we can do it in configure_start_kibana.sh, in the provisioner...which lives in the integration-test private repo

View file

@ -1,40 +0,0 @@
/*
* 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; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
import Path from 'path';
import { EsArchiver } from '@kbn/es-archiver';
import { REPO_ROOT } from '@kbn/utils';
import { KibanaServer } from '@kbn/ftr-common-functional-services';
const INTEGRATION_TEST_ROOT =
process.env.WORKSPACE || Path.resolve(REPO_ROOT, '../integration-test');
export function EsArchiverProvider({ getService }) {
const config = getService('config');
const client = getService('es');
const log = getService('log');
const kibanaServer = getService('kibanaServer');
const retry = getService('retry');
const esArchiver = new EsArchiver({
baseDir: INTEGRATION_TEST_ROOT,
client,
log,
kbnClient: kibanaServer,
});
KibanaServer.extendEsArchiver({
esArchiver,
kibanaServer,
retry,
defaults: config.get('uiSettings.defaults'),
});
return esArchiver;
}

View file

@ -1,14 +0,0 @@
/*
* 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; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
import { services as xpackFunctionalServices } from '../../functional/services';
import { EsArchiverProvider } from './es_archiver';
export const services = {
...xpackFunctionalServices,
esArchiver: EsArchiverProvider,
};