2018-05-29 05:06:30 +02:00
|
|
|
/*
|
|
|
|
* Licensed to Elasticsearch B.V. under one or more contributor
|
|
|
|
* license agreements. See the NOTICE file distributed with
|
|
|
|
* this work for additional information regarding copyright
|
|
|
|
* ownership. Elasticsearch B.V. licenses this file to you under
|
|
|
|
* the Apache License, Version 2.0 (the "License"); you may
|
|
|
|
* not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing,
|
|
|
|
* software distributed under the License is distributed on an
|
|
|
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
|
|
* KIND, either express or implied. See the License for the
|
|
|
|
* specific language governing permissions and limitations
|
|
|
|
* under the License.
|
|
|
|
*/
|
|
|
|
|
2019-11-13 16:48:34 +01:00
|
|
|
import path from 'path';
|
2018-05-10 01:23:49 +02:00
|
|
|
import { format as formatUrl } from 'url';
|
2020-08-13 18:08:44 +02:00
|
|
|
import { esTestConfig, kbnTestConfig, kibanaServerTestUser } from '@kbn/test';
|
2019-02-28 21:06:00 +01:00
|
|
|
import { services } from './services';
|
2017-05-18 03:53:45 +02:00
|
|
|
|
2020-05-22 09:08:58 +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: {
|
|
|
|
license: 'oss',
|
|
|
|
from: 'snapshot',
|
2019-12-13 23:44:04 +01:00
|
|
|
serverArgs: [],
|
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 18:08:44 +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',
|
2018-12-18 20:22:43 +01:00
|
|
|
`--elasticsearch.hosts=${formatUrl(servers.elasticsearch)}`,
|
2019-11-18 16:21:11 +01:00
|
|
|
`--elasticsearch.username=${kibanaServerTestUser.username}`,
|
|
|
|
`--elasticsearch.password=${kibanaServerTestUser.password}`,
|
2020-02-04 05:17:27 +01:00
|
|
|
`--home.disableWelcomeScreen=true`,
|
2020-10-06 01:47:17 +02:00
|
|
|
`--security.showInsecureClusterWarning=false`,
|
2019-10-16 09:24:20 +02:00
|
|
|
'--telemetry.banner=false',
|
2020-04-13 22:45:13 +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',
|
2019-04-23 01:10:08 +02:00
|
|
|
`--server.maxPayloadBytes=1679958`,
|
2019-11-13 16:48:34 +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-13 23:44:04 +01:00
|
|
|
services,
|
2017-05-18 03:53:45 +02:00
|
|
|
};
|
|
|
|
}
|