aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-ce-task-projectanalysis
diff options
context:
space:
mode:
authorguillaume-peoch-sonarsource <guillaume.peoch@sonarsource.com>2023-10-03 13:52:55 +0200
committersonartech <sonartech@sonarsource.com>2023-10-04 20:03:19 +0000
commit8cba1c302acc645b638f7bdfe9499e99321806b8 (patch)
tree6240295d18456a1f6f472a2a10c7bfb4ec6502b4 /server/sonar-ce-task-projectanalysis
parentcbb3b4fe0351462a3c8cacdd3f6ea18c10b956d3 (diff)
downloadsonarqube-8cba1c302acc645b638f7bdfe9499e99321806b8.tar.gz
sonarqube-8cba1c302acc645b638f7bdfe9499e99321806b8.zip
SONAR-20541 Update all links that point to www.sonarqube.org to point to www.sonarsource.com/products/sonarqube/
Diffstat (limited to 'server/sonar-ce-task-projectanalysis')
-rw-r--r--server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/PersistProjectLinksStepIT.java22
-rw-r--r--server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/language/HandleUnanalyzedLanguagesStep.java2
-rw-r--r--server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/language/HandleUnanalyzedLanguagesStepTest.java6
3 files changed, 15 insertions, 15 deletions
diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/PersistProjectLinksStepIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/PersistProjectLinksStepIT.java
index 2b30ff4359a..465e0af6d6d 100644
--- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/PersistProjectLinksStepIT.java
+++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/PersistProjectLinksStepIT.java
@@ -104,7 +104,7 @@ public class PersistProjectLinksStepIT extends BaseStepTest {
.setRef(1)
.setType(ComponentType.PROJECT)
.addChildRef(2)
- .addLink(ScannerReport.ComponentLink.newBuilder().setType(HOME).setHref("http://www.sonarqube.org").build())
+ .addLink(ScannerReport.ComponentLink.newBuilder().setType(HOME).setHref("https://www.sonarsource.com/products/sonarqube").build())
.addLink(ScannerReport.ComponentLink.newBuilder().setType(SCM).setHref("https://github.com/SonarSource/sonar").build())
.addLink(ScannerReport.ComponentLink.newBuilder().setType(ISSUE).setHref("http://jira.sonarsource.com/").build())
.addLink(ScannerReport.ComponentLink.newBuilder().setType(CI).setHref("http://bamboo.ci.codehaus.org/browse/SONAR").build())
@@ -115,7 +115,7 @@ public class PersistProjectLinksStepIT extends BaseStepTest {
assertThat(db.getDbClient().projectLinkDao().selectByProjectUuid(db.getSession(), project.projectUuid()))
.extracting(ProjectLinkDto::getType, ProjectLinkDto::getHref, ProjectLinkDto::getName)
.containsExactlyInAnyOrder(
- tuple("homepage", "http://www.sonarqube.org", null),
+ tuple("homepage", "https://www.sonarsource.com/products/sonarqube", null),
tuple("scm", "https://github.com/SonarSource/sonar", null),
tuple("issue", "http://jira.sonarsource.com/", null),
tuple("ci", "http://bamboo.ci.codehaus.org/browse/SONAR", null));
@@ -124,21 +124,21 @@ public class PersistProjectLinksStepIT extends BaseStepTest {
@Test
public void nothing_to_do_when_link_already_exists() {
mockBranch(true);
- db.projectLinks().insertProvidedLink(project.getProjectDto(), l -> l.setType("homepage").setName("Home").setHref("http://www.sonarqube.org"));
+ db.projectLinks().insertProvidedLink(project.getProjectDto(), l -> l.setType("homepage").setName("Home").setHref("https://www.sonarsource.com/products/sonarqube"));
treeRootHolder.setRoot(ReportComponent.builder(Component.Type.PROJECT, 1).setUuid(project.getMainBranchComponent().uuid()).build());
reportReader.putComponent(ScannerReport.Component.newBuilder()
.setRef(1)
.setType(ComponentType.PROJECT)
- .addLink(ScannerReport.ComponentLink.newBuilder().setType(HOME).setHref("http://www.sonarqube.org").build())
+ .addLink(ScannerReport.ComponentLink.newBuilder().setType(HOME).setHref("https://www.sonarsource.com/products/sonarqube").build())
.build());
underTest.execute(new TestComputationStepContext());
assertThat(db.getDbClient().projectLinkDao().selectByProjectUuid(db.getSession(), project.projectUuid()))
.extracting(ProjectLinkDto::getType, ProjectLinkDto::getHref)
- .containsExactlyInAnyOrder(tuple("homepage", "http://www.sonarqube.org"));
+ .containsExactlyInAnyOrder(tuple("homepage", "https://www.sonarsource.com/products/sonarqube"));
}
@Test
@@ -153,7 +153,7 @@ public class PersistProjectLinksStepIT extends BaseStepTest {
reportReader.putComponent(ScannerReport.Component.newBuilder()
.setRef(2)
.setType(ComponentType.MODULE)
- .addLink(ScannerReport.ComponentLink.newBuilder().setType(HOME).setHref("http://www.sonarqube.org").build())
+ .addLink(ScannerReport.ComponentLink.newBuilder().setType(HOME).setHref("https://www.sonarsource.com/products/sonarqube").build())
.build());
underTest.execute(new TestComputationStepContext());
@@ -176,7 +176,7 @@ public class PersistProjectLinksStepIT extends BaseStepTest {
reportReader.putComponent(ScannerReport.Component.newBuilder()
.setRef(2)
.setType(ComponentType.FILE)
- .addLink(ScannerReport.ComponentLink.newBuilder().setType(HOME).setHref("http://www.sonarqube.org").build())
+ .addLink(ScannerReport.ComponentLink.newBuilder().setType(HOME).setHref("https://www.sonarsource.com/products/sonarqube").build())
.build());
underTest.execute(new TestComputationStepContext());
@@ -193,14 +193,14 @@ public class PersistProjectLinksStepIT extends BaseStepTest {
reportReader.putComponent(ScannerReport.Component.newBuilder()
.setRef(1)
.setType(ComponentType.PROJECT)
- .addLink(ScannerReport.ComponentLink.newBuilder().setType(HOME).setHref("http://www.sonarqube.org").build())
+ .addLink(ScannerReport.ComponentLink.newBuilder().setType(HOME).setHref("https://www.sonarsource.com/products/sonarqube").build())
.build());
underTest.execute(new TestComputationStepContext());
assertThat(db.getDbClient().projectLinkDao().selectByProjectUuid(db.getSession(), project.getProjectDto().getUuid()))
.extracting(ProjectLinkDto::getType, ProjectLinkDto::getHref)
- .containsExactlyInAnyOrder(tuple("homepage", "http://www.sonarqube.org"));
+ .containsExactlyInAnyOrder(tuple("homepage", "https://www.sonarsource.com/products/sonarqube"));
}
@Test
@@ -245,8 +245,8 @@ public class PersistProjectLinksStepIT extends BaseStepTest {
reportReader.putComponent(ScannerReport.Component.newBuilder()
.setRef(1)
.setType(ComponentType.PROJECT)
- .addLink(ScannerReport.ComponentLink.newBuilder().setType(HOME).setHref("http://www.sonarqube.org").build())
- .addLink(ScannerReport.ComponentLink.newBuilder().setType(HOME).setHref("http://www.sonarqube.org").build())
+ .addLink(ScannerReport.ComponentLink.newBuilder().setType(HOME).setHref("https://www.sonarsource.com/products/sonarqube").build())
+ .addLink(ScannerReport.ComponentLink.newBuilder().setType(HOME).setHref("https://www.sonarsource.com/products/sonarqube").build())
.build());
assertThatThrownBy(() -> underTest.execute(new TestComputationStepContext()))
diff --git a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/language/HandleUnanalyzedLanguagesStep.java b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/language/HandleUnanalyzedLanguagesStep.java
index 10959fb405e..1d4ed76db54 100644
--- a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/language/HandleUnanalyzedLanguagesStep.java
+++ b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/language/HandleUnanalyzedLanguagesStep.java
@@ -52,7 +52,7 @@ public class HandleUnanalyzedLanguagesStep implements ComputationStep {
static final String DESCRIPTION = "Check upgrade possibility for not analyzed code files.";
private static final String LANGUAGE_UPGRADE_MESSAGE = "%s detected in this project during the last analysis. %s cannot be analyzed with your" +
- " current SonarQube edition. Please consider <a target=\"_blank\" href=\"https://www.sonarqube.org/trial-request/developer-edition/?referrer=sonarqube-cpp\">upgrading to" +
+ " current SonarQube edition. Please consider <a target=\"_blank\" href=\"https://www.sonarsource.com/plans-and-pricing/developer/?referrer=sonarqube-cpp\">upgrading to" +
" Developer Edition</a> to find Bugs, Code Smells, Vulnerabilities and Security Hotspots in %s.";
private final BatchReportReader reportReader;
diff --git a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/language/HandleUnanalyzedLanguagesStepTest.java b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/language/HandleUnanalyzedLanguagesStepTest.java
index 1df4d69e30b..d21d658e484 100644
--- a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/language/HandleUnanalyzedLanguagesStepTest.java
+++ b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/language/HandleUnanalyzedLanguagesStepTest.java
@@ -110,7 +110,7 @@ public class HandleUnanalyzedLanguagesStepTest {
.containsExactly(tuple(
"10 unanalyzed C, 20 unanalyzed C++ and 1000 unanalyzed SomeLang files were detected in this project during the last analysis. C," +
" C++ and SomeLang cannot be analyzed with your current SonarQube edition. Please consider" +
- " <a target=\"_blank\" href=\"https://www.sonarqube.org/trial-request/developer-edition/?referrer=sonarqube-cpp\">upgrading to Developer Edition</a> to find Bugs," +
+ " <a target=\"_blank\" href=\"https://www.sonarsource.com/plans-and-pricing/developer/?referrer=sonarqube-cpp\">upgrading to Developer Edition</a> to find Bugs," +
" Code Smells, Vulnerabilities and Security Hotspots in these files.",
MessageType.SUGGEST_DEVELOPER_EDITION_UPGRADE));
assertThat(measureRepository.getAddedRawMeasure(PROJECT_REF, UNANALYZED_C_KEY).get().getIntValue()).isEqualTo(10);
@@ -130,7 +130,7 @@ public class HandleUnanalyzedLanguagesStepTest {
List<CeTaskMessages.Message> messages = argumentCaptor.getAllValues();
assertThat(messages).extracting(CeTaskMessages.Message::getText).containsExactly(
"10 unanalyzed C files were detected in this project during the last analysis. C cannot be analyzed with your current SonarQube edition. Please" +
- " consider <a target=\"_blank\" href=\"https://www.sonarqube.org/trial-request/developer-edition/?referrer=sonarqube-cpp\">upgrading to Developer" +
+ " consider <a target=\"_blank\" href=\"https://www.sonarsource.com/plans-and-pricing/developer/?referrer=sonarqube-cpp\">upgrading to Developer" +
" Edition</a> to find Bugs, Code Smells, Vulnerabilities and Security Hotspots in this file.");
assertThat(measureRepository.getAddedRawMeasure(PROJECT_REF, UNANALYZED_C_KEY).get().getIntValue()).isEqualTo(10);
assertThat(measureRepository.getAddedRawMeasure(PROJECT_REF, UNANALYZED_CPP_KEY)).isEmpty();
@@ -149,7 +149,7 @@ public class HandleUnanalyzedLanguagesStepTest {
List<CeTaskMessages.Message> messages = argumentCaptor.getAllValues();
assertThat(messages).extracting(CeTaskMessages.Message::getText).containsExactly(
"1 unanalyzed C++ file was detected in this project during the last analysis. C++ cannot be analyzed with your current SonarQube edition. Please" +
- " consider <a target=\"_blank\" href=\"https://www.sonarqube.org/trial-request/developer-edition/?referrer=sonarqube-cpp\">upgrading to Developer" +
+ " consider <a target=\"_blank\" href=\"https://www.sonarsource.com/plans-and-pricing/developer/?referrer=sonarqube-cpp\">upgrading to Developer" +
" Edition</a> to find Bugs, Code Smells, Vulnerabilities and Security Hotspots in this file.");
assertThat(measureRepository.getAddedRawMeasure(PROJECT_REF, UNANALYZED_CPP_KEY).get().getIntValue()).isOne();
assertThat(measureRepository.getAddedRawMeasure(PROJECT_REF, UNANALYZED_C_KEY)).isEmpty();