diff options
author | Julien HENRY <julien.henry@sonarsource.com> | 2024-04-11 16:40:43 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2024-04-15 20:02:44 +0000 |
commit | 60fee355ef174e184b5c3a477a3c81e95302c754 (patch) | |
tree | 8121df42008f1b20468f45fcae8a2508708b3e69 /sonar-scanner-engine/src/test | |
parent | 6d0efcc7475fbf341c25f0ad747bb1edd3addb84 (diff) | |
download | sonarqube-60fee355ef174e184b5c3a477a3c81e95302c754.tar.gz sonarqube-60fee355ef174e184b5c3a477a3c81e95302c754.zip |
SONAR-22054 Make property sonar.projectBaseDir optional
Diffstat (limited to 'sonar-scanner-engine/src/test')
-rw-r--r-- | sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/ProjectReactorBuilderTest.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/ProjectReactorBuilderTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/ProjectReactorBuilderTest.java index 7ed5fc9e084..4092d2f7e0f 100644 --- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/ProjectReactorBuilderTest.java +++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/ProjectReactorBuilderTest.java @@ -51,6 +51,14 @@ public class ProjectReactorBuilderTest { public LogTester logTester = new LogTester(); @Test + public void projectBaseDirDefaultToCurrentDirectory() { + ScannerProperties bootstrapProps = new ScannerProperties(Map.of("sonar.projectKey", "foo")); + ProjectReactor projectReactor = new ProjectReactorBuilder(bootstrapProps, mock(AnalysisWarnings.class)).execute(); + var def = projectReactor.getRoot(); + assertThat(def.getBaseDir()).isEqualTo(new File("").getAbsoluteFile()); + } + + @Test public void shouldDefineSimpleProject() { ProjectDefinition projectDefinition = loadProjectDefinition("simple-project"); |