Browse Source

Update travis utils version for appveyor (#75)

tags/4.2.0.1873
Jacek 4 years ago
parent
commit
70da1689e8
No account linked to committer's email address
2 changed files with 7 additions and 2 deletions
  1. 1
    1
      appveyor.ps1
  2. 6
    1
      src/test/java/org/sonarsource/scanner/cli/ConfTest.java

+ 1
- 1
appveyor.ps1 View File



function InstallAppveyorTools function InstallAppveyorTools
{ {
$travisUtilsVersion = "33"
$travisUtilsVersion = "57"
$localPath = "$env:USERPROFILE\.local" $localPath = "$env:USERPROFILE\.local"
$travisUtilsPath = "$localPath\travis-utils-$travisUtilsVersion" $travisUtilsPath = "$localPath\travis-utils-$travisUtilsVersion"
if (Test-Path $travisUtilsPath) if (Test-Path $travisUtilsPath)

+ 6
- 1
src/test/java/org/sonarsource/scanner/cli/ConfTest.java View File

import org.junit.Test; import org.junit.Test;
import org.junit.rules.ExpectedException; import org.junit.rules.ExpectedException;
import org.junit.rules.TemporaryFolder; 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.assertj.core.api.Assertions.assertThat;
import static org.junit.Assume.assumeTrue; import static org.junit.Assume.assumeTrue;
Properties properties = conf.properties(); Properties properties = conf.properties();
assertThat(properties.get("sonar.prop")).isEqualTo("default"); 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(); properties = conf.properties();
assertThat(properties.get("sonar.prop")).isEqualTo("expected"); assertThat(properties.get("sonar.prop")).isEqualTo("expected");

Loading…
Cancel
Save