diff options
author | Matteo Mara <matteo.mara@sonarsource.com> | 2023-12-22 10:28:22 +0100 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2023-12-22 20:03:01 +0000 |
commit | 6c6de5ad4fac7a44abcc6a0ae7d9cb5c7a53da51 (patch) | |
tree | 43710bdc5975d01b9336c229d0aa68a0fa66f4e2 /sonar-scanner-engine/src/it | |
parent | 83fe248f66dcc3a909eb411f917795c054445723 (diff) | |
download | sonarqube-6c6de5ad4fac7a44abcc6a0ae7d9cb5c7a53da51.tar.gz sonarqube-6c6de5ad4fac7a44abcc6a0ae7d9cb5c7a53da51.zip |
Revert "SONAR-21195 Enhance scanner engine to download only required plugins"
This reverts commit 981e6b85954f413666e8608a4e2f46fa2e4089cc.
Diffstat (limited to 'sonar-scanner-engine/src/it')
3 files changed, 4 insertions, 16 deletions
diff --git a/sonar-scanner-engine/src/it/java/org/sonar/scanner/mediumtest/ScannerMediumTester.java b/sonar-scanner-engine/src/it/java/org/sonar/scanner/mediumtest/ScannerMediumTester.java index ebf0dc20efa..bf76e8117ba 100644 --- a/sonar-scanner-engine/src/it/java/org/sonar/scanner/mediumtest/ScannerMediumTester.java +++ b/sonar-scanner-engine/src/it/java/org/sonar/scanner/mediumtest/ScannerMediumTester.java @@ -105,7 +105,6 @@ public class ScannerMediumTester extends ExternalResource { private final FakeActiveRulesLoader activeRules = new FakeActiveRulesLoader(); private final FakeSonarRuntime sonarRuntime = new FakeSonarRuntime(); private final CeTaskReportDataHolder reportMetadataHolder = new CeTaskReportDataHolderExt(); - private final FakeLanguagesRepository languagesRepository = new FakeLanguagesRepository(); private LogOutput logOutput = null; private static void createWorkingDirs() throws IOException { @@ -283,14 +282,6 @@ public class ScannerMediumTester extends ExternalResource { return builder; } - public void addLanguage(String key, String name, String... suffixes) { - languagesRepository.addLanguage(key, name, suffixes, new String[0]); - } - - public void addLanguage(String key, String name, boolean publishAllFiles, String... suffixes) { - languagesRepository.addLanguage(key, name, suffixes, new String[0], publishAllFiles); - } - public static class AnalysisBuilder { private final Map<String, String> taskProperties = new HashMap<>(); private final ScannerMediumTester tester; @@ -322,8 +313,7 @@ public class ScannerMediumTester extends ExternalResource { tester.analysisCacheLoader, tester.sonarRuntime, tester.reportMetadataHolder, - result, - tester.languagesRepository); + result); if (tester.logOutput != null) { builder.setLogOutput(tester.logOutput); } else { diff --git a/sonar-scanner-engine/src/it/java/org/sonar/scanner/mediumtest/fs/FileSystemMediumIT.java b/sonar-scanner-engine/src/it/java/org/sonar/scanner/mediumtest/fs/FileSystemMediumIT.java index 0bfef5a38ad..7f218967916 100644 --- a/sonar-scanner-engine/src/it/java/org/sonar/scanner/mediumtest/fs/FileSystemMediumIT.java +++ b/sonar-scanner-engine/src/it/java/org/sonar/scanner/mediumtest/fs/FileSystemMediumIT.java @@ -866,8 +866,6 @@ public class FileSystemMediumIT { File srcDir = new File(baseDir, "src"); srcDir.mkdir(); - tester.addLanguage("xoo3", "xoo3",false, ".xoo3"); - writeFile(srcDir, "sample.xoo3", "Sample xoo\ncontent"); writeFile(srcDir, "sample2.xoo3", "Sample xoo 2\ncontent"); @@ -899,7 +897,6 @@ public class FileSystemMediumIT { assertThat(result.inputFiles()).hasSize(2); - tester.addLanguage("xoo2", "xoo2", ".xoo"); AnalysisBuilder analysisBuilder = tester.newAnalysis() .properties(builder .put("sonar.lang.patterns.xoo2", "**/*.xoo") diff --git a/sonar-scanner-engine/src/it/java/org/sonar/scanner/mediumtest/fs/NoLanguagesPluginsMediumIT.java b/sonar-scanner-engine/src/it/java/org/sonar/scanner/mediumtest/fs/NoLanguagesPluginsMediumIT.java index 282bdbfe071..a32056a4cb7 100644 --- a/sonar-scanner-engine/src/it/java/org/sonar/scanner/mediumtest/fs/NoLanguagesPluginsMediumIT.java +++ b/sonar-scanner-engine/src/it/java/org/sonar/scanner/mediumtest/fs/NoLanguagesPluginsMediumIT.java @@ -26,6 +26,7 @@ import org.junit.Rule; import org.junit.Test; import org.junit.rules.TemporaryFolder; import org.sonar.scanner.mediumtest.ScannerMediumTester; +import org.springframework.beans.factory.BeanCreationException; import static org.assertj.core.api.Assertions.assertThatThrownBy; @@ -43,8 +44,8 @@ public class NoLanguagesPluginsMediumIT { assertThatThrownBy(() -> tester .newAnalysis(new File(projectDir, "sonar-project.properties")) .execute()) - .isInstanceOf(IllegalStateException.class) - .hasMessage("No language plugins are installed."); + .isInstanceOf(BeanCreationException.class) + .hasRootCauseMessage("No language plugins are installed."); } private File copyProject(String path) throws Exception { |