]> source.dussan.org Git - sonar-scanner-cli.git/commitdiff
Update travis utils version for appveyor (#75)
authorJacek <52388493+jacek-poreda-sonarsource@users.noreply.github.com>
Mon, 30 Sep 2019 13:43:00 +0000 (15:43 +0200)
committerGitHub <noreply@github.com>
Mon, 30 Sep 2019 13:43:00 +0000 (15:43 +0200)
appveyor.ps1
src/test/java/org/sonarsource/scanner/cli/ConfTest.java

index b3ecc5561cc685c04379d38461512ab300d5e3c2..a8a81f11c20c7ec00a5d39933735d323ab653e47 100644 (file)
@@ -32,7 +32,7 @@ function FetchAndUnzip
 
 function InstallAppveyorTools
 {
-        $travisUtilsVersion = "33"
+        $travisUtilsVersion = "57"
         $localPath = "$env:USERPROFILE\.local"
         $travisUtilsPath = "$localPath\travis-utils-$travisUtilsVersion"
         if (Test-Path $travisUtilsPath)
index 1dbbbec4669735f60be5cd2996efe39046869a12..a5c8b5f68f14c6f432d125b4ffc6668a0705aef7 100644 (file)
@@ -33,6 +33,7 @@ import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.ExpectedException;
 import org.junit.rules.TemporaryFolder;
+import org.sonarsource.scanner.api.internal.shaded.minimaljson.Json;
 
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.junit.Assume.assumeTrue;
@@ -326,7 +327,11 @@ public class ConfTest {
     Properties properties = conf.properties();
     assertThat(properties.get("sonar.prop")).isEqualTo("default");
 
-    env.put("SONARQUBE_SCANNER_PARAMS", "{\"project.settings\" : \"" + home.resolve("conf/sq-project.properties").toAbsolutePath().toString() + "\"}");
+    String jsonString = Json.object()
+      .add("project.settings", home.resolve("conf/sq-project.properties").toAbsolutePath().toString())
+      .toString();
+
+    env.put("SONARQUBE_SCANNER_PARAMS", jsonString);
 
     properties = conf.properties();
     assertThat(properties.get("sonar.prop")).isEqualTo("expected");