diff options
author | Duarte Meneses <duarte.meneses@sonarsource.com> | 2016-08-03 13:53:23 +0200 |
---|---|---|
committer | Duarte Meneses <duarte.meneses@sonarsource.com> | 2016-08-03 13:53:23 +0200 |
commit | d1537d139b0034ac151969f221c98b2e57701e95 (patch) | |
tree | 72a1f611edc6cb9b40f1d237edc9820ae11479e0 /it/src/test/java/com | |
parent | cc72c54ef3fd4b63751e65862fad250795accc04 (diff) | |
download | sonar-scanner-cli-d1537d139b0034ac151969f221c98b2e57701e95.tar.gz sonar-scanner-cli-d1537d139b0034ac151969f221c98b2e57701e95.zip |
SQSCANNER-26 Support SONARQUBE_SCANNER_PARAMS and sonar.scanner.skip
Diffstat (limited to 'it/src/test/java/com')
-rw-r--r-- | it/src/test/java/com/sonar/runner/it/JavaTest.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/it/src/test/java/com/sonar/runner/it/JavaTest.java b/it/src/test/java/com/sonar/runner/it/JavaTest.java index 7209ea9..c93e3cc 100644 --- a/it/src/test/java/com/sonar/runner/it/JavaTest.java +++ b/it/src/test/java/com/sonar/runner/it/JavaTest.java @@ -212,6 +212,20 @@ public class JavaTest extends ScannerTestCase { } @Test + public void should_use_environment_props() { + SonarScanner build = newScanner(new File("projects/java-sample-no-properties")) + .setEnvironmentVariable("SONARQUBE_SCANNER_PARAMS", "{" + + "\"sonar.projectKey\" : \"java:sample\"," + + "\"sonar.projectName\" : \"Java Sample, with comma\"," + + "\"sonar.projectDescription\" : \"This is a Java sample\"," + + "\"sonar.projectVersion\" : \"1.2.3\"," + + "\"sonar.sources\" : \"src\" }"); + String logs = orchestrator.executeBuild(build).getLogs(); + System.out.println(logs); + + } + + @Test public void should_fail_if_unable_to_connect() { SonarScanner build = newScanner(new File("projects/java-sample")) .setProperty("sonar.host.url", "http://foo"); |