From: Simon Brandhof Date: Thu, 19 Oct 2017 14:59:51 +0000 (+0200) Subject: Add documentation link in cluster error message X-Git-Tag: 6.7-RC1~159 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=24fa6e00fc51c7b832cc16928a5062eb8cfd6fee;p=sonarqube.git Add documentation link in cluster error message --- diff --git a/server/sonar-server/src/main/java/org/sonar/server/platform/ClusterVerification.java b/server/sonar-server/src/main/java/org/sonar/server/platform/ClusterVerification.java index 2b3565b552a..b696547a949 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/platform/ClusterVerification.java +++ b/server/sonar-server/src/main/java/org/sonar/server/platform/ClusterVerification.java @@ -46,7 +46,8 @@ public class ClusterVerification implements Startable { return; } if (feature == null || !feature.isEnabled()) { - throw MessageException.of("Cluster mode can't be enabled. Please install the High Availability plugin."); + throw MessageException.of( + "Cluster mode can't be enabled. Please install the Data Center Edition. More details at https://redirect.sonarsource.com/editions/datacenter.html."); } } diff --git a/server/sonar-server/src/test/java/org/sonar/server/platform/ClusterVerificationTest.java b/server/sonar-server/src/test/java/org/sonar/server/platform/ClusterVerificationTest.java index 25ee2c8f2f5..429327d2b5b 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/platform/ClusterVerificationTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/platform/ClusterVerificationTest.java @@ -29,6 +29,8 @@ import static org.mockito.Mockito.when; public class ClusterVerificationTest { + private static final String ERROR_MESSAGE = "Cluster mode can't be enabled. Please install the Data Center Edition. More details at https://redirect.sonarsource.com/editions/datacenter.html."; + @Rule public ExpectedException expectedException = ExpectedException.none(); @@ -42,7 +44,7 @@ public class ClusterVerificationTest { ClusterVerification underTest = new ClusterVerification(webServer); expectedException.expect(MessageException.class); - expectedException.expectMessage("Cluster mode can't be enabled. Please install the High Availability plugin."); + expectedException.expectMessage(ERROR_MESSAGE); underTest.start(); } @@ -53,7 +55,7 @@ public class ClusterVerificationTest { ClusterVerification underTest = new ClusterVerification(webServer, feature); expectedException.expect(MessageException.class); - expectedException.expectMessage("Cluster mode can't be enabled. Please install the High Availability plugin."); + expectedException.expectMessage(ERROR_MESSAGE); underTest.start(); }