]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-6905 Batch should dump analysis-related URL into a properties file
authorDuarte Meneses <duarte.meneses@sonarsource.com>
Mon, 14 Dec 2015 11:00:15 +0000 (12:00 +0100)
committerDuarte Meneses <duarte.meneses@sonarsource.com>
Mon, 14 Dec 2015 11:00:15 +0000 (12:00 +0100)
sonar-batch/src/main/java/org/sonar/batch/report/ReportPublisher.java
sonar-batch/src/test/java/org/sonar/batch/report/ReportPublisherTest.java

index 1d9c4a811459381231acbabfd3bd126431f49620..9944b8b4acda5a7edc3d56a655d2c5853ee65bb4 100644 (file)
@@ -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("(/)+$", "");
   }
 }
index 04c1b4ff161339044f022ecea36d73e0b575d545..60d56c5db011e0d99f9dbd236238e5fb1783dc90 100644 (file)
@@ -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"