diff options
author | Julien HENRY <julien.henry@sonarsource.com> | 2017-07-28 12:36:45 +0200 |
---|---|---|
committer | Julien HENRY <julien.henry@sonarsource.com> | 2017-07-31 08:55:41 +0200 |
commit | b0583c0fbddafdd013bd9289d0385beb1c299a17 (patch) | |
tree | 987ff3a01e709ccdd634618b1f33d7df80485333 /it | |
parent | 265b9abd6d508d5ae83495958c27363fdd7d6740 (diff) | |
download | sonar-scanner-cli-b0583c0fbddafdd013bd9289d0385beb1c299a17.tar.gz sonar-scanner-cli-b0583c0fbddafdd013bd9289d0385beb1c299a17.zip |
SQSCANNER-43 Remove deprecated sonar-runner bat/sh scripts
Diffstat (limited to 'it')
-rw-r--r-- | it/src/test/java/com/sonarsource/scanner/it/DistributionTest.java (renamed from it/src/test/java/com/sonar/runner/it/DistributionTest.java) | 2 | ||||
-rw-r--r-- | it/src/test/java/com/sonarsource/scanner/it/JavaTest.java (renamed from it/src/test/java/com/sonar/runner/it/JavaTest.java) | 25 | ||||
-rw-r--r-- | it/src/test/java/com/sonarsource/scanner/it/MultimoduleTest.java (renamed from it/src/test/java/com/sonar/runner/it/MultimoduleTest.java) | 2 | ||||
-rw-r--r-- | it/src/test/java/com/sonarsource/scanner/it/ScannerTestCase.java (renamed from it/src/test/java/com/sonar/runner/it/ScannerTestCase.java) | 2 | ||||
-rw-r--r-- | it/src/test/java/com/sonarsource/scanner/it/SonarScannerTestSuite.java (renamed from it/src/test/java/com/sonar/runner/it/SonarScannerTestSuite.java) | 2 |
5 files changed, 6 insertions, 27 deletions
diff --git a/it/src/test/java/com/sonar/runner/it/DistributionTest.java b/it/src/test/java/com/sonarsource/scanner/it/DistributionTest.java index 6bd2651..310ffba 100644 --- a/it/src/test/java/com/sonar/runner/it/DistributionTest.java +++ b/it/src/test/java/com/sonarsource/scanner/it/DistributionTest.java @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.sonar.runner.it; +package com.sonarsource.scanner.it; import com.sonar.orchestrator.build.BuildFailureException; import com.sonar.orchestrator.build.SonarScanner; diff --git a/it/src/test/java/com/sonar/runner/it/JavaTest.java b/it/src/test/java/com/sonarsource/scanner/it/JavaTest.java index 7337757..1f53a88 100644 --- a/it/src/test/java/com/sonar/runner/it/JavaTest.java +++ b/it/src/test/java/com/sonarsource/scanner/it/JavaTest.java @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.sonar.runner.it; +package com.sonarsource.scanner.it; import com.sonar.orchestrator.build.BuildResult; import com.sonar.orchestrator.build.SonarScanner; @@ -27,7 +27,6 @@ import java.io.IOException; import java.util.List; import java.util.Map; import java.util.stream.Collectors; -import org.apache.commons.lang.SystemUtils; import org.junit.After; import org.junit.Rule; import org.junit.Test; @@ -285,32 +284,12 @@ public class JavaTest extends ScannerTestCase { } @Test - public void use_old_script_and_old_env_variable() { - SonarScanner build = newScanner(new File("projects/java-sample")) - .setUseOldSonarRunnerScript(true) - .setEnvironmentVariable("SONAR_RUNNER_OPTS", "-Xmx2m"); - BuildResult executeBuild = orchestrator.executeBuildQuietly(build); - assertThat(executeBuild.getStatus()).isNotEqualTo(0); - String logs = executeBuild.getLogs(); - if (SystemUtils.IS_OS_WINDOWS) { - assertThat(logs).contains("WARN: sonar-runner.bat script is deprecated. Please use sonar-scanner.bat instead."); - assertThat(logs).contains("WARN: SONAR_RUNNER_OPTS is deprecated. Please use SONAR_SCANNER_OPTS instead."); - } else { - assertThat(logs).contains("WARN: sonar-runner script is deprecated. Please use sonar-scanner instead."); - assertThat(logs).contains("WARN: $SONAR_RUNNER_OPTS is deprecated. Please use $SONAR_SCANNER_OPTS instead."); - } - assertThat(logs).contains("java.lang.OutOfMemoryError"); - } - - @Test - public void use_new_script_and_new_env_variable() { + public void verify_env_variable() { SonarScanner build = newScanner(new File("projects/java-sample")) .setEnvironmentVariable("SONAR_SCANNER_OPTS", "-Xmx2m"); BuildResult executeBuild = orchestrator.executeBuildQuietly(build); assertThat(executeBuild.getStatus()).isNotEqualTo(0); String logs = executeBuild.getLogs(); - assertThat(logs).doesNotContain("sonar-runner"); - assertThat(logs).doesNotContain("SONAR_RUNNER_OPTS"); assertThat(logs).contains("java.lang.OutOfMemoryError"); } diff --git a/it/src/test/java/com/sonar/runner/it/MultimoduleTest.java b/it/src/test/java/com/sonarsource/scanner/it/MultimoduleTest.java index 9486dec..52931ee 100644 --- a/it/src/test/java/com/sonar/runner/it/MultimoduleTest.java +++ b/it/src/test/java/com/sonarsource/scanner/it/MultimoduleTest.java @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.sonar.runner.it; +package com.sonarsource.scanner.it; import com.sonar.orchestrator.build.BuildResult; import com.sonar.orchestrator.build.SonarScanner; diff --git a/it/src/test/java/com/sonar/runner/it/ScannerTestCase.java b/it/src/test/java/com/sonarsource/scanner/it/ScannerTestCase.java index 4f32725..be19ea9 100644 --- a/it/src/test/java/com/sonar/runner/it/ScannerTestCase.java +++ b/it/src/test/java/com/sonarsource/scanner/it/ScannerTestCase.java @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.sonar.runner.it; +package com.sonarsource.scanner.it; import com.sonar.orchestrator.Orchestrator; import com.sonar.orchestrator.build.SonarScanner; diff --git a/it/src/test/java/com/sonar/runner/it/SonarScannerTestSuite.java b/it/src/test/java/com/sonarsource/scanner/it/SonarScannerTestSuite.java index f36120b..6b157b2 100644 --- a/it/src/test/java/com/sonar/runner/it/SonarScannerTestSuite.java +++ b/it/src/test/java/com/sonarsource/scanner/it/SonarScannerTestSuite.java @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.sonar.runner.it; +package com.sonarsource.scanner.it; import com.sonar.orchestrator.Orchestrator; import org.junit.ClassRule; |