Skip to content

Commit

Permalink
ITs wip
Browse files Browse the repository at this point in the history
  • Loading branch information
kirill-knize-sonarsource committed Oct 7, 2024
1 parent 4797cde commit cb6d3cc
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions its/tests/src/test/java/its/SonarQubeCommunityEditionTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -201,17 +201,20 @@ void prepare() {
.setProperty("sonar.password", com.sonar.orchestrator.container.Server.ADMIN_PASSWORD));
}


// TODO This test used to assert that issues for disabled languages are not matched, but it looks like we can't have such situation.
// If language is disabled for local analysis, there will be no issue to match. If language is disabled for server analysis, there will be no server issue.
@Test
void should_match_server_issues_of_enabled_languages() {
var configScopeId = "should_match_server_issues_of_enabled_languages";
backend.getConfigurationService().didAddConfigurationScopes(new DidAddConfigurationScopesParams(
List.of(new ConfigurationScopeDto(configScopeId, null, true, "sample-language-mix", new BindingConfigurationDto(CONNECTION_ID, PROJECT_KEY_LANGUAGE_MIX,
true)))));
List.of(new ConfigurationScopeDto(configScopeId, null, true, "sample-language-mix",
new BindingConfigurationDto(CONNECTION_ID, PROJECT_KEY_LANGUAGE_MIX, true)))));
waitForAnalysisToBeReady(configScopeId);

var mainPyIssues = analyzeAndGetIssues(PROJECT_KEY_LANGUAGE_MIX, "src/main/java/foo/main.py", configScopeId);
assertThat(mainPyIssues).hasSize(1);
assertThat(mainPyIssues.get(0).getServerKey()).isEmpty();
// var mainPyIssues = analyzeAndGetIssues(PROJECT_KEY_LANGUAGE_MIX, "src/main/java/foo/main.py", configScopeId);
// assertThat(mainPyIssues).hasSize(1);
// assertThat(mainPyIssues.get(0).getServerKey()).isEmpty();

var fooJavaIssues = analyzeAndGetIssues(PROJECT_KEY_LANGUAGE_MIX, "src/main/java/foo/Foo.java", configScopeId);
assertThat(fooJavaIssues).hasSize(1);
Expand Down

0 comments on commit cb6d3cc

Please sign in to comment.