2018-05-29 05:06:30 +02:00
|
|
|
/*
|
2021-01-20 02:54:11 +01:00
|
|
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
|
|
* or more contributor license agreements. Licensed under the Elastic License
|
2021-02-04 03:39:13 +01:00
|
|
|
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
|
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
|
|
* Side Public License, v 1.
|
2018-05-29 05:06:30 +02:00
|
|
|
*/
|
|
|
|
|
2019-11-13 22:36:23 +01:00
|
|
|
import path from 'path';
|
2018-05-10 01:23:49 +02:00
|
|
|
import { format as formatUrl } from 'url';
|
2020-08-13 21:36:25 +02:00
|
|
|
import { esTestConfig, kbnTestConfig, kibanaServerTestUser } from '@kbn/test';
|
2019-02-28 23:26:32 +01:00
|
|
|
import { services } from './services';
|
2017-05-18 03:53:45 +02:00
|
|
|
|
2020-05-22 10:08:13 +02:00
|
|
|
export default function () {
|
2018-05-10 01:23:49 +02:00
|
|
|
const servers = {
|
|
|
|
kibana: kbnTestConfig.getUrlParts(),
|
|
|
|
elasticsearch: esTestConfig.getUrlParts(),
|
|
|
|
};
|
|
|
|
|
2017-05-18 03:53:45 +02:00
|
|
|
return {
|
2018-05-10 01:23:49 +02:00
|
|
|
servers,
|
|
|
|
|
|
|
|
esTestCluster: {
|
2021-04-27 22:34:23 +02:00
|
|
|
serverArgs: ['xpack.security.enabled=false'],
|
2017-05-18 03:53:45 +02:00
|
|
|
},
|
2018-05-10 01:23:49 +02:00
|
|
|
|
2018-05-21 15:31:30 +02:00
|
|
|
kbnTestServer: {
|
2020-08-13 21:36:25 +02:00
|
|
|
buildArgs: [],
|
|
|
|
sourceArgs: ['--no-base-path', '--env.name=development'],
|
2018-05-21 15:31:30 +02:00
|
|
|
serverArgs: [
|
|
|
|
'--logging.json=false',
|
|
|
|
`--server.port=${kbnTestConfig.getPort()}`,
|
|
|
|
'--status.allowAnonymous=true',
|
2021-01-12 16:09:29 +01:00
|
|
|
// We shouldn't embed credentials into the URL since Kibana requests to Elasticsearch should
|
|
|
|
// either include `kibanaServerTestUser` credentials, or credentials provided by the test
|
|
|
|
// user, or none at all in case anonymous access is used.
|
|
|
|
`--elasticsearch.hosts=${formatUrl(
|
|
|
|
Object.fromEntries(
|
|
|
|
Object.entries(servers.elasticsearch).filter(([key]) => key.toLowerCase() !== 'auth')
|
|
|
|
)
|
|
|
|
)}`,
|
2019-11-18 17:51:03 +01:00
|
|
|
`--elasticsearch.username=${kibanaServerTestUser.username}`,
|
|
|
|
`--elasticsearch.password=${kibanaServerTestUser.password}`,
|
2020-02-04 15:04:04 +01:00
|
|
|
`--home.disableWelcomeScreen=true`,
|
2020-10-07 22:59:47 +02:00
|
|
|
// Needed for async search functional tests to introduce a delay
|
|
|
|
`--data.search.aggs.shardDelay.enabled=true`,
|
2020-10-06 03:35:23 +02:00
|
|
|
`--security.showInsecureClusterWarning=false`,
|
2019-10-16 10:50:17 +02:00
|
|
|
'--telemetry.banner=false',
|
2020-04-14 00:54:22 +02:00
|
|
|
'--telemetry.optIn=false',
|
|
|
|
// These are *very* important to have them pointing to staging
|
|
|
|
'--telemetry.url=https://telemetry-staging.elastic.co/xpack/v2/send',
|
|
|
|
'--telemetry.optInStatusUrl=https://telemetry-staging.elastic.co/opt_in_status/v2/send',
|
2021-04-19 22:10:13 +02:00
|
|
|
`--server.maxPayload=1679958`,
|
2019-11-13 22:36:23 +01:00
|
|
|
// newsfeed mock service
|
|
|
|
`--plugin-path=${path.join(__dirname, 'fixtures', 'plugins', 'newsfeed')}`,
|
|
|
|
`--newsfeed.service.urlRoot=${servers.kibana.protocol}://${servers.kibana.hostname}:${servers.kibana.port}`,
|
|
|
|
`--newsfeed.service.pathTemplate=/api/_newsfeed-FTS-external-service-simulators/kibana/v{VERSION}.json`,
|
2018-05-21 15:31:30 +02:00
|
|
|
],
|
|
|
|
},
|
2019-12-14 07:55:01 +01:00
|
|
|
services,
|
2017-05-18 03:53:45 +02:00
|
|
|
};
|
|
|
|
}
|