diff options
author | Janos Gyerik <janos.gyerik@sonarsource.com> | 2017-09-04 15:54:52 +0200 |
---|---|---|
committer | Janos Gyerik <janos.gyerik@sonarsource.com> | 2017-09-12 11:34:58 +0200 |
commit | 43a521d0f1c5919ec6511cc369dd99d0830c86ab (patch) | |
tree | b2c842c7ccfbb1e3d2341ebb6ac3f34816dda3ae /sonar-scanner-engine/src/test | |
parent | c2954e35714c703c84b0e4c2af4e0249751516b6 (diff) | |
download | sonarqube-43a521d0f1c5919ec6511cc369dd99d0830c86ab.tar.gz sonarqube-43a521d0f1c5919ec6511cc369dd99d0830c86ab.zip |
SONAR-9626 update log messages (#2472)
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 |