forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request elastic#8266 from cjcenizal/backport-5.x/feature/e…
…s-version-checking [5.x] Update elasticsearch plugin to require ES to have the same version as Kibana.
- Loading branch information
Showing
12 changed files
with
234 additions
and
140 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
src/core_plugins/elasticsearch/lib/__tests__/is_es_compatible_with_kibana.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import expect from 'expect.js'; | ||
import sinon from 'sinon'; | ||
|
||
import isEsCompatibleWithKibana from '../is_es_compatible_with_kibana'; | ||
|
||
describe('plugins/elasticsearch', () => { | ||
describe('lib/is_es_compatible_with_kibana', () => { | ||
describe('returns false', () => { | ||
it('when ES major is greater than Kibana major', () => { | ||
expect(isEsCompatibleWithKibana('1.0.0', '0.0.0')).to.be(false); | ||
}); | ||
|
||
it('when ES major is less than Kibana major', () => { | ||
expect(isEsCompatibleWithKibana('0.0.0', '1.0.0')).to.be(false); | ||
}); | ||
|
||
it('when majors are equal, but ES minor is less than Kibana minor', () => { | ||
expect(isEsCompatibleWithKibana('1.0.0', '1.1.0')).to.be(false); | ||
}); | ||
|
||
it('when majors and minors are equal, but ES patch is less than Kibana patch', () => { | ||
expect(isEsCompatibleWithKibana('1.1.0', '1.1.1')).to.be(false); | ||
}); | ||
}); | ||
|
||
describe('returns true', () => { | ||
it('when version numbers are the same', () => { | ||
expect(isEsCompatibleWithKibana('1.1.1', '1.1.1')).to.be(true); | ||
}); | ||
|
||
it('when majors are equal, and ES minor is greater than Kibana minor', () => { | ||
expect(isEsCompatibleWithKibana('1.1.0', '1.0.0')).to.be(true); | ||
}); | ||
|
||
it('when majors and minors are equal, and ES patch is greater than Kibana patch', () => { | ||
expect(isEsCompatibleWithKibana('1.1.1', '1.1.0')).to.be(true); | ||
}); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 0 additions & 45 deletions
45
src/core_plugins/elasticsearch/lib/__tests__/version_satisfies.js
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.