mirror of
https://github.com/elastic/kibana.git
synced 2025-04-25 02:09:32 -04:00
Improve plugin version mismatch error message (#25774)
Closes #16796 Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
This commit is contained in:
parent
7f274efb1c
commit
e09f6906ae
2 changed files with 3 additions and 4 deletions
|
@ -61,7 +61,6 @@ export function assertVersion(settings) {
|
|||
const actual = cleanVersion(settings.plugins[0].kibanaVersion);
|
||||
const expected = cleanVersion(settings.version);
|
||||
if (!versionSatisfies(actual, expected)) {
|
||||
throw new Error (`Incorrect Kibana version in plugin [${settings.plugins[0].name}]. ` +
|
||||
`Expected [${expected}]; found [${actual}]`);
|
||||
throw new Error(`Plugin ${settings.plugins[0].name} [${actual}] is incompatible with Kibana [${expected}]`);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -81,7 +81,7 @@ describe('kibana cli', function () {
|
|||
it('should throw an error if plugin kibanaVersion does not match kibana version', function () {
|
||||
settings.plugins[0].kibanaVersion = '1.2.3.4';
|
||||
|
||||
expect(() => assertVersion(settings)).toThrow(/incorrect kibana version/i);
|
||||
expect(() => assertVersion(settings)).toThrow(/incompatible with Kibana/i);
|
||||
});
|
||||
|
||||
it('should not throw an error if plugin kibanaVersion matches kibana version', function () {
|
||||
|
@ -99,7 +99,7 @@ describe('kibana cli', function () {
|
|||
it('should ignore version info after the dash in checks on invalid version', function () {
|
||||
settings.plugins[0].kibanaVersion = '2.0.0-foo-bar-version-1.2.3';
|
||||
|
||||
expect(() => assertVersion(settings)).toThrow(/incorrect kibana version/i);
|
||||
expect(() => assertVersion(settings)).toThrow(/incompatible with Kibana/i);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue