diff options
author | Duarte Meneses <duarte.meneses@sonarsource.com> | 2015-12-14 12:00:15 +0100 |
---|---|---|
committer | Duarte Meneses <duarte.meneses@sonarsource.com> | 2015-12-14 12:00:15 +0100 |
commit | f9bdedc60e18b651e9a78fb27e4f8d30e3a71da7 (patch) | |
tree | e1867b8cc6a2f87913dd8621d8cfe8dd93e0cec3 /sonar-batch | |
parent | 43adad0053aca847f656346d1bc85e89f15d6ec0 (diff) | |
download | sonarqube-f9bdedc60e18b651e9a78fb27e4f8d30e3a71da7.tar.gz sonarqube-f9bdedc60e18b651e9a78fb27e4f8d30e3a71da7.zip |
SONAR-6905 Batch should dump analysis-related URL into a properties file
Diffstat (limited to 'sonar-batch')
-rw-r--r-- | sonar-batch/src/main/java/org/sonar/batch/report/ReportPublisher.java | 2 | ||||
-rw-r--r-- | sonar-batch/src/test/java/org/sonar/batch/report/ReportPublisherTest.java | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/sonar-batch/src/main/java/org/sonar/batch/report/ReportPublisher.java b/sonar-batch/src/main/java/org/sonar/batch/report/ReportPublisher.java index 1d9c4a81145..9944b8b4acd 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/report/ReportPublisher.java +++ b/sonar-batch/src/main/java/org/sonar/batch/report/ReportPublisher.java @@ -224,6 +224,6 @@ public class ReportPublisher implements Startable { // If server base URL was not configured in Sonar server then is is better to take URL configured on batch side baseUrl = wsClient.baseUrl(); } - return baseUrl.replaceAll("(/)+$", "") + "/"; + return baseUrl.replaceAll("(/)+$", ""); } } diff --git a/sonar-batch/src/test/java/org/sonar/batch/report/ReportPublisherTest.java b/sonar-batch/src/test/java/org/sonar/batch/report/ReportPublisherTest.java index 04c1b4ff161..60d56c5db01 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/report/ReportPublisherTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/report/ReportPublisherTest.java @@ -81,7 +81,7 @@ public class ReportPublisherTest { File detailsFile = new File(temp.getRoot(), "report-task.txt"); assertThat(readFileToString(detailsFile)).isEqualTo( "projectKey=struts\n" + - "serverUrl=https://localhost/\n" + + "serverUrl=https://localhost\n" + "dashboardUrl=https://localhost/dashboard/index/struts\n" + "ceTaskId=TASK-123\n" + "ceTaskUrl=https://localhost/api/ce/task?id=TASK-123\n" @@ -102,7 +102,7 @@ public class ReportPublisherTest { File detailsFile = new File(temp.getRoot(), "report-task.txt"); assertThat(readFileToString(detailsFile)).isEqualTo( "projectKey=struts\n" + - "serverUrl=https://publicserver/sonarqube/\n" + + "serverUrl=https://publicserver/sonarqube\n" + "dashboardUrl=https://publicserver/sonarqube/dashboard/index/struts\n" + "ceTaskId=TASK-123\n" + "ceTaskUrl=https://publicserver/sonarqube/api/ce/task?id=TASK-123\n" |