diff options
Diffstat (limited to 'sonar-scanner-engine/src/test')
-rw-r--r-- | sonar-scanner-engine/src/test/java/org/sonar/scanner/mediumtest/fs/FileSystemMediumTest.java | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/mediumtest/fs/FileSystemMediumTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/mediumtest/fs/FileSystemMediumTest.java index 0ace33edc7a..0de22581f63 100644 --- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/mediumtest/fs/FileSystemMediumTest.java +++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/mediumtest/fs/FileSystemMediumTest.java @@ -151,7 +151,7 @@ public class FileSystemMediumTest { builder = createBuilder(); builder.put("sonar.branch", "my-branch"); File srcDir = new File(baseDir, "src"); - srcDir.mkdir(); + assertThat(srcDir.mkdir()).isTrue(); File xooFile = new File(srcDir, "sample.xoo"); FileUtils.write(xooFile, "Sample xoo\ncontent"); @@ -163,7 +163,25 @@ public class FileSystemMediumTest { .execute(); assertThat(logs.getAllAsString()).contains("Project key: com.foo.project"); - assertThat(logs.getAllAsString()).contains("Branch key (deprecated): my-branch"); + assertThat(logs.getAllAsString()).contains("Branch key: my-branch"); + assertThat(logs.getAllAsString()).contains("The use of \"sonar.branch\" is deprecated and replaced by \"sonar.branch.name\"."); + } + + @Test + public void logBranchNameAndType() throws IOException { + builder = createBuilder(); + builder.put("sonar.branch.name", "my-branch"); + File srcDir = new File(baseDir, "src"); + assertThat(srcDir.mkdir()).isTrue(); + + tester.newTask() + .properties(builder + .put("sonar.sources", "src") + .build()) + .execute(); + + assertThat(logs.getAllAsString()).contains("Project key: com.foo.project"); + assertThat(logs.getAllAsString()).contains("Branch name: my-branch, type: long living"); } @Test |