mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
Removed explicit setting of number_of_replicas when creating the kibana index. This allows Elasticsearch index templates and default index settings to control this value.
This commit is contained in:
parent
05baf24ec9
commit
b3ca9c6967
2 changed files with 34 additions and 2 deletions
|
@ -9,8 +9,7 @@ define(function (require) {
|
|||
index: configFile.kibana_index,
|
||||
body: {
|
||||
settings: {
|
||||
number_of_shards : 1,
|
||||
number_of_replicas: 1
|
||||
number_of_shards : 1
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
33
test/unit/specs/components/setup/create_kibana_index.js
Normal file
33
test/unit/specs/components/setup/create_kibana_index.js
Normal file
|
@ -0,0 +1,33 @@
|
|||
define(function (require) {
|
||||
describe('Setup: Create Kibana Index', function () {
|
||||
var sinon = require('test_utils/auto_release_sinon');
|
||||
require('test_utils/no_digest_promises').activateForSuite();
|
||||
|
||||
var createKibanaIndex;
|
||||
var es;
|
||||
var Promise;
|
||||
|
||||
beforeEach(module('kibana'));
|
||||
|
||||
beforeEach(inject(function (Private, $injector) {
|
||||
createKibanaIndex = Private(require('components/setup/steps/create_kibana_index'));
|
||||
es = $injector.get('es');
|
||||
Promise = $injector.get('Promise');
|
||||
}));
|
||||
|
||||
it('sets number of shards for kibana index to 1', function () {
|
||||
var es_indices_stub = sinon.stub(es.indices, 'create').returns(Promise.resolve({}));
|
||||
createKibanaIndex();
|
||||
expect(es_indices_stub.calledOnce).to.be(true);
|
||||
expect(es_indices_stub.firstCall.args[0].body.settings.number_of_shards).to.be(1);
|
||||
});
|
||||
|
||||
it('does not set number of replicas for kibana index', function () {
|
||||
var es_indices_stub = sinon.stub(es.indices, 'create').returns(Promise.resolve({}));
|
||||
createKibanaIndex();
|
||||
expect(es_indices_stub.calledOnce).to.be(true);
|
||||
expect(es_indices_stub.firstCall.args[0].body.settings).to.not.have.property('number_of_replicas');
|
||||
});
|
||||
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue