-
Notifications
You must be signed in to change notification settings - Fork 8.3k
/
with_rac_write.config.ts
99 lines (94 loc) · 3.1 KB
/
with_rac_write.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
/*
* 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';
// .server-log is specifically not enabled
const enabledActionTypes = [
'.email',
'.index',
'.pagerduty',
'.swimlane',
'.servicenow',
'.slack',
'.webhook',
'test.authorization',
'test.failing',
'test.index-record',
'test.noop',
'test.rate-limit',
];
export default async function ({ readConfigFile }: FtrConfigProviderContext) {
const xpackFunctionalConfig = await readConfigFile(
require.resolve('../functional/config.base.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'),
'--xpack.cloud.id=ftr_fake_cloud_id:aGVsbG8uY29tOjQ0MyRFUzEyM2FiYyRrYm4xMjNhYmM=',
'--xpack.cloud.base_url=https://cloud.elastic.co',
'--xpack.spaces.allowSolutionVisibility=true',
`--elasticsearch.hosts=https://${servers.elasticsearch.hostname}:${servers.elasticsearch.port}`,
`--elasticsearch.ssl.certificateAuthorities=${CA_CERT_PATH}`,
`--plugin-path=${resolve(__dirname, '../functional_with_es_ssl/plugins/alerts')}`,
`--xpack.actions.enabledActionTypes=${JSON.stringify(enabledActionTypes)}`,
`--xpack.actions.preconfiguredAlertHistoryEsIndex=false`,
`--xpack.actions.preconfigured=${JSON.stringify({
'my-slack1': {
actionTypeId: '.slack',
name: 'Slack#xyztest',
secrets: {
webhookUrl: 'https://hooks.slack.com/services/abcd/efgh/ijklmnopqrstuvwxyz',
},
},
'my-server-log': {
actionTypeId: '.server-log',
name: 'Serverlog#xyz',
},
'my-email-connector': {
actionTypeId: '.email',
name: 'Email#test-preconfigured-email',
config: {
from: '[email protected]',
host: 'localhost',
port: '1025',
},
},
})}`,
],
},
uiSettings: {
defaults: {
'dateFormat:tz': 'UTC',
'observability:enableLegacyUptimeApp': true,
},
},
testFiles: [resolve(__dirname, './apps/observability')],
junit: {
...xpackFunctionalConfig.get('junit'),
reportName: 'Chrome X-Pack Observability UI Functional Tests',
},
};
}