- JOB=POSTGRES
- JOB=MYSQL
- JOB=WEB
- - JOB=ITS IT_CATEGORY=issue
- - JOB=ITS IT_CATEGORY=analysis
- - JOB=ITS IT_CATEGORY=administration
- JOB=ITS IT_CATEGORY=batch
- - JOB=ITS IT_CATEGORY=server
- JOB=ITS IT_CATEGORY=plugins
- - JOB=ITS IT_CATEGORY=qualitygate
- - JOB=ITS IT_CATEGORY=updatecenter
+ - JOB=ITS IT_CATEGORY=issue_analysis
+ - JOB=ITS IT_CATEGORY=administration_qualitygate
+ - JOB=ITS IT_CATEGORY=server_updatecenter
matrix:
fast_finish: true
<name>SonarQube Integration Tests :: Tests</name>
<properties>
- <category>*</category>
+ <category1>*</category1>
+ <category2>*</category2>
<surefire.argLine>-Xmx128m -server</surefire.argLine>
<skipIts>false</skipIts>
</properties>
<configuration>
<skipTests>${skipIts}</skipTests>
<includes>
- <include>${category}/suite/*TestSuite.java</include>
+ <include>${category1}/suite/*TestSuite.java</include>
+ <include>${category2}/suite/*TestSuite.java</include>
<!-- not included in suites -->
- <include>${category}/*Test.java</include>
+ <include>${category1}/*Test.java</include>
+ <include>${category2}/*Test.java</include>
</includes>
<excludes>
<!-- included into suites -->
@ClassRule
public static final Orchestrator ORCHESTRATOR = Orchestrator.builderEnv()
.setServerProperty("sonar.notifications.delay", "1")
+ .setSonarVersion("DEV")
.addPlugin(ItUtils.pluginArtifact("property-sets-plugin"))
.addPlugin(ItUtils.pluginArtifact("sonar-subcategories-plugin"))
@ClassRule
public static final Orchestrator ORCHESTRATOR = Orchestrator.builderEnv()
+ .setSonarVersion("DEV")
.addPlugin(ItUtils.xooPlugin())
.build();
}
@ClassRule
public static Orchestrator orchestrator = Orchestrator.builderEnv()
+ .setSonarVersion("DEV")
.addPlugin(ItUtils.xooPlugin())
.setContext("/")
@ClassRule
public static Orchestrator orchestrator = Orchestrator.builderEnv()
+ .setSonarVersion("DEV")
.addPlugin(ItUtils.xooPlugin())
.setContext("/")
+
.addPlugin(ItUtils.pluginArtifact("access-secured-props-plugin"))
.build();
public class SettingsEncryptionTest {
@ClassRule
public static Orchestrator orchestrator = Orchestrator.builderEnv()
+ .setSonarVersion("DEV")
.addPlugin(ItUtils.pluginArtifact("settings-encryption-plugin"))
.addPlugin(ItUtils.xooPlugin())
.build();
@ClassRule
public static final Orchestrator ORCHESTRATOR = Orchestrator.builderEnv()
.addPlugin(ItUtils.xooPlugin())
+ .setSonarVersion("DEV")
.setOrchestratorProperty("javaVersion", "LATEST_RELEASE").addPlugin("java")
.setContext("/")
@ClassRule
public static final Orchestrator ORCHESTRATOR = Orchestrator.builderEnv()
+ .setSonarVersion("DEV")
.addPlugin(ItUtils.xooPlugin())
.build();
}
OrchestratorBuilder builder = Orchestrator.builderEnv();
// install latest compatible releases of plugins
+ builder.setSonarVersion("DEV");
org.sonar.updatecenter.common.Version sonarVersion = org.sonar.updatecenter.common.Version.create(builder.getSonarVersion());
builder.getUpdateCenter().setInstalledSonarVersion(sonarVersion);
for (Plugin plugin : builder.getUpdateCenter().findAllCompatiblePlugins()) {
@ClassRule
public static Orchestrator orchestrator = Orchestrator.builderEnv()
+ .setSonarVersion("DEV")
.addPlugin(ItUtils.xooPlugin())
// 1 second. Required for notification test.
@ClassRule
public static Orchestrator orchestrator = Orchestrator.builderEnv()
+ .setSonarVersion("DEV")
.addPlugin(ItUtils.xooPlugin())
// 1 second. Required for notification test.
try {
URL jksKeystore = getClass().getResource("/server/HttpsTest/keystore.jks");
orchestrator = Orchestrator.builderEnv()
+ .setSonarVersion("DEV")
.setServerProperty("sonar.web.https.port", String.valueOf(httpsPort))
.setServerProperty("sonar.web.https.keyAlias", "tests")
.setServerProperty("sonar.web.https.keyPass", "__wrong__")
// start server
URL jksKeystore = getClass().getResource("/server/HttpsTest/keystore.jks");
orchestrator = Orchestrator.builderEnv()
+ .setSonarVersion("DEV")
.setServerProperty("sonar.web.https.port", String.valueOf(httpsPort))
.setServerProperty("sonar.web.https.keyAlias", "tests")
.setServerProperty("sonar.web.https.keyPass", "thetests")
public void test_settings() {
URL secretKeyUrl = getClass().getResource("/server/ServerTest/sonar-secret.txt");
orchestrator = Orchestrator.builderEnv()
+ .setSonarVersion("DEV")
.addPlugin(ItUtils.pluginArtifact("settings-plugin"))
.addPlugin(ItUtils.pluginArtifact("license-plugin"))
.setServerProperty("sonar.secretKeyPath", secretKeyUrl.getFile())
@Test
public void property_relocation() {
orchestrator = Orchestrator.builderEnv()
+ .setSonarVersion("DEV")
.addPlugin(ItUtils.pluginArtifact("property-relocation-plugin"))
.addPlugin(ItUtils.xooPlugin())
.setServerProperty("sonar.deprecatedKey", "true")
public void check_minimal_sonar_version_at_startup() throws Exception {
try {
orchestrator = Orchestrator.builderEnv()
+ .setSonarVersion("DEV")
.addPlugin(FileLocation.of(new File(ServerTest.class.getResource("/server/ServerTest/incompatible-plugin-1.0.jar").toURI())))
.build();
orchestrator.start();
public void support_install_dir_with_whitespaces() throws Exception {
String dirName = "target/has space";
FileUtils.deleteDirectory(new File(dirName));
- orchestrator = Orchestrator.builderEnv().setOrchestratorProperty("orchestrator.workspaceDir", dirName).build();
+ orchestrator = Orchestrator.builderEnv()
+ .setSonarVersion("DEV")
+ .setOrchestratorProperty("orchestrator.workspaceDir", dirName)
+ .build();
orchestrator.start();
Server.Status status = orchestrator.getServer().getAdminWsClient().find(new ServerQuery()).getStatus();
@Test
public void should_create_in_temp_folder() throws Exception {
orchestrator = Orchestrator.builderEnv()
+ .setSonarVersion("DEV")
.addPlugin(ItUtils.pluginArtifact("server-plugin"))
.setServerProperty("sonar.createTempFiles", "true")
.build();
public void restart_forbidden_if_not_dev_mode() throws Exception {
// server classloader locks Jar files on Windows
if (!SystemUtils.IS_OS_WINDOWS) {
- orchestrator = Orchestrator.builderEnv().build();
+ orchestrator = Orchestrator.builderEnv()
+ .setSonarVersion("DEV")
+ .build();
orchestrator.start();
try {
orchestrator.getServer().adminWsClient().systemClient().restart();
public void restart_on_dev_mode() throws Exception {
// server classloader locks Jar files on Windows
if (!SystemUtils.IS_OS_WINDOWS) {
- orchestrator = Orchestrator.builderEnv().setServerProperty("sonar.web.dev", "true").build();
+ orchestrator = Orchestrator.builderEnv()
+ .setSonarVersion("DEV")
+ .setServerProperty("sonar.web.dev", "true")
+ .build();
orchestrator.start();
orchestrator.getServer().adminWsClient().systemClient().restart();
@ClassRule
public static final Orchestrator ORCHESTRATOR = Orchestrator.builderEnv()
+ .setSonarVersion("DEV")
.addPlugin(ItUtils.xooPlugin())
// Used in global_property_change_extension_point
@ClassRule
public static Orchestrator orchestrator = Orchestrator.builderEnv()
+ .setSonarVersion("DEV")
.setServerProperty("sonar.updatecenter.url", UpdateCenterTest.class.getResource("UpdateCenterTest/update-center.properties").toString())
.addPlugin(pluginArtifact("sonar-fake-plugin"))
.build();
if [ "$IT_CATEGORY" == "plugins" ] && [ "$TRAVIS_PULL_REQUEST" == "true" ]; then
echo "Ignore this job since it needs access to private test licenses."
else
- prepareIts
- mvn install -Pit,dev -DskipTests -Dsonar.runtimeVersion=DEV -Dcategory=$IT_CATEGORY -Dmaven.test.redirectTestOutputToFile=false -e
+ prepareIts
+
+ CATEGORIES=($(echo "$IT_CATEGORY" | tr '_' '\n'))
+ CATEGORY1=${CATEGORIES[0]:-'NONE'}
+ CATEGORY2=${CATEGORIES[1]:-'NONE'}
+
+ mvn install -Pit,dev -DskipTests -Dcategory1="$CATEGORY1" -Dcategory2="$CATEGORY2" -Dmaven.test.redirectTestOutputToFile=false -e -T2 -Dsource.skip=true
fi
;;