forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.js
75 lines (69 loc) · 2.81 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
/*
* 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.
*/
import path from 'path';
import {
EsProvider,
EsSupertestWithoutAuthProvider,
SupertestWithoutAuthProvider,
UsageAPIProvider,
InfraOpsGraphQLClientProvider,
InfraOpsGraphQLClientFactoryProvider,
SiemGraphQLClientProvider,
SiemGraphQLClientFactoryProvider,
InfraOpsSourceConfigurationProvider,
} from './services';
import {
SecurityServiceProvider,
SpacesServiceProvider,
} from '../common/services';
export async function getApiIntegrationConfig({ readConfigFile }) {
const kibanaAPITestsConfig = await readConfigFile(require.resolve('../../../test/api_integration/config.js'));
const xPackFunctionalTestsConfig = await readConfigFile(require.resolve('../functional/config.js'));
const kibanaCommonConfig = await readConfigFile(require.resolve('../../../test/common/config.js'));
return {
testFiles: [require.resolve('./apis')],
servers: xPackFunctionalTestsConfig.get('servers'),
services: {
supertest: kibanaAPITestsConfig.get('services.supertest'),
esSupertest: kibanaAPITestsConfig.get('services.esSupertest'),
supertestWithoutAuth: SupertestWithoutAuthProvider,
esSupertestWithoutAuth: EsSupertestWithoutAuthProvider,
infraOpsGraphQLClient: InfraOpsGraphQLClientProvider,
infraOpsGraphQLClientFactory: InfraOpsGraphQLClientFactoryProvider,
siemGraphQLClientFactory: SiemGraphQLClientFactoryProvider,
siemGraphQLClient: SiemGraphQLClientProvider,
infraOpsSourceConfiguration: InfraOpsSourceConfigurationProvider,
es: EsProvider,
esArchiver: kibanaCommonConfig.get('services.esArchiver'),
usageAPI: UsageAPIProvider,
kibanaServer: kibanaCommonConfig.get('services.kibanaServer'),
chance: kibanaAPITestsConfig.get('services.chance'),
security: SecurityServiceProvider,
spaces: SpacesServiceProvider,
retry: xPackFunctionalTestsConfig.get('services.retry'),
},
esArchiver: xPackFunctionalTestsConfig.get('esArchiver'),
junit: {
reportName: 'X-Pack API Integration Tests',
},
kbnTestServer: {
...xPackFunctionalTestsConfig.get('kbnTestServer'),
serverArgs: [
...xPackFunctionalTestsConfig.get('kbnTestServer.serverArgs'),
'--optimize.enabled=false',
`--plugin-path=${path.join(__dirname, 'fixtures', 'plugins', 'alerts')}`,
],
},
esTestCluster: {
...xPackFunctionalTestsConfig.get('esTestCluster'),
serverArgs: [
...xPackFunctionalTestsConfig.get('esTestCluster.serverArgs'),
'node.attr.name=apiIntegrationTestNode'
],
},
};
}
export default getApiIntegrationConfig;