Merge pull request #5729 from spalger/pr/5670

Resubmission of #5670
This commit is contained in:
Rashid Khan 2015-12-21 16:44:10 -07:00
commit 245ae24c4c
4 changed files with 5 additions and 23 deletions

View file

@ -60,7 +60,7 @@ describe('plugins/elasticsearch', function () {
}); });
}); });
it('should be created with 1 shard and 1 replica', function () { it('should be created with 1 shard and default replica', function () {
var fn = createKibanaIndex(server); var fn = createKibanaIndex(server);
return fn.then(function () { return fn.then(function () {
var params = client.indices.create.args[0][0]; var params = client.indices.create.args[0][0];
@ -71,22 +71,7 @@ describe('plugins/elasticsearch', function () {
expect(params.body.settings) expect(params.body.settings)
.to.have.property('number_of_shards', 1); .to.have.property('number_of_shards', 1);
expect(params.body.settings) expect(params.body.settings)
.to.have.property('number_of_replicas', 1); .to.not.have.property('number_of_replicas');
});
});
it('should be created with 1 shard and 1 replica', function () {
var fn = createKibanaIndex(server);
return fn.then(function () {
var params = client.indices.create.args[0][0];
expect(params)
.to.have.property('body');
expect(params.body)
.to.have.property('settings');
expect(params.body.settings)
.to.have.property('number_of_shards', 1);
expect(params.body.settings)
.to.have.property('number_of_replicas', 1);
}); });
}); });
@ -137,4 +122,3 @@ describe('plugins/elasticsearch', function () {
}); });
}); });

View file

@ -76,7 +76,7 @@ describe('plugins/elasticsearch', function () {
testRoute({ testRoute({
method: 'POST', method: 'POST',
url: '/elasticsearch/.kibana', url: '/elasticsearch/.kibana',
payload: {settings: { number_of_shards: 1, number_of_replicas: 1 }}, payload: {settings: { number_of_shards: 1 }},
statusCode: 200 statusCode: 200
}); });

View file

@ -14,8 +14,7 @@ module.exports = function (server) {
index: index, index: index,
body: { body: {
settings: { settings: {
number_of_shards: 1, number_of_shards: 1
number_of_replicas: 1
}, },
mappings: { mappings: {
config: { config: {

View file

@ -1,7 +1,6 @@
module.exports = { module.exports = {
settings: { settings: {
number_of_shards: 1, number_of_shards: 1
number_of_replicas: 1
}, },
mappings: { mappings: {
config: { config: {