kibana/x-pack/test/observability_functional/with_rac_write.config.ts
Felix Stürmer 125c569944
[RAC] [Observability] Enable the observability alerting and cases features (#115785)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-25 15:19:59 +02:00

53 lines
1.7 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; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
import { readFileSync } from 'fs';
import { resolve } from 'path';
import { CA_CERT_PATH } from '@kbn/dev-utils';
import { FtrConfigProviderContext } from '@kbn/test';
export default async function ({ readConfigFile }: FtrConfigProviderContext) {
const xpackFunctionalConfig = await readConfigFile(require.resolve('../functional/config.js'));
const servers = {
...xpackFunctionalConfig.get('servers'),
elasticsearch: {
...xpackFunctionalConfig.get('servers.elasticsearch'),
protocol: 'https',
certificateAuthorities: [readFileSync(CA_CERT_PATH)],
},
};
return {
// default to the xpack functional config
...xpackFunctionalConfig.getAll(),
servers,
esTestCluster: {
...xpackFunctionalConfig.get('esTestCluster'),
ssl: true,
},
kbnTestServer: {
...xpackFunctionalConfig.get('kbnTestServer'),
serverArgs: [
...xpackFunctionalConfig.get('kbnTestServer.serverArgs'),
`--elasticsearch.hosts=https://${servers.elasticsearch.hostname}:${servers.elasticsearch.port}`,
`--elasticsearch.ssl.certificateAuthorities=${CA_CERT_PATH}`,
],
},
uiSettings: {
defaults: {
'dateFormat:tz': 'UTC',
},
},
testFiles: [resolve(__dirname, './apps/observability')],
junit: {
...xpackFunctionalConfig.get('junit'),
reportName: 'Chrome X-Pack Observability UI Functional Tests',
},
};
}