aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-scanner-engine/src/test/java/org/sonar/scanner/report
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2017-07-27 09:12:49 +0200
committerJanos Gyerik <janos.gyerik@sonarsource.com>2017-09-12 10:52:52 +0200
commit7515f738fb15473d144dd376fac2a1562486c049 (patch)
treecb3730c3af767dcdeb8894499d1f035b3b1ff70a /sonar-scanner-engine/src/test/java/org/sonar/scanner/report
parentc8a8f3eee907bf053af6dc6c9decde7de73249b3 (diff)
downloadsonarqube-7515f738fb15473d144dd376fac2a1562486c049.tar.gz
sonarqube-7515f738fb15473d144dd376fac2a1562486c049.zip
SONAR-9616 compute engine backend to support branches
Diffstat (limited to 'sonar-scanner-engine/src/test/java/org/sonar/scanner/report')
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/report/MetadataPublisherTest.java5
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/report/ReportPublisherTest.java8
2 files changed, 7 insertions, 6 deletions
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/report/MetadataPublisherTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/report/MetadataPublisherTest.java
index a949364d429..3a4051ece54 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/report/MetadataPublisherTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/report/MetadataPublisherTest.java
@@ -34,6 +34,7 @@ import org.sonar.api.batch.fs.internal.DefaultInputModule;
import org.sonar.api.batch.fs.internal.InputModuleHierarchy;
import org.sonar.api.batch.fs.internal.TestInputFileBuilder;
import org.sonar.api.config.internal.MapSettings;
+import org.sonar.core.config.ScannerProperties;
import org.sonar.scanner.ProjectAnalysisInfo;
import org.sonar.scanner.bootstrap.ScannerPlugin;
import org.sonar.scanner.bootstrap.ScannerPluginRepository;
@@ -141,13 +142,13 @@ public class MetadataPublisherTest {
ScannerReport.Metadata metadata = reader.readMetadata();
assertThat(metadata.getAnalysisDate()).isEqualTo(1234567L);
assertThat(metadata.getProjectKey()).isEqualTo("foo");
- assertThat(metadata.getBranch()).isEqualTo("myBranch");
+ assertThat(metadata.getDeprecatedBranch()).isEqualTo("myBranch");
assertThat(metadata.getCrossProjectDuplicationActivated()).isFalse();
}
@Test
public void write_project_organization() throws Exception {
- settings.setProperty(CoreProperties.PROJECT_ORGANIZATION_PROPERTY, "SonarSource");
+ settings.setProperty(ScannerProperties.ORGANIZATION, "SonarSource");
File outputDir = temp.newFolder();
ScannerReportWriter writer = new ScannerReportWriter(outputDir);
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/report/ReportPublisherTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/report/ReportPublisherTest.java
index ae65b6d01b7..9138d06f8c4 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/report/ReportPublisherTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/report/ReportPublisherTest.java
@@ -32,7 +32,6 @@ import org.junit.rules.ExpectedException;
import org.junit.rules.TemporaryFolder;
import org.mockito.ArgumentCaptor;
import org.mockito.Mockito;
-import org.sonar.api.CoreProperties;
import org.sonar.api.batch.bootstrap.ProjectDefinition;
import org.sonar.api.batch.fs.internal.DefaultInputModule;
import org.sonar.api.batch.fs.internal.InputModuleHierarchy;
@@ -44,6 +43,7 @@ import org.sonar.api.utils.TempFolder;
import org.sonar.api.utils.log.LogTester;
import org.sonar.api.utils.log.LoggerLevel;
import org.sonar.core.config.CorePropertyDefinitions;
+import org.sonar.core.config.ScannerProperties;
import org.sonar.scanner.analysis.DefaultAnalysisMode;
import org.sonar.scanner.bootstrap.ScannerWsClient;
import org.sonarqube.ws.WsCe;
@@ -91,7 +91,7 @@ public class ReportPublisherTest {
public void log_and_dump_information_about_report_uploading() throws IOException {
ReportPublisher underTest = new ReportPublisher(settings.asConfig(), wsClient, server, contextPublisher, moduleHierarchy, mode, mock(TempFolder.class),
new ReportPublisherStep[0]);
- settings.setProperty(CoreProperties.PROJECT_ORGANIZATION_PROPERTY, "MyOrg");
+ settings.setProperty(ScannerProperties.ORGANIZATION, "MyOrg");
underTest.logSuccess("TASK-123");
@@ -202,7 +202,7 @@ public class ReportPublisherTest {
ReportPublisher underTest = new ReportPublisher(settings.asConfig(), wsClient, server, contextPublisher, moduleHierarchy, mode, mock(TempFolder.class),
new ReportPublisherStep[0]);
- settings.setProperty(CoreProperties.PROJECT_ORGANIZATION_PROPERTY, "MyOrg");
+ settings.setProperty(ScannerProperties.ORGANIZATION, "MyOrg");
WsResponse response = mock(WsResponse.class);
@@ -232,7 +232,7 @@ public class ReportPublisherTest {
new ReportPublisherStep[0]);
when(mode.isIncremental()).thenReturn(true);
- settings.setProperty(CoreProperties.PROJECT_ORGANIZATION_PROPERTY, "MyOrg");
+ settings.setProperty(ScannerProperties.ORGANIZATION, "MyOrg");
WsResponse response = mock(WsResponse.class);