use elasticsearch.engineVersion in tests

Fixes #5572
This commit is contained in:
Joe Fleming 2015-12-04 16:13:33 -07:00 committed by Joe Fleming
parent 6a5bb4606d
commit a7a11f47ba
2 changed files with 5 additions and 5 deletions

View file

@ -10,7 +10,7 @@ describe('plugins/elasticsearch', function () {
var plugin;
beforeEach(function () {
var get = sinon.stub().withArgs('elasticserach.minimumVersion').returns('1.4.3');
var get = sinon.stub().withArgs('elasticserach.engineVersion').returns('^1.4.3');
var config = function () { return { get: get }; };
server = {
log: _.noop,

View file

@ -55,7 +55,7 @@ describe('plugins/elasticsearch', function () {
});
it('should set the cluster green if everything is ready', function () {
get.withArgs('elasticsearch.minimumVersion').returns('1.4.4');
get.withArgs('elasticsearch.engineVersion').returns('^1.4.4');
get.withArgs('kibana.index').returns('.my-kibana');
client.ping.returns(Promise.resolve());
client.cluster.health.returns(Promise.resolve({ timed_out: false, status: 'green' }));
@ -74,7 +74,7 @@ describe('plugins/elasticsearch', function () {
it('should set the cluster red if the ping fails, then to green', function () {
get.withArgs('elasticsearch.url').returns('http://localhost:9210');
get.withArgs('elasticsearch.minimumVersion').returns('1.4.4');
get.withArgs('elasticsearch.engineVersion').returns('^1.4.4');
get.withArgs('kibana.index').returns('.my-kibana');
client.ping.onCall(0).returns(Promise.reject(new NoConnections()));
client.ping.onCall(1).returns(Promise.resolve());
@ -98,7 +98,7 @@ describe('plugins/elasticsearch', function () {
it('should set the cluster red if the health check status is red, then to green', function () {
get.withArgs('elasticsearch.url').returns('http://localhost:9210');
get.withArgs('elasticsearch.minimumVersion').returns('1.4.4');
get.withArgs('elasticsearch.engineVersion').returns('^1.4.4');
get.withArgs('kibana.index').returns('.my-kibana');
client.ping.returns(Promise.resolve());
client.cluster.health.onCall(0).returns(Promise.resolve({ timed_out: false, status: 'red' }));
@ -121,7 +121,7 @@ describe('plugins/elasticsearch', function () {
it('should set the cluster yellow if the health check timed_out and create index', function () {
get.withArgs('elasticsearch.url').returns('http://localhost:9210');
get.withArgs('elasticsearch.minimumVersion').returns('1.4.4');
get.withArgs('elasticsearch.engineVersion').returns('^1.4.4');
get.withArgs('kibana.index').returns('.my-kibana');
client.ping.returns(Promise.resolve());
client.cluster.health.onCall(0).returns(Promise.resolve({ timed_out: true, status: 'red' }));