diff options
author | Julien HENRY <julien.henry@sonarsource.com> | 2019-06-19 10:28:41 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2019-06-28 08:45:50 +0200 |
commit | 7cce640a1badb7b7658d9a8724bd3ed1fefd6263 (patch) | |
tree | 35c646fb46a21d543bdf936ac83cee0932d0d2fe /sonar-scanner-engine/src/test | |
parent | 17bc8dfa29da129ab4b160f287bdc22297e385cb (diff) | |
download | sonarqube-7cce640a1badb7b7658d9a8724bd3ed1fefd6263.tar.gz sonarqube-7cce640a1badb7b7658d9a8724bd3ed1fefd6263.zip |
Clean old remains of the preview mode
Diffstat (limited to 'sonar-scanner-engine/src/test')
2 files changed, 2 insertions, 24 deletions
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/report/AnalysisContextReportPublisherTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/report/AnalysisContextReportPublisherTest.java index b883a266c3a..22c8528301f 100644 --- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/report/AnalysisContextReportPublisherTest.java +++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/report/AnalysisContextReportPublisherTest.java @@ -23,9 +23,7 @@ import com.google.common.collect.ImmutableMap; import java.io.File; import java.nio.charset.StandardCharsets; import java.util.Arrays; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Properties; import org.apache.commons.io.FileUtils; import org.apache.commons.lang.StringUtils; @@ -33,7 +31,6 @@ import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.rules.TemporaryFolder; -import org.sonar.api.batch.AnalysisMode; import org.sonar.api.batch.bootstrap.ProjectDefinition; import org.sonar.api.batch.fs.internal.DefaultInputModule; import org.sonar.api.batch.fs.internal.InputModuleHierarchy; @@ -69,7 +66,6 @@ public class AnalysisContextReportPublisherTest { private ScannerPluginRepository pluginRepo = mock(ScannerPluginRepository.class); private AnalysisContextReportPublisher publisher; - private AnalysisMode analysisMode = mock(AnalysisMode.class); private System2 system2; private GlobalServerSettings globalServerSettings; private InputModuleHierarchy hierarchy; @@ -85,7 +81,7 @@ public class AnalysisContextReportPublisherTest { hierarchy = mock(InputModuleHierarchy.class); store = mock(InputComponentStore.class); projectServerSettings = mock(ProjectServerSettings.class); - publisher = new AnalysisContextReportPublisher(projectServerSettings, analysisMode, pluginRepo, system2, globalServerSettings, hierarchy, store); + publisher = new AnalysisContextReportPublisher(projectServerSettings, pluginRepo, system2, globalServerSettings, hierarchy, store); } @Test @@ -107,16 +103,6 @@ public class AnalysisContextReportPublisherTest { } @Test - public void shouldNotDumpInIssuesMode() throws Exception { - when(analysisMode.isIssues()).thenReturn(true); - - ScannerReportWriter writer = new ScannerReportWriter(temp.newFolder()); - publisher.init(writer); - - assertThat(writer.getFileStructure().analysisLog()).doesNotExist(); - } - - @Test public void dumpServerSideGlobalProps() throws Exception { logTester.setLevel(LoggerLevel.DEBUG); ScannerReportWriter writer = new ScannerReportWriter(temp.newFolder()); diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/ProjectReactorValidatorTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/ProjectReactorValidatorTest.java index 5f817757192..464ea32f912 100644 --- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/ProjectReactorValidatorTest.java +++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/ProjectReactorValidatorTest.java @@ -31,7 +31,6 @@ import org.junit.Test; import org.junit.rules.ExpectedException; import org.junit.runner.RunWith; import org.sonar.api.CoreProperties; -import org.sonar.api.batch.AnalysisMode; import org.sonar.api.batch.bootstrap.ProjectDefinition; import org.sonar.api.batch.bootstrap.ProjectReactor; import org.sonar.api.utils.MessageException; @@ -51,10 +50,9 @@ public class ProjectReactorValidatorTest { @Rule public ExpectedException thrown = ExpectedException.none(); - private AnalysisMode mode = mock(AnalysisMode.class); private GlobalConfiguration settings = mock(GlobalConfiguration.class); private ProjectInfo projectInfo = mock(ProjectInfo.class); - private ProjectReactorValidator underTest = new ProjectReactorValidator(mode, settings); + private ProjectReactorValidator underTest = new ProjectReactorValidator(settings); @Before public void prepare() { @@ -88,12 +86,6 @@ public class ProjectReactorValidatorTest { } @Test - public void allow_slash_issues_mode() { - when(mode.isIssues()).thenReturn(true); - underTest.validate(createProjectReactor("project/key")); - } - - @Test public void fail_with_invalid_key() { ProjectReactor reactor = createProjectReactor(" "); |