diff options
Diffstat (limited to 'it/it-tests/src/test/java/batch/suite/ProjectBuilderTest.java')
-rw-r--r-- | it/it-tests/src/test/java/batch/suite/ProjectBuilderTest.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/it/it-tests/src/test/java/batch/suite/ProjectBuilderTest.java b/it/it-tests/src/test/java/batch/suite/ProjectBuilderTest.java index d0e9bad2dc9..f76e61414e3 100644 --- a/it/it-tests/src/test/java/batch/suite/ProjectBuilderTest.java +++ b/it/it-tests/src/test/java/batch/suite/ProjectBuilderTest.java @@ -7,6 +7,9 @@ package batch.suite; import static org.assertj.core.api.Assertions.assertThat; +import com.sonar.orchestrator.build.BuildFailureException; + +import com.sonar.orchestrator.build.SonarRunner; import util.ItUtils; import com.sonar.orchestrator.Orchestrator; import com.sonar.orchestrator.build.MavenBuild; @@ -44,6 +47,18 @@ public class ProjectBuilderTest { assertThat(getResource("com.sonarsource.it.projects.batch:project-builder-module-b:src/IgnoredFile.java")).isNull(); } + @Test + // SONAR-6665 + public void errorSubModuleSameName() { + SonarRunner build = SonarRunner.create(ItUtils.projectDir("batch/multi-module-repeated-names")); + + try { + orchestrator.executeBuild(build); + } catch (BuildFailureException e) { + assertThat(e.getResult().getLogs()).contains("Two modules have the same name: module1"); + } + } + private void checkProject() { Resource project = getResource("com.sonarsource.it.projects.batch:project-builder"); |