forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.js
286 lines (271 loc) · 9.58 KB
/
config.js
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
/* eslint-disable import/no-default-export */
import { resolve } from 'path';
import {
CanvasPageProvider,
SecurityPageProvider,
MonitoringPageProvider,
LogstashPageProvider,
GraphPageProvider,
GrokDebuggerPageProvider,
WatcherPageProvider,
ReportingPageProvider,
SpaceSelectorPageProvider,
AccountSettingProvider,
InfraHomePageProvider,
InfraLogsPageProvider,
GisPageProvider,
StatusPagePageProvider,
UpgradeAssistantProvider,
CodeHomePageProvider,
RollupPageProvider,
UptimePageProvider,
} from './page_objects';
import {
MonitoringNoDataProvider,
MonitoringClusterListProvider,
MonitoringClusterOverviewProvider,
MonitoringClusterAlertsProvider,
MonitoringElasticsearchSummaryStatusProvider,
MonitoringElasticsearchOverviewProvider,
MonitoringElasticsearchNodesProvider,
MonitoringElasticsearchNodeDetailProvider,
MonitoringElasticsearchIndicesProvider,
MonitoringElasticsearchIndexDetailProvider,
MonitoringElasticsearchShardsProvider,
MonitoringBeatsOverviewProvider,
MonitoringBeatsListingProvider,
MonitoringBeatDetailProvider,
MonitoringBeatsSummaryStatusProvider,
MonitoringLogstashPipelinesProvider,
MonitoringLogstashSummaryStatusProvider,
MonitoringKibanaOverviewProvider,
MonitoringKibanaInstancesProvider,
MonitoringKibanaInstanceProvider,
MonitoringKibanaSummaryStatusProvider,
PipelineListProvider,
PipelineEditorProvider,
RandomProvider,
AceEditorProvider,
GrokDebuggerProvider,
UserMenuProvider,
UptimeProvider,
InfraSourceConfigurationFlyoutProvider,
} from './services';
import {
SecurityServiceProvider,
SpacesServiceProvider,
} from '../common/services';
// the default export of config files must be a config provider
// that returns an object with the projects config values
export default async function ({ readConfigFile }) {
const kibanaCommonConfig = await readConfigFile(
require.resolve('../../../test/common/config.js')
);
const kibanaFunctionalConfig = await readConfigFile(
require.resolve('../../../test/functional/config.js')
);
const kibanaAPITestsConfig = await readConfigFile(
require.resolve('../../../test/api_integration/config.js')
);
return {
// list paths to the files that contain your plugins tests
testFiles: [
resolve(__dirname, './apps/advanced_settings'),
resolve(__dirname, './apps/canvas'),
resolve(__dirname, './apps/graph'),
resolve(__dirname, './apps/monitoring'),
resolve(__dirname, './apps/watcher'),
resolve(__dirname, './apps/dashboard'),
resolve(__dirname, './apps/dashboard_mode'),
resolve(__dirname, './apps/discover'),
resolve(__dirname, './apps/security'),
resolve(__dirname, './apps/spaces'),
resolve(__dirname, './apps/logstash'),
resolve(__dirname, './apps/grok_debugger'),
resolve(__dirname, './apps/infra'),
resolve(__dirname, './apps/machine_learning'),
resolve(__dirname, './apps/rollup_job'),
resolve(__dirname, './apps/maps'),
resolve(__dirname, './apps/status_page'),
resolve(__dirname, './apps/timelion'),
resolve(__dirname, './apps/upgrade_assistant'),
// resolve(__dirname, './apps/code'),
resolve(__dirname, './apps/visualize'),
resolve(__dirname, './apps/uptime'),
resolve(__dirname, './apps/saved_objects_management'),
resolve(__dirname, './apps/dev_tools'),
resolve(__dirname, './apps/apm'),
resolve(__dirname, './apps/index_patterns')
],
// define the name and providers for services that should be
// available to your tests. If you don't specify anything here
// only the built-in services will be available
services: {
...kibanaFunctionalConfig.get('services'),
esSupertest: kibanaAPITestsConfig.get('services.esSupertest'),
monitoringNoData: MonitoringNoDataProvider,
monitoringClusterList: MonitoringClusterListProvider,
monitoringClusterOverview: MonitoringClusterOverviewProvider,
monitoringClusterAlerts: MonitoringClusterAlertsProvider,
monitoringElasticsearchSummaryStatus: MonitoringElasticsearchSummaryStatusProvider,
monitoringElasticsearchOverview: MonitoringElasticsearchOverviewProvider,
monitoringElasticsearchNodes: MonitoringElasticsearchNodesProvider,
monitoringElasticsearchNodeDetail: MonitoringElasticsearchNodeDetailProvider,
monitoringElasticsearchIndices: MonitoringElasticsearchIndicesProvider,
monitoringElasticsearchIndexDetail: MonitoringElasticsearchIndexDetailProvider,
monitoringElasticsearchShards: MonitoringElasticsearchShardsProvider,
monitoringBeatsOverview: MonitoringBeatsOverviewProvider,
monitoringBeatsListing: MonitoringBeatsListingProvider,
monitoringBeatDetail: MonitoringBeatDetailProvider,
monitoringBeatsSummaryStatus: MonitoringBeatsSummaryStatusProvider,
monitoringLogstashPipelines: MonitoringLogstashPipelinesProvider,
monitoringLogstashSummaryStatus: MonitoringLogstashSummaryStatusProvider,
monitoringKibanaOverview: MonitoringKibanaOverviewProvider,
monitoringKibanaInstances: MonitoringKibanaInstancesProvider,
monitoringKibanaInstance: MonitoringKibanaInstanceProvider,
monitoringKibanaSummaryStatus: MonitoringKibanaSummaryStatusProvider,
pipelineList: PipelineListProvider,
pipelineEditor: PipelineEditorProvider,
random: RandomProvider,
aceEditor: AceEditorProvider,
grokDebugger: GrokDebuggerProvider,
security: SecurityServiceProvider,
spaces: SpacesServiceProvider,
userMenu: UserMenuProvider,
uptime: UptimeProvider,
rollup: RollupPageProvider,
infraSourceConfigurationFlyout: InfraSourceConfigurationFlyoutProvider,
},
// just like services, PageObjects are defined as a map of
// names to Providers. Merge in Kibana's or pick specific ones
pageObjects: {
...kibanaFunctionalConfig.get('pageObjects'),
canvas: CanvasPageProvider,
security: SecurityPageProvider,
accountSetting: AccountSettingProvider,
monitoring: MonitoringPageProvider,
logstash: LogstashPageProvider,
graph: GraphPageProvider,
grokDebugger: GrokDebuggerPageProvider,
watcher: WatcherPageProvider,
reporting: ReportingPageProvider,
spaceSelector: SpaceSelectorPageProvider,
infraHome: InfraHomePageProvider,
infraLogs: InfraLogsPageProvider,
maps: GisPageProvider,
statusPage: StatusPagePageProvider,
upgradeAssistant: UpgradeAssistantProvider,
code: CodeHomePageProvider,
uptime: UptimePageProvider,
rollup: RollupPageProvider,
},
servers: kibanaFunctionalConfig.get('servers'),
esTestCluster: {
license: 'trial',
from: 'snapshot',
serverArgs: ['xpack.license.self_generated.type=trial', 'xpack.security.enabled=true'],
},
kbnTestServer: {
...kibanaCommonConfig.get('kbnTestServer'),
serverArgs: [
...kibanaCommonConfig.get('kbnTestServer.serverArgs'),
'--status.allowAnonymous=true',
'--server.uuid=5b2de169-2785-441b-ae8c-186a1936b17d',
'--xpack.xpack_main.telemetry.enabled=false',
'--xpack.maps.showMapsInspectorAdapter=true',
'--xpack.security.encryptionKey="wuGNaIhoMpk5sO4UBxgr3NyW1sFcLgIf"', // server restarts should not invalidate active sessions
'--xpack.code.security.enableGitCertCheck=false' // Disable git certificate check
],
},
uiSettings: {
defaults: {
'accessibility:disableAnimations': true,
},
},
// the apps section defines the urls that
// `PageObjects.common.navigateTo(appKey)` will use.
// Merge urls for your plugin with the urls defined in
// Kibana's config in order to use this helper
apps: {
...kibanaFunctionalConfig.get('apps'),
login: {
pathname: '/login',
},
monitoring: {
pathname: '/app/monitoring',
},
logstashPipelines: {
pathname: '/app/kibana',
hash: '/management/logstash/pipelines',
},
maps: {
pathname: '/app/maps',
},
graph: {
pathname: '/app/graph',
},
grokDebugger: {
pathname: '/app/kibana',
hash: '/dev_tools/grokdebugger',
},
searchProfiler: {
pathname: '/app/kibana',
hash: '/dev_tools/searchprofiler',
},
spaceSelector: {
pathname: '/',
},
infraOps: {
pathname: '/app/infra',
},
infraLogs: {
pathname: '/app/infra',
hash: '/logs',
},
canvas: {
pathname: '/app/canvas',
hash: '/',
},
code: {
pathname: '/app/code',
hash: '/admin',
},
codeSearch: {
pathname: '/app/code',
hash: '/search',
},
uptime: {
pathname: '/app/uptime',
},
apm: {
pathname: '/app/apm'
},
ml: {
pathname: '/app/ml'
},
rollupJob: {
pathname: '/app/kibana',
hash: '/management/elasticsearch/rollup_jobs/',
},
apm: {
pathname: '/app/apm',
}
},
// choose where esArchiver should load archives from
esArchiver: {
directory: resolve(__dirname, 'es_archives'),
},
// choose where screenshots should be saved
screenshots: {
directory: resolve(__dirname, 'screenshots'),
},
junit: {
reportName: 'X-Pack Functional Tests',
},
};
}