Skip to content

Commit

Permalink
SCAN4NET-181 Update Orchestrator version (#2278)
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-meseldzija-sonarsource authored Dec 6, 2024
1 parent 2b80c82 commit c422fad
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ stages:
TEST_INCLUDE: "**/sonarqube/*"
msbuild17_dev:
PRODUCT: "SonarQube"
SQ_VERSION: "DEV[10.8]"
SQ_VERSION: "DEV"
SONAR_CFAMILYPLUGIN_VERSION: "LATEST_RELEASE"
MSBUILD_PATH: $(MSBUILD_17_PATH)
TEST_INCLUDE: "**/sonarqube/*"
Expand Down
2 changes: 1 addition & 1 deletion its/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<dependency>
<groupId>org.sonarsource.orchestrator</groupId>
<artifactId>sonar-orchestrator-junit5</artifactId>
<version>4.6.0.1748</version>
<version>5.1.0.2254</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,8 @@ void testMultiLanguage() throws Exception {

// Program.cs 30
// Module1.vb 10
assertThat(TestUtils.getMeasureAsInteger(localProjectKey, "ncloc", ORCHESTRATOR)).isEqualTo(40);
// App.config +6 (Reported by Xml plugin)
assertThat(TestUtils.getMeasureAsInteger(localProjectKey, "ncloc", ORCHESTRATOR)).isEqualTo(46);
}

@Test
Expand Down Expand Up @@ -659,9 +660,10 @@ void testEsprojVueWithBackend() throws IOException {
"javascript:S2703",
"typescript:S3626");

assertThat(TestUtils.getMeasureAsInteger(localProjectKey, "lines", ORCHESTRATOR)).isEqualTo(18644);
assertThat(TestUtils.getMeasureAsInteger(localProjectKey, "ncloc", ORCHESTRATOR)).isEqualTo(13998);
assertThat(TestUtils.getMeasureAsInteger(localProjectKey, "files", ORCHESTRATOR)).isEqualTo(212);
// xml plugin results in 1 extra file and more lines
assertThat(TestUtils.getMeasureAsInteger(localProjectKey, "lines", ORCHESTRATOR)).isEqualTo(18681);
assertThat(TestUtils.getMeasureAsInteger(localProjectKey, "ncloc", ORCHESTRATOR)).isEqualTo(14028);
assertThat(TestUtils.getMeasureAsInteger(localProjectKey, "files", ORCHESTRATOR)).isEqualTo(213);
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public void afterAll(ExtensionContext extensionContext) throws Exception {
}

private static Orchestrator createOrchestrator() {
var version = System.getProperty("sonar.runtimeVersion", "DEV[10.8]");
var version = System.getProperty("sonar.runtimeVersion", "DEV");
var orchestrator = OrchestratorExtension.builderEnv()
.useDefaultAdminCredentialsForBuilds(true)
.setSonarVersion(version)
Expand All @@ -72,7 +72,7 @@ private static Orchestrator createOrchestrator() {
}
// The number of results depends on the XML plugin version. Since not all plugin versions are compatible with
// all SonarQube versions, we will run tests with XML plugin on the latest SQ version.
if (version.equals("LATEST_RELEASE")) {
if (version.equals("LATEST_RELEASE") || version.equals("DEV")) {
orchestrator.addPlugin(TestUtils.getMavenLocation("org.sonarsource.xml", "sonar-xml-plugin", System.getProperty("sonar.xmlplugin.version", "LATEST_RELEASE")));
}
return orchestrator.build();
Expand Down

0 comments on commit c422fad

Please sign in to comment.