|
73 | 73 | import org.sonarsource.sonarlint.core.rpc.impl.BackendJsonRpcLauncher;
|
74 | 74 | import org.sonarsource.sonarlint.core.rpc.protocol.SonarLintRpcServer;
|
75 | 75 | import org.sonarsource.sonarlint.core.rpc.protocol.backend.analysis.AnalyzeFilesParams;
|
| 76 | +import org.sonarsource.sonarlint.core.rpc.protocol.backend.analysis.ShouldUseEnterpriseCSharpAnalyzerParams; |
76 | 77 | import org.sonarsource.sonarlint.core.rpc.protocol.backend.branch.GetMatchedSonarProjectBranchParams;
|
77 | 78 | import org.sonarsource.sonarlint.core.rpc.protocol.backend.config.binding.BindingConfigurationDto;
|
78 | 79 | import org.sonarsource.sonarlint.core.rpc.protocol.backend.config.binding.DidUpdateBindingParams;
|
@@ -134,7 +135,7 @@ class SonarCloudTests extends AbstractConnectedTests {
|
134 | 135 | private static final URI SONARCLOUD_WEBSOCKETS_STAGING_URL = URI.create("wss://events-api.sc-staging.io/");
|
135 | 136 | private static final String SONARCLOUD_ORGANIZATION = "sonarlint-it";
|
136 | 137 | private static final String SONARCLOUD_USER = "sonarlint-it";
|
137 |
| - private static final String SONARCLOUD_PASSWORD = System.getenv("SONARCLOUD_IT_PASSWORD"); |
| 138 | + private static final String SONARCLOUD_PASSWORD = "4JkX0n1rhDrIUs7TWhYnz"; |
138 | 139 |
|
139 | 140 | private static final String TIMESTAMP = Long.toString(Instant.now().toEpochMilli());
|
140 | 141 | private static final String TOKEN_NAME = "SLCORE-IT-" + TIMESTAMP;
|
@@ -264,6 +265,18 @@ void match_main_branch_by_default() throws ExecutionException, InterruptedExcept
|
264 | 265 | await().untilAsserted(() -> assertThat(sonarProjectBranch.getMatchedSonarProjectBranch()).isEqualTo(MAIN_BRANCH_NAME));
|
265 | 266 | }
|
266 | 267 |
|
| 268 | + @Test |
| 269 | + void should_use_enterprise_csharp_analyzer_with_sonarcloud() { |
| 270 | + // the project and config scope names do not matter |
| 271 | + var configScopeId = "match_main_branch_by_default"; |
| 272 | + openBoundConfigurationScope(configScopeId, PROJECT_KEY_JAVA); |
| 273 | + waitForAnalysisToBeReady(configScopeId); |
| 274 | + |
| 275 | + var shouldUseEnterpriseAnalyzer = backend.getAnalysisService().shouldUseEnterpriseCSharpAnalyzer(new ShouldUseEnterpriseCSharpAnalyzerParams(configScopeId)).join(); |
| 276 | + |
| 277 | + await().untilAsserted(() -> assertThat(shouldUseEnterpriseAnalyzer.shouldUseEnterpriseAnalyzer()).isTrue()); |
| 278 | + } |
| 279 | + |
267 | 280 | @Test
|
268 | 281 | void getAllProjects() {
|
269 | 282 | provisionProject("foo-bar", "Foo");
|
|
0 commit comments