From 9cb64b2772e551ca81632ae8b1798456853bdd76 Mon Sep 17 00:00:00 2001 From: jvasallo Date: Fri, 25 Oct 2019 11:44:45 +0200 Subject: [PATCH] Improve plugin incompatibility error messages --- .../sonar/server/plugins/ServerExtensionInstaller.java | 2 +- .../server/plugins/ServerExtensionInstallerTest.java | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/server/sonar-server-common/src/main/java/org/sonar/server/plugins/ServerExtensionInstaller.java b/server/sonar-server-common/src/main/java/org/sonar/server/plugins/ServerExtensionInstaller.java index c967c8a6be4..9b5f157b47d 100644 --- a/server/sonar-server-common/src/main/java/org/sonar/server/plugins/ServerExtensionInstaller.java +++ b/server/sonar-server-common/src/main/java/org/sonar/server/plugins/ServerExtensionInstaller.java @@ -110,7 +110,7 @@ public abstract class ServerExtensionInstaller { .map(PluginInfo::getName) .collect(Collectors.toCollection(TreeSet::new)); if (!noMoreCompatiblePluginNames.isEmpty()) { - throw MessageException.of(format("Plugins '%s' are no more compatible with SonarQube", String.join(", ", noMoreCompatiblePluginNames))); + throw MessageException.of(format("Plugins '%s' are no longer compatible with this version of SonarQube. Refer to https://docs.sonarqube.org/latest/instance-administration/plugin-version-matrix/", String.join(", ", noMoreCompatiblePluginNames))); } } diff --git a/server/sonar-server-common/src/test/java/org/sonar/server/plugins/ServerExtensionInstallerTest.java b/server/sonar-server-common/src/test/java/org/sonar/server/plugins/ServerExtensionInstallerTest.java index 90250ae7f0d..1d8ec70eab3 100644 --- a/server/sonar-server-common/src/test/java/org/sonar/server/plugins/ServerExtensionInstallerTest.java +++ b/server/sonar-server-common/src/test/java/org/sonar/server/plugins/ServerExtensionInstallerTest.java @@ -71,7 +71,7 @@ public class ServerExtensionInstallerTest { ComponentContainer componentContainer = new ComponentContainer(); expectedException.expect(MessageException.class); - expectedException.expectMessage("Plugins 'GitHub Auth' are no more compatible with SonarQube"); + expectedException.expectMessage("Plugins 'GitHub Auth' are no longer compatible with this version of SonarQube. Refer to https://docs.sonarqube.org/latest/instance-administration/plugin-version-matrix/"); underTest.installExtensions(componentContainer); } @@ -84,7 +84,7 @@ public class ServerExtensionInstallerTest { ComponentContainer componentContainer = new ComponentContainer(); expectedException.expect(MessageException.class); - expectedException.expectMessage("Plugins 'GitLab Auth, LDAP, SAML Auth' are no more compatible with SonarQube"); + expectedException.expectMessage("Plugins 'GitLab Auth, LDAP, SAML Auth' are no longer compatible with this version of SonarQube. Refer to https://docs.sonarqube.org/latest/instance-administration/plugin-version-matrix/"); underTest.installExtensions(componentContainer); } @@ -96,7 +96,7 @@ public class ServerExtensionInstallerTest { ComponentContainer componentContainer = new ComponentContainer(); expectedException.expect(MessageException.class); - expectedException.expectMessage("Plugins 'SAML Auth' are no more compatible with SonarQube"); + expectedException.expectMessage("Plugins 'SAML Auth' are no longer compatible with this version of SonarQube. Refer to https://docs.sonarqube.org/latest/instance-administration/plugin-version-matrix/"); underTest.installExtensions(componentContainer); } @@ -108,7 +108,7 @@ public class ServerExtensionInstallerTest { ComponentContainer componentContainer = new ComponentContainer(); expectedException.expect(MessageException.class); - expectedException.expectMessage("Plugins 'LDAP' are no more compatible with SonarQube"); + expectedException.expectMessage("Plugins 'LDAP' are no longer compatible with this version of SonarQube. Refer to https://docs.sonarqube.org/latest/instance-administration/plugin-version-matrix/"); underTest.installExtensions(componentContainer); } -- 2.39.5