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';
|
2019-11-18 16:21:11 +01:00
|
|
|
import { OPTIMIZE_BUNDLE_DIR, 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
|
|
|
|
2019-12-13 23:44:04 +01: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: {
|
2019-12-13 23:44:04 +01:00
|
|
|
buildArgs: ['--optimize.useBundleCache=true'],
|
2018-05-21 15:31:30 +02:00
|
|
|
sourceArgs: [
|
|
|
|
'--no-base-path',
|
2019-02-18 23:01:30 +01:00
|
|
|
'--env.name=development',
|
2018-05-21 15:31:30 +02:00
|
|
|
`--optimize.bundleDir=${OPTIMIZE_BUNDLE_DIR}`,
|
|
|
|
],
|
|
|
|
serverArgs: [
|
|
|
|
'--logging.json=false',
|
|
|
|
`--server.port=${kbnTestConfig.getPort()}`,
|
2018-06-05 23:10:15 +02:00
|
|
|
`--optimize.watchPort=${kbnTestConfig.getPort() + 10}`,
|
2018-05-21 15:31:30 +02:00
|
|
|
'--optimize.watchPrebuild=true',
|
|
|
|
'--status.allowAnonymous=true',
|
|
|
|
'--optimize.enabled=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}`,
|
2019-01-17 21:13:13 +01:00
|
|
|
`--kibana.disableWelcomeScreen=true`,
|
2019-10-16 09:24:20 +02:00
|
|
|
'--telemetry.banner=false',
|
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
|
|
|
};
|
|
|
|
}
|