diff options
author | Duarte Meneses <duarte.meneses@sonarsource.com> | 2015-08-19 10:49:32 +0200 |
---|---|---|
committer | Duarte Meneses <duarte.meneses@sonarsource.com> | 2015-08-19 10:50:06 +0200 |
commit | 61c699b1e625b31a202ed03244d72f7c022379ff (patch) | |
tree | 38ea5fc0459d7fdbefcdc3ccb3c8704c5b1a7c59 /it | |
parent | 3b426b3e5b46907c8c986c381820dd9a649cbb39 (diff) | |
download | sonarqube-61c699b1e625b31a202ed03244d72f7c022379ff.tar.gz sonarqube-61c699b1e625b31a202ed03244d72f7c022379ff.zip |
Improve tests
Diffstat (limited to 'it')
-rw-r--r-- | it/it-tests/src/test/java/batch/IssuesModeTest.java | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/it/it-tests/src/test/java/batch/IssuesModeTest.java b/it/it-tests/src/test/java/batch/IssuesModeTest.java index bfd5e33d7ff..0e8ce198440 100644 --- a/it/it-tests/src/test/java/batch/IssuesModeTest.java +++ b/it/it-tests/src/test/java/batch/IssuesModeTest.java @@ -5,6 +5,8 @@ */ package batch; +import com.sonar.orchestrator.build.BuildFailureException; + import util.ItUtils; import com.google.common.collect.Maps; import com.sonar.orchestrator.Orchestrator; @@ -26,7 +28,6 @@ import java.util.concurrent.Executors; import java.util.concurrent.Future; import static org.junit.Assert.*; - import static org.assertj.core.api.Assertions.assertThat; import org.apache.commons.lang.ObjectUtils; import org.json.simple.JSONArray; @@ -73,6 +74,20 @@ public class IssuesModeTest { SonarRunner runner = configureRunnerIssues("shared/xoo-sample"); orchestrator.executeBuild(runner); } + + @Test + public void invalidIncrementalMode() throws IOException { + restoreProfile("one-issue-per-line.xml"); + orchestrator.getServer().provisionProject("sample", "xoo-sample"); + orchestrator.getServer().associateProjectToQualityProfile("sample", "xoo", "one-issue-per-line"); + SonarRunner runner = configureRunner("shared/xoo-sample"); + runner.setProperty("sonar.analysis.mode", "incremental"); + + thrown.expect(BuildFailureException.class); + BuildResult res = orchestrator.executeBuild(runner); + + assertThat(res.getLogs()).contains("Invalid analysis mode: incremental. This mode was removed in SonarQube 5.2"); + } // SONAR-5715 @Test |