diff options
author | Mark Rekveld <mark.rekveld@sonarsource.com> | 2020-09-29 10:47:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-29 10:47:08 +0200 |
commit | c347e99a8b96cee0a14ed16e1cbd2e2fc65903b0 (patch) | |
tree | b1ba40a1b5d2be83f95f0aca125c53ed431403fa /it/src | |
parent | d9376179e8d3fe1534f0c0d3ef3f04db78d4d85e (diff) | |
download | sonar-scanner-cli-c347e99a8b96cee0a14ed16e1cbd2e2fc65903b0.tar.gz sonar-scanner-cli-c347e99a8b96cee0a14ed16e1cbd2e2fc65903b0.zip |
SQSCANNER-44 - Move to Xoo for testing (#92)
Diffstat (limited to 'it/src')
-rw-r--r-- | it/src/test/java/com/sonarsource/scanner/it/ScannerTest.java | 4 | ||||
-rw-r--r-- | it/src/test/java/com/sonarsource/scanner/it/SonarScannerTestSuite.java | 21 |
2 files changed, 6 insertions, 19 deletions
diff --git a/it/src/test/java/com/sonarsource/scanner/it/ScannerTest.java b/it/src/test/java/com/sonarsource/scanner/it/ScannerTest.java index abb7967..89e0d82 100644 --- a/it/src/test/java/com/sonarsource/scanner/it/ScannerTest.java +++ b/it/src/test/java/com/sonarsource/scanner/it/ScannerTest.java @@ -215,10 +215,10 @@ public class ScannerTest extends ScannerTestCase { assertThat(getComponent("sample").getDescription()) .isEqualTo("This is a sample"); Map<String, Measure> projectMeasures = getMeasures("sample", "files", - "ncloc", "classes", "violations"); + "ncloc", "violations"); assertThat(projectMeasures.values().stream() .filter(measure -> measure.getValue() != null) - .collect(Collectors.toList())).hasSize(4); + .collect(Collectors.toList())).hasSize(3); } @Test diff --git a/it/src/test/java/com/sonarsource/scanner/it/SonarScannerTestSuite.java b/it/src/test/java/com/sonarsource/scanner/it/SonarScannerTestSuite.java index 232f43c..2ff3538 100644 --- a/it/src/test/java/com/sonarsource/scanner/it/SonarScannerTestSuite.java +++ b/it/src/test/java/com/sonarsource/scanner/it/SonarScannerTestSuite.java @@ -20,7 +20,6 @@ package com.sonarsource.scanner.it; import com.sonar.orchestrator.Orchestrator; -import com.sonar.orchestrator.OrchestratorBuilder; import com.sonar.orchestrator.locator.MavenLocation; import org.junit.ClassRule; import org.junit.runner.RunWith; @@ -38,23 +37,11 @@ public class SonarScannerTestSuite { private static Orchestrator createOrchestrator() { String sonarVersion = System .getProperty("sonar.runtimeVersion", "LATEST_RELEASE[7.9]"); - OrchestratorBuilder builder = Orchestrator.builderEnv() + return Orchestrator.builderEnv() .setSonarVersion( - sonarVersion); - // The javascript language plugin needs to be installed to allow for - // tests to pass. If not installed test fail with a "no languages - // installed" error. - MavenLocation javascriptPlugin = MavenLocation - .of("org.sonarsource.javascript", "sonar-javascript-plugin", - "5.2.1.7778"); - // Since version 8.5 languages are bundled and located in a different - // location then other plugins. So install this in the correct location. - if (sonarVersion.startsWith("LATEST_RELEASE[7.9]")) { - builder.addPlugin(javascriptPlugin); - } else { - builder.addBundledPlugin(javascriptPlugin); - } - return builder.build(); + sonarVersion).addPlugin(MavenLocation + .of("org.sonarsource.sonarqube", "sonar-xoo-plugin", + sonarVersion)).build(); } } |