Skip to content

Commit 8233f5b

Browse files
committed
SCANJLIB-260 Run QA on LTA 2025.1
1 parent 68fcfd2 commit 8233f5b

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

.cirrus.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ qa_task:
9191
env:
9292
matrix:
9393
- SQ_VERSION: LATEST_RELEASE
94+
- SQ_VERSION: LATEST_RELEASE[2025.1]
9495
- SQ_VERSION: LATEST_RELEASE[9.9]
9596
JAVA_VERSION:
9697
- LATEST_RELEASE

its/it-tests/src/test/java/com/sonar/scanner/lib/it/PropertiesTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public void cacheIsInUserHomeByDefault() throws IOException {
6969
BuildResult buildResult = scanner.executeSimpleProject(project("js-sample"), ORCHESTRATOR.getServer().getUrl(), Map.of(), Map.of());
7070
assertThat(buildResult.getLastStatus()).isZero();
7171

72-
assertThat(Paths.get(System.getProperty("user.home")).resolve(".sonar/cache")).isDirectoryRecursivelyContaining(("glob:**/*scanner-engine*.jar"));
72+
assertThat(Paths.get(System.getProperty("user.home")).resolve(".sonar/cache")).isDirectoryRecursivelyContaining(("glob:**/*scanner-*.jar"));
7373
}
7474

7575
@Test
@@ -80,7 +80,7 @@ public void overrideHomeDirectoryWithEnv() throws IOException {
8080
Map.of("SONAR_USER_HOME", userHome.getAbsolutePath()));
8181
assertThat(buildResult.getLastStatus()).isZero();
8282

83-
assertThat(userHome.toPath().resolve("cache")).isDirectoryRecursivelyContaining(("glob:**/*scanner-engine*.jar"));
83+
assertThat(userHome.toPath().resolve("cache")).isDirectoryRecursivelyContaining(("glob:**/*scanner-*.jar"));
8484
}
8585

8686
@Test
@@ -90,7 +90,7 @@ public void overrideHomeDirectoryWithProps() throws IOException {
9090
BuildResult buildResult = scanner.executeSimpleProject(project("js-sample"), ORCHESTRATOR.getServer().getUrl(), Map.of("sonar.userHome", userHome.getAbsolutePath()), Map.of());
9191
assertThat(buildResult.getLastStatus()).isZero();
9292

93-
assertThat(userHome.toPath().resolve("cache")).isDirectoryRecursivelyContaining(("glob:**/*scanner-engine*.jar"));
93+
assertThat(userHome.toPath().resolve("cache")).isDirectoryRecursivelyContaining(("glob:**/*scanner-*.jar"));
9494
}
9595

9696
private static Path project(String projectName) {

its/it-tests/src/test/java/com/sonar/scanner/lib/it/ScannerJavaLibraryTestSuite.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
*/
2020
package com.sonar.scanner.lib.it;
2121

22+
import com.sonar.orchestrator.container.Edition;
2223
import com.sonar.orchestrator.http.HttpMethod;
2324
import com.sonar.orchestrator.junit4.OrchestratorRule;
24-
import com.sonar.orchestrator.locator.MavenLocation;
2525
import java.time.Instant;
2626
import java.time.ZoneId;
2727
import java.time.format.DateTimeFormatter;
@@ -35,13 +35,19 @@
3535
public class ScannerJavaLibraryTestSuite {
3636
private static final String SONAR_RUNTIME_VERSION = "sonar.runtimeVersion";
3737

38+
public static final String LATEST_RELEASE = "LATEST_RELEASE";
3839
@ClassRule
3940
public static final OrchestratorRule ORCHESTRATOR = OrchestratorRule.builderEnv()
40-
.setSonarVersion(System.getProperty(SONAR_RUNTIME_VERSION, "DEV"))
41+
.setSonarVersion(getServerVersion())
42+
.setEdition(getServerVersion().equals(LATEST_RELEASE) ? Edition.COMMUNITY : Edition.DEVELOPER)
4143
.useDefaultAdminCredentialsForBuilds(true)
4244
.addBundledPluginToKeep("sonar-javascript")
4345
.build();
4446

47+
private static String getServerVersion() {
48+
return System.getProperty(SONAR_RUNTIME_VERSION, LATEST_RELEASE);
49+
}
50+
4551
public static void resetData(OrchestratorRule orchestrator) {
4652
Instant instant = Instant.now();
4753

0 commit comments

Comments
 (0)