@kbn/test - include node.name and cluster.initial_master_nodes settings when starting ES.

This commit is contained in:
Aleh Zasypkin 2018-12-13 15:40:38 +01:00
parent ff20e3ea2f
commit b187a01a60

View file

@ -42,6 +42,7 @@ export function createEsTestCluster(options = {}) {
.toString(36)
.substring(2);
const clusterName = `test-${randomHash}`;
const nodeName = `node-${randomHash}`;
const config = {
version: esTestConfig.getVersion(),
installPath: resolve(basePath, clusterName),
@ -78,7 +79,9 @@ export function createEsTestCluster(options = {}) {
esArgs: [
`cluster.name=${clusterName}`,
`http.port=${port}`,
`node.name=${nodeName}`,
`discovery.zen.ping.unicast.hosts=localhost:${port}`,
`cluster.initial_master_nodes=${nodeName}`,
...esArgs,
],
});