Restructure testing with kbn-test package - Run with multiple configs, move cli options to config - Package-ify kbn-test - Eventually we'll have functional_test_runner live in a package of its own, and then this kbn-test will use that as a dependency, probably still as a devDependency. - Implement functional_tests_server - Collapse single and multiple config apis into one command Use kbn-es Replace es_test_cluster + es_test_config with kbn/test utils Implement new createEsTestCluster Improve scripts, jsdocs, cli top-level tools Lift error handling to the top level
49 lines
1.2 KiB
JavaScript
49 lines
1.2 KiB
JavaScript
import { format as formatUrl } from 'url';
|
|
import { OPTIMIZE_BUNDLE_DIR, esTestConfig, kbnTestConfig } from '@kbn/test';
|
|
import {
|
|
KibanaServerProvider,
|
|
EsProvider,
|
|
EsArchiverProvider,
|
|
RetryProvider,
|
|
} from './services';
|
|
|
|
export default function () {
|
|
const servers = {
|
|
kibana: kbnTestConfig.getUrlParts(),
|
|
elasticsearch: esTestConfig.getUrlParts(),
|
|
};
|
|
|
|
return {
|
|
servers,
|
|
|
|
esTestCluster: {
|
|
license: 'oss',
|
|
from: 'snapshot',
|
|
serverArgs: [
|
|
],
|
|
},
|
|
|
|
kibanaServerArgs: [
|
|
'--env=development',
|
|
'--logging.json=false',
|
|
'--no-base-path',
|
|
`--server.port=${kbnTestConfig.getPort()}`,
|
|
`--optimize.watchPort=${kbnTestConfig.getPort()}`,
|
|
'--optimize.watchPrebuild=true',
|
|
'--status.allowAnonymous=true',
|
|
'--optimize.enabled=true',
|
|
`--optimize.bundleDir=${OPTIMIZE_BUNDLE_DIR}`,
|
|
`--elasticsearch.url=${formatUrl(servers.elasticsearch)}`,
|
|
`--elasticsearch.username=${servers.elasticsearch.username}`,
|
|
`--elasticsearch.password=${servers.elasticsearch.password}`,
|
|
],
|
|
|
|
services: {
|
|
kibanaServer: KibanaServerProvider,
|
|
retry: RetryProvider,
|
|
es: EsProvider,
|
|
esArchiver: EsArchiverProvider,
|
|
}
|
|
};
|
|
}
|