* [es/tests] remove unused module * [testUtil/es] add utility for starting es nodes in tests * [ftr/tests] use esTestCluster util to start es * [es/tests/routes] use esTestCluster to start own es * [testUtils/kbnServer] disable uiSettings unless plugins are enabled * [testUtils/esTestCluster] use standard test es port by default * [server/http/tests] add esTestCluster to setup * [test/config] unify es test config into a single module * [testUtils/esTestCluster] directory is no longer configurable * [testUtils/esTestCluster] throw when es.start() is called again without es.stop() * [testUtils/esTestCluster] is* checks should not mutate state
111 lines
2.5 KiB
JavaScript
111 lines
2.5 KiB
JavaScript
import { esTestConfig } from '../../src/test_utils/es';
|
|
|
|
module.exports = function (grunt) {
|
|
const branch = esTestConfig.getBranch();
|
|
const dataDir = esTestConfig.getDirectoryForEsvm('data_dir');
|
|
|
|
return {
|
|
options: {
|
|
branch,
|
|
fresh: !grunt.option('esvm-no-fresh'),
|
|
config: {
|
|
http: {
|
|
port: 9200
|
|
},
|
|
}
|
|
},
|
|
|
|
dev: {
|
|
options: {
|
|
directory: esTestConfig.getDirectoryForEsvm('dev'),
|
|
config: {
|
|
path: {
|
|
data: dataDir
|
|
},
|
|
cluster: {
|
|
name: 'esvm-dev'
|
|
}
|
|
}
|
|
}
|
|
},
|
|
|
|
tribe: {
|
|
options: {
|
|
directory: esTestConfig.getDirectoryForEsvm('tribe'),
|
|
config: {
|
|
path: {
|
|
data: dataDir
|
|
}
|
|
},
|
|
nodes: [{
|
|
cluster: { name: 'data-01' },
|
|
http: { port: 9201 },
|
|
node: { name: 'node-01', data: true, master: true, max_local_storage_nodes: 5 }
|
|
}, {
|
|
cluster: { name: 'data-02' },
|
|
http: { port: 9202 },
|
|
node: { name: 'node-02', data: true, master: true, max_local_storage_nodes: 5 }
|
|
}, {
|
|
cluster: { name: 'admin' },
|
|
http: { port: 9200 },
|
|
node: { name: 'node-03', data: true, master: true, max_local_storage_nodes: 5 }
|
|
}, {
|
|
cluster: { name: 'tribe' },
|
|
http: { port: 9203 },
|
|
node: { name: 'node-04', max_local_storage_nodes: 5 },
|
|
tribe: {
|
|
c1: {
|
|
cluster: {
|
|
name: 'data-01'
|
|
}
|
|
},
|
|
c2: {
|
|
cluster: {
|
|
name: 'data-02'
|
|
}
|
|
},
|
|
on_conflict: 'prefer_c1',
|
|
blocks: {
|
|
write: true
|
|
}
|
|
},
|
|
discovery: {
|
|
zen: {
|
|
ping: {
|
|
unicast: {
|
|
hosts: [ 'localhost:9201', 'localhost:9202' ]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}]
|
|
},
|
|
},
|
|
|
|
ui: {
|
|
options: {
|
|
directory: esTestConfig.getDirectoryForEsvm('test'),
|
|
purge: true,
|
|
config: {
|
|
http: {
|
|
port: esTestConfig.getPort()
|
|
},
|
|
cluster: {
|
|
name: 'esvm-ui'
|
|
},
|
|
discovery: {
|
|
zen: {
|
|
ping: {
|
|
unicast: {
|
|
hosts: [ `localhost:${esTestConfig.getPort()}` ]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
|
|
};
|
|
};
|