mirror of
https://github.com/elastic/kibana.git
synced 2025-04-20 07:48:52 -04:00
* [partial backport] extract kbnServer test utils from #12554 * Implement esTestCluster test util (#13099) * [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 (cherry picked from commit6748b22d03
) * [testUtils/esTestCluster] use more standard api style (#13197) (cherry picked from commitd36080bca8
) * [scanner] use new esTestConfig service
114 lines
2.6 KiB
JavaScript
114 lines
2.6 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
|
|
},
|
|
script: {
|
|
inline: true,
|
|
stored: true
|
|
}
|
|
}
|
|
},
|
|
|
|
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()}` ]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
|
|
};
|
|
};
|