import org.sonarqube.tests.settings.EmailsTest;
import org.sonarqube.tests.settings.PropertySetsTest;
import org.sonarqube.tests.settings.SettingsTest;
+import util.ItUtils;
-import static util.ItUtils.newOrchestratorBuilder;
+import static util.ItUtils.newOrchestrator;
import static util.ItUtils.pluginArtifact;
import static util.ItUtils.xooPlugin;
public class Category1Suite {
@ClassRule
- public static final Orchestrator ORCHESTRATOR = newOrchestratorBuilder(
+ public static final Orchestrator ORCHESTRATOR = ItUtils.newOrchestrator(
builder -> builder
.setServerProperty("sonar.notifications.delay", "1")
.addPlugin(pluginArtifact("property-sets-plugin"))
import org.sonarqube.tests.analysis.SettingsEncryptionTest;
import org.sonarqube.tests.analysis.TempFolderTest;
import org.sonarqube.tests.plugins.VersionPluginTest;
+import util.ItUtils;
-import static util.ItUtils.newOrchestratorBuilder;
+import static util.ItUtils.newOrchestrator;
import static util.ItUtils.pluginArtifact;
import static util.ItUtils.xooPlugin;
public class Category3Suite {
@ClassRule
- public static final Orchestrator ORCHESTRATOR = newOrchestratorBuilder(
+ public static final Orchestrator ORCHESTRATOR = ItUtils.newOrchestrator(
builder -> builder
.addPlugin(xooPlugin())
.addPlugin(MavenLocation.of("org.sonarsource.java", "sonar-java-plugin", "LATEST_RELEASE"))
import org.sonarqube.tests.serverSystem.SystemInfoTest;
import org.sonarqube.tests.ws.WsLocalCallTest;
import org.sonarqube.tests.ws.WsTest;
+import util.ItUtils;
-import static util.ItUtils.newOrchestratorBuilder;
+import static util.ItUtils.newOrchestrator;
import static util.ItUtils.pluginArtifact;
import static util.ItUtils.xooPlugin;
public class Category4Suite {
@ClassRule
- public static final Orchestrator ORCHESTRATOR = newOrchestratorBuilder(
+ public static final Orchestrator ORCHESTRATOR = ItUtils.newOrchestrator(
builder -> builder
.addPlugin(xooPlugin())
import org.sonarqube.tests.qualityProfile.QualityProfilesWsTest;
import org.sonarqube.tests.rule.RulesMarkdownTest;
import org.sonarqube.tests.rule.RulesWsTest;
+import util.ItUtils;
-import static util.ItUtils.newOrchestratorBuilder;
+import static util.ItUtils.newOrchestrator;
import static util.ItUtils.pluginArtifact;
import static util.ItUtils.xooPlugin;
public static final int SEARCH_HTTP_PORT = NetworkUtils.getNextAvailablePort(InetAddress.getLoopbackAddress());
@ClassRule
- public static final Orchestrator ORCHESTRATOR = newOrchestratorBuilder(
+ public static final Orchestrator ORCHESTRATOR = ItUtils.newOrchestrator(
builder -> builder
// for ES resiliency tests
.setServerProperty("sonar.search.httpPort", "" + SEARCH_HTTP_PORT)
import static org.assertj.core.api.Assertions.tuple;
import static org.sonarqube.tests.Byteman.Process.CE;
import static org.sonarqube.ws.Ce.TaskStatus.FAILED;
-import static util.ItUtils.newOrchestratorBuilder;
+import static util.ItUtils.newOrchestrator;
import static util.ItUtils.projectDir;
public class AnalysisEsResilienceTest {
static {
byteman = new Byteman();
- orchestrator = newOrchestratorBuilder(
+ orchestrator = ItUtils.newOrchestrator(
builder -> {
byteman.install(builder, CE);
builder
import org.junit.runners.Suite;
import static util.ItUtils.installCoreExtension;
-import static util.ItUtils.newOrchestratorBuilder;
+import static util.ItUtils.newOrchestrator;
import static util.ItUtils.xooPlugin;
@RunWith(Suite.class)
public class AuthorizationSuite {
@ClassRule
- public static final Orchestrator ORCHESTRATOR = newOrchestratorBuilder(
+ public static final Orchestrator ORCHESTRATOR = newOrchestrator(
builder -> builder
.setServerProperty("sonar.web.systemPasscode", SystemPasscodeTest.VALID_PASSCODE)
.addPlugin(xooPlugin()),
import static com.google.common.base.Preconditions.checkState;
import static org.assertj.core.api.Assertions.assertThat;
-import static util.ItUtils.newOrchestratorBuilder;
+import static util.ItUtils.newOrchestrator;
public class CeShutdownTest {
pauseFile = temp.newFile();
FileUtils.touch(pauseFile);
- orchestrator = newOrchestratorBuilder(
+ orchestrator = ItUtils.newOrchestrator(
builder -> builder
.setServerProperty("sonar.ce.pauseTask.path", pauseFile.getAbsolutePath())
.setServerProperty("sonar.ce.gracefulStopTimeOutInMs", "" + timeOutInMs)
import static org.assertj.core.api.Assertions.assertThat;
import static util.ItUtils.installCoreExtension;
import static util.ItUtils.newAdminWsClient;
-import static util.ItUtils.newOrchestratorBuilder;
+import static util.ItUtils.newOrchestrator;
import static util.ItUtils.xooPlugin;
public class CeWorkersTest {
public static void setUp() throws Exception {
sharedMemory = temporaryFolder.newFile();
- orchestrator = newOrchestratorBuilder(
+ orchestrator = newOrchestrator(
builder -> builder
.setServerProperty("itTests.workerLatch.sharedMemoryFile", sharedMemory.getAbsolutePath())
// overwrite default value to display heap dump on OOM and reduce max heap
public class ComponentSuite {
@ClassRule
- public static final Orchestrator ORCHESTRATOR = ItUtils.newOrchestratorBuilder(
+ public static final Orchestrator ORCHESTRATOR = ItUtils.newOrchestrator(
builder -> builder
.addPlugin(xooPlugin())
import org.junit.ClassRule;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
+import util.ItUtils;
-import static util.ItUtils.newOrchestratorBuilder;
+import static util.ItUtils.newOrchestrator;
import static util.ItUtils.xooPlugin;
@RunWith(Suite.class)
})
public class DuplicationSuite {
@ClassRule
- public static final Orchestrator ORCHESTRATOR = newOrchestratorBuilder(
+ public static final Orchestrator ORCHESTRATOR = ItUtils.newOrchestrator(
builder -> builder
.addPlugin(xooPlugin())
public class ExternalIssueSuite {
@ClassRule
- public static final Orchestrator ORCHESTRATOR = ItUtils.newOrchestratorBuilder(
+ public static final Orchestrator ORCHESTRATOR = ItUtils.newOrchestrator(
builder -> builder
.addPlugin(ItUtils.xooPlugin())
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.tuple;
-import static util.ItUtils.newOrchestratorBuilder;
+import static util.ItUtils.newOrchestrator;
import static util.ItUtils.newUserWsClient;
import static util.ItUtils.pluginArtifact;
import static util.ItUtils.projectDir;
private static final String USER_EMAIL = "tester@example.org";
@ClassRule
- public static final Orchestrator ORCHESTRATOR = newOrchestratorBuilder(
+ public static final Orchestrator ORCHESTRATOR = ItUtils.newOrchestrator(
builder -> builder
.addPlugin(xooPlugin())
.addPlugin(ItUtils.pluginArtifact("backdating-plugin-v1"))
import org.junit.ClassRule;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
+import util.ItUtils;
-import static util.ItUtils.newOrchestratorBuilder;
+import static util.ItUtils.newOrchestrator;
import static util.ItUtils.pluginArtifact;
import static util.ItUtils.xooPlugin;
public class IssueSuite {
@ClassRule
- public static final Orchestrator ORCHESTRATOR = newOrchestratorBuilder(
+ public static final Orchestrator ORCHESTRATOR = ItUtils.newOrchestrator(
builder -> builder
.setServerProperty("sonar.search.httpPort", "9025")
.addPlugin(xooPlugin())
import org.junit.ClassRule;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
+import util.ItUtils;
-import static util.ItUtils.newOrchestratorBuilder;
+import static util.ItUtils.newOrchestrator;
import static util.ItUtils.xooPlugin;
@RunWith(Suite.class)
public class OrganizationIssueSuite {
@ClassRule
- public static final Orchestrator ORCHESTRATOR = newOrchestratorBuilder(
+ public static final Orchestrator ORCHESTRATOR = ItUtils.newOrchestrator(
builder -> builder
.addPlugin(xooPlugin())
import org.sonarqube.ws.client.measures.ComponentRequest;
import org.sonarqube.ws.client.measures.ComponentTreeRequest;
import org.sonarqube.ws.client.measures.MeasuresService;
+import util.ItUtils;
import static java.util.Arrays.asList;
import static java.util.Collections.singletonList;
import static org.assertj.core.api.Assertions.assertThat;
-import static util.ItUtils.newOrchestratorBuilder;
+import static util.ItUtils.newOrchestrator;
import static util.ItUtils.runProjectAnalysis;
import static util.ItUtils.xooPlugin;
private static final String PROJECT_KEY = "com.sonarsource.it.samples:multi-modules-sample";
- private static Orchestrator orchestrator = newOrchestratorBuilder(
+ private static Orchestrator orchestrator = ItUtils.newOrchestrator(
builder -> builder
.setOrchestratorProperty("sonar.web.context", "/sonarqube")
.addPlugin(xooPlugin()));
import org.junit.Test;
import org.sonarqube.qa.util.pageobjects.MarketplacePage;
import org.sonarqube.qa.util.pageobjects.Navigation;
+import util.ItUtils;
import util.user.UserRule;
-import static util.ItUtils.newOrchestratorBuilder;
+import static util.ItUtils.newOrchestrator;
import static util.ItUtils.pluginArtifact;
/**
public class UpdateCenterTest {
@ClassRule
- public static final Orchestrator orchestrator = newOrchestratorBuilder(
+ public static final Orchestrator orchestrator = ItUtils.newOrchestrator(
builder -> builder
.setServerProperty("sonar.updatecenter.url", UpdateCenterTest.class.getResource("/marketplace/UpdateCenterTest/update-center.properties").toString())
.addPlugin(pluginArtifact("sonar-fake-plugin"))
import org.junit.ClassRule;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
+import util.ItUtils;
-import static util.ItUtils.newOrchestratorBuilder;
+import static util.ItUtils.newOrchestrator;
import static util.ItUtils.pluginArtifact;
import static util.ItUtils.xooPlugin;
public class MeasureSuite {
@ClassRule
- public static final Orchestrator ORCHESTRATOR = newOrchestratorBuilder(
+ public static final Orchestrator ORCHESTRATOR = ItUtils.newOrchestrator(
builder -> builder
.addPlugin(xooPlugin())
import org.junit.runners.Suite;
import static util.ItUtils.installCoreExtension;
-import static util.ItUtils.newOrchestratorBuilder;
+import static util.ItUtils.newOrchestrator;
import static util.ItUtils.pluginArtifact;
import static util.ItUtils.xooPlugin;
public class OrganizationSuite {
@ClassRule
- public static final Orchestrator ORCHESTRATOR = newOrchestratorBuilder(
+ public static final Orchestrator ORCHESTRATOR = newOrchestrator(
builder -> builder
.addPlugin(xooPlugin())
.addPlugin(pluginArtifact("ui-extensions-plugin"))
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.sonarqube.tests.performance.AbstractPerfTest;
+import util.ItUtils;
-import static util.ItUtils.newOrchestratorBuilder;
+import static util.ItUtils.newOrchestrator;
import static util.ItUtils.xooPlugin;
@RunWith(Suite.class)
public class ScannerPerformanceSuite {
@ClassRule
- public static final Orchestrator ORCHESTRATOR = newOrchestratorBuilder(
+ public static final Orchestrator ORCHESTRATOR = ItUtils.newOrchestrator(
builder -> builder
.addPlugin(xooPlugin())
// should not be so high, but required as long embedded h2 is used -> requires more memory on server
import org.junit.rules.TemporaryFolder;
import org.sonarqube.tests.performance.AbstractPerfTest;
import org.sonarqube.tests.performance.ServerLogs;
+import util.ItUtils;
-import static util.ItUtils.newOrchestratorBuilder;
+import static util.ItUtils.newOrchestrator;
import static util.ItUtils.xooPlugin;
public class ComputeEnginePerfTest extends AbstractPerfTest {
public static TemporaryFolder temp = new TemporaryFolder();
@ClassRule
- public static Orchestrator orchestrator = newOrchestratorBuilder(
+ public static Orchestrator orchestrator = ItUtils.newOrchestrator(
builder -> builder
.addPlugin(xooPlugin())
.setServerProperty(
import org.junit.rules.Timeout;
import org.sonarqube.tests.performance.AbstractPerfTest;
import org.sonarqube.tests.performance.ServerLogs;
+import util.ItUtils;
import static org.apache.commons.io.FileUtils.readLines;
-import static util.ItUtils.newOrchestratorBuilder;
+import static util.ItUtils.newOrchestrator;
import static util.ItUtils.xooPlugin;
public class ServerPerfTest extends AbstractPerfTest {
@Test
public void server_startup_and_shutdown() throws Exception {
String defaultWebJavaOptions = "-Xmx768m -XX:+HeapDumpOnOutOfMemoryError -Djava.awt.headless=true -Dfile.encoding=UTF-8";
- Orchestrator orchestrator = newOrchestratorBuilder(
+ Orchestrator orchestrator = ItUtils.newOrchestrator(
builder -> builder
.addPlugin(xooPlugin())
import org.junit.ClassRule;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
+import util.ItUtils;
-import static util.ItUtils.newOrchestratorBuilder;
+import static util.ItUtils.newOrchestrator;
import static util.ItUtils.pluginArtifact;
import static util.ItUtils.xooPlugin;
static final int SEARCH_HTTP_PORT = NetworkUtils.getNextAvailablePort(InetAddress.getLoopbackAddress());
@ClassRule
- public static final Orchestrator ORCHESTRATOR = newOrchestratorBuilder(
+ public static final Orchestrator ORCHESTRATOR = ItUtils.newOrchestrator(
builder -> builder
// for ES resiliency tests
.setServerProperty("sonar.search.httpPort", "" + SEARCH_HTTP_PORT)
import org.junit.ClassRule;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
+import util.ItUtils;
-import static util.ItUtils.newOrchestratorBuilder;
+import static util.ItUtils.newOrchestrator;
import static util.ItUtils.pluginArtifact;
import static util.ItUtils.xooPlugin;
static final int SEARCH_HTTP_PORT = NetworkUtils.getNextAvailablePort(InetAddress.getLoopbackAddress());
@ClassRule
- public static final Orchestrator ORCHESTRATOR = newOrchestratorBuilder(
+ public static final Orchestrator ORCHESTRATOR = ItUtils.newOrchestrator(
builder -> builder
// for ES resiliency tests
.setServerProperty("sonar.search.httpPort", "" + SEARCH_HTTP_PORT)
import org.junit.ClassRule;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
+import util.ItUtils;
-import static util.ItUtils.newOrchestratorBuilder;
+import static util.ItUtils.newOrchestrator;
import static util.ItUtils.pluginArtifact;
import static util.ItUtils.xooPlugin;
public class OrganizationQualityGateSuite {
@ClassRule
- public static final Orchestrator ORCHESTRATOR = newOrchestratorBuilder(
+ public static final Orchestrator ORCHESTRATOR = ItUtils.newOrchestrator(
builder -> builder
// required for notification tests
.setServerProperty("sonar.notifications.delay", "1")
import org.junit.ClassRule;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
+import util.ItUtils;
-import static util.ItUtils.newOrchestratorBuilder;
+import static util.ItUtils.newOrchestrator;
import static util.ItUtils.pluginArtifact;
import static util.ItUtils.xooPlugin;
public class QualityGateSuite {
@ClassRule
- public static final Orchestrator ORCHESTRATOR = newOrchestratorBuilder(
+ public static final Orchestrator ORCHESTRATOR = ItUtils.newOrchestrator(
builder -> builder
// required for notification tests
.setServerProperty("sonar.notifications.delay", "1")
import org.junit.ClassRule;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
+import util.ItUtils;
-import static util.ItUtils.newOrchestratorBuilder;
+import static util.ItUtils.newOrchestrator;
import static util.ItUtils.xooPlugin;
@RunWith(Suite.class)
public class QualityModelSuite {
@ClassRule
- public static final Orchestrator ORCHESTRATOR = newOrchestratorBuilder(
+ public static final Orchestrator ORCHESTRATOR = ItUtils.newOrchestrator(
builder -> builder
.addPlugin(xooPlugin())
import static org.assertj.core.api.Assertions.assertThat;
import static org.sonarqube.tests.Byteman.Process.WEB;
-import static util.ItUtils.newOrchestratorBuilder;
+import static util.ItUtils.newOrchestrator;
public class ActiveRuleEsResilienceTest {
private static final String RULE_ONE_BUG_PER_LINE = "xoo:OneBugIssuePerLine";
static {
byteman = new Byteman();
- orchestrator = newOrchestratorBuilder(
+ orchestrator = ItUtils.newOrchestrator(
builder -> {
byteman.install(builder, WEB);
builder.setServerProperty("sonar.search.recovery.delayInMs", "1000")
import static org.apache.commons.lang.RandomStringUtils.randomAlphanumeric;
import static org.assertj.core.api.Assertions.assertThat;
-import static util.ItUtils.newOrchestratorBuilder;
+import static util.ItUtils.newOrchestrator;
import static util.ItUtils.pluginArtifact;
public class BuiltInQualityProfilesNotificationTest {
@Test
public void does_not_send_mail_if_no_quality_profile_is_updated() throws Exception {
- orchestrator = newOrchestratorBuilder(
+ orchestrator = ItUtils.newOrchestrator(
builder -> builder
.addPlugin(pluginArtifact("foo-plugin-v1"))
.setServerProperty("email.smtp_host.secured", "localhost")
@Test
public void send_mail_if_quality_profile_is_updated() throws Exception {
- orchestrator = newOrchestratorBuilder(
+ orchestrator = ItUtils.newOrchestrator(
builder -> builder
.addPlugin(pluginArtifact("foo-plugin-v1"))
.setServerProperty("sonar.notifications.delay", "1")
@Test
public void do_not_send_mail_if_notifications_are_disabled_in_settings() throws Exception {
- orchestrator = newOrchestratorBuilder(
+ orchestrator = ItUtils.newOrchestrator(
builder -> builder
.addPlugin(pluginArtifact("foo-plugin-v1"))
.setServerProperty("sonar.builtInQualityProfiles.disableNotificationOnUpdate", "true")
import org.apache.commons.io.FileUtils;
import org.junit.After;
import org.junit.Test;
+import util.ItUtils;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.Assert.fail;
-import static util.ItUtils.newOrchestratorBuilder;
+import static util.ItUtils.newOrchestrator;
import static util.ItUtils.pluginArtifact;
public class PluginWithoutBuiltinQualityProfileTest {
@Test
public void should_fail_if_plugin_defines_language_and_no_builtin_qprofile() throws IOException {
- orchestrator = newOrchestratorBuilder(b -> b.addPlugin(pluginArtifact("foo-plugin-without-qprofile")));
+ orchestrator = ItUtils.newOrchestrator(b -> b.addPlugin(pluginArtifact("foo-plugin-without-qprofile")));
try {
orchestrator.start();
import org.sonarqube.ws.Rules;
import org.sonarqube.ws.client.PostRequest;
import org.sonarqube.ws.client.qualityprofiles.SearchRequest;
+import util.ItUtils;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.tuple;
-import static util.ItUtils.newOrchestratorBuilder;
+import static util.ItUtils.newOrchestrator;
import static util.ItUtils.pluginArtifact;
public class QualityProfileUpdateTest {
@Test
// SONAR-10363
public void updating_an_analyzer_must_update_default_quality_profile() {
- orchestrator = newOrchestratorBuilder(
+ orchestrator = ItUtils.newOrchestrator(
builder -> builder
.addPlugin(pluginArtifact("foo-plugin-v1"))
// .setServerProperty("sonar.sonarcloud.enabled", "true"))
import static java.util.Collections.singletonList;
import static org.assertj.core.api.Assertions.assertThat;
import static org.sonarqube.tests.Byteman.Process.WEB;
-import static util.ItUtils.newOrchestratorBuilder;
+import static util.ItUtils.newOrchestrator;
public class RuleEsResilienceTest {
static {
byteman = new Byteman();
- orchestrator = newOrchestratorBuilder(
+ orchestrator = ItUtils.newOrchestrator(
builder -> {
byteman.install(builder, WEB);
builder
import org.sonarqube.ws.Rules;
import org.sonarqube.ws.client.PostRequest;
import org.sonarqube.ws.client.issues.SearchRequest;
+import util.ItUtils;
import static java.util.Collections.singletonList;
import static java.util.stream.Collectors.toSet;
import static org.assertj.core.api.Assertions.assertThat;
-import static util.ItUtils.newOrchestratorBuilder;
+import static util.ItUtils.newOrchestrator;
import static util.ItUtils.pluginArtifact;
import static util.ItUtils.projectDir;
@Test
public void rules_are_re_keyed_when_upgrading_and_downgrading_plugin() {
- orchestrator = newOrchestratorBuilder(
+ orchestrator = ItUtils.newOrchestrator(
builder -> builder
.addPlugin(pluginArtifact("foo-plugin-v1")));
orchestrator.start();
import util.ItUtils;
import static org.assertj.core.api.Assertions.assertThat;
-import static util.ItUtils.newOrchestratorBuilder;
+import static util.ItUtils.newOrchestrator;
import static util.ItUtils.pluginArtifact;
import static util.ItUtils.xooPlugin;
@Test
public void upgrade_analyzer_when_analysis_is_pending_in_compute_engine_queue() throws Exception {
- orchestrator = newOrchestratorBuilder(
+ orchestrator = ItUtils.newOrchestrator(
builder -> builder
.addPlugin(pluginArtifact("blue-green-plugin-v1"))
.addPlugin(xooPlugin()));
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import static util.ItUtils.newAdminWsClient;
-import static util.ItUtils.newOrchestratorBuilder;
+import static util.ItUtils.newOrchestrator;
import static util.ItUtils.newWsClient;
/**
public void restart_in_prod_mode_requires_sysadmin_permission_and_restarts() throws Exception {
// server classloader locks Jar files on Windows
if (!SystemUtils.IS_OS_WINDOWS) {
- orchestrator = newOrchestratorBuilder(
+ orchestrator = ItUtils.newOrchestrator(
builder -> builder
.setOrchestratorProperty("orchestrator.keepWorkspace", "true"));
orchestrator.start();
import static org.junit.Assert.fail;
import static util.ItUtils.locationOf;
import static util.ItUtils.newAdminWsClient;
-import static util.ItUtils.newOrchestratorBuilder;
+import static util.ItUtils.newOrchestrator;
/**
* This class start a new orchestrator on each test case
@Test
public void check_minimal_sonar_version_at_startup() throws Exception {
try {
- orchestrator = newOrchestratorBuilder(
+ orchestrator = ItUtils.newOrchestrator(
builder -> builder
.addPlugin(locationOf(ServerSystemRestartingOrchestrator.class.getResource("/serverSystem/ServerSystemTest/incompatible-plugin-1.0.jar"))));
orchestrator.start();
public void support_install_dir_with_whitespaces() throws Exception {
String dirName = "build/distributions/has space";
FileUtils.deleteDirectory(new File(dirName));
- orchestrator = newOrchestratorBuilder(
+ orchestrator = ItUtils.newOrchestrator(
builder -> builder
.setOrchestratorProperty("orchestrator.workspaceDir", dirName));
orchestrator.start();
// SONAR-4748
@Test
public void should_create_in_temp_folder() throws Exception {
- orchestrator = newOrchestratorBuilder(
+ orchestrator = ItUtils.newOrchestrator(
builder -> builder
.addPlugin(ItUtils.pluginArtifact("server-plugin"))
.setServerProperty("sonar.createTempFiles", "true"));
import org.sonarqube.qa.util.Elasticsearch;
import org.sonarqube.ws.System;
import org.sonarqube.ws.client.WsClient;
+import util.ItUtils;
import static com.google.common.base.Preconditions.checkState;
import static org.assertj.core.api.Assertions.assertThat;
-import static util.ItUtils.newOrchestratorBuilder;
+import static util.ItUtils.newOrchestrator;
import static util.ItUtils.newSystemUserWsClient;
import static util.ItUtils.newWsClient;
import static util.ItUtils.pluginArtifact;
void start(Lock lock) {
checkState(orchestrator == null);
- orchestrator = newOrchestratorBuilder(
+ orchestrator = ItUtils.newOrchestrator(
builder -> builder
.addPlugin(pluginArtifact("server-plugin"))
.setServerProperty("sonar.web.startupLock.path", lock.webFile.getAbsolutePath())
public class SettingsSuite {
@ClassRule
- public static final Orchestrator ORCHESTRATOR = ItUtils.newOrchestratorBuilder(
+ public static final Orchestrator ORCHESTRATOR = ItUtils.newOrchestrator(
builder -> builder
.addPlugin(xooPlugin()));
import org.junit.rules.ExpectedException;
import org.sonarqube.qa.util.pageobjects.EncryptionPage;
import org.sonarqube.qa.util.pageobjects.Navigation;
+import util.ItUtils;
import util.user.UserRule;
import static com.codeborne.selenide.Condition.visible;
import static org.assertj.core.api.Assertions.assertThat;
-import static util.ItUtils.newOrchestratorBuilder;
+import static util.ItUtils.newOrchestrator;
import static util.ItUtils.pluginArtifact;
import static util.ItUtils.projectDir;
import static util.ItUtils.xooPlugin;
@Test
public void test_settings() {
URL secretKeyUrl = getClass().getResource("/settings/SettingsTest/sonar-secret.txt");
- orchestrator = newOrchestratorBuilder(
+ orchestrator = ItUtils.newOrchestrator(
builder -> builder
.addPlugin(pluginArtifact("settings-plugin"))
.addPlugin(pluginArtifact("license-plugin"))
@Test
public void property_relocation() {
- orchestrator = newOrchestratorBuilder(
+ orchestrator = ItUtils.newOrchestrator(
builder -> builder
.addPlugin(pluginArtifact("property-relocation-plugin"))
.addPlugin(xooPlugin())
import org.junit.ClassRule;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
+import util.ItUtils;
-import static util.ItUtils.newOrchestratorBuilder;
+import static util.ItUtils.newOrchestrator;
import static util.ItUtils.xooPlugin;
@RunWith(Suite.class)
public class SourceSuite {
@ClassRule
- public static final Orchestrator ORCHESTRATOR = newOrchestratorBuilder(
+ public static final Orchestrator ORCHESTRATOR = ItUtils.newOrchestrator(
builder -> builder
.addPlugin(xooPlugin())
.addPlugin(MavenLocation.of("org.sonarsource.scm.git", "sonar-scm-git-plugin", "LATEST_RELEASE")));
import org.sonarqube.qa.util.Tester;
import org.sonarqube.ws.Users;
import org.sonarqube.ws.client.users.SearchRequest;
+import util.ItUtils;
import static org.assertj.core.api.Assertions.assertThat;
-import static util.ItUtils.newOrchestratorBuilder;
+import static util.ItUtils.newOrchestrator;
import static util.ItUtils.pluginArtifact;
public class StartupIndexationTest {
pauseFile = temp.newFile();
FileUtils.touch(pauseFile);
- orchestrator = newOrchestratorBuilder(
+ orchestrator = ItUtils.newOrchestrator(
builder -> builder
.setServerProperty("sonar.web.pause.path", pauseFile.getAbsolutePath())
.addPlugin(pluginArtifact("wait-at-platform-level4-plugin"))
import org.junit.rules.RuleChain;
import org.sonarqube.qa.util.Tester;
import org.sonarqube.ws.client.GetRequest;
+import util.ItUtils;
import static org.assertj.core.api.Assertions.assertThat;
import static util.ItUtils.jsonToMap;
-import static util.ItUtils.newOrchestratorBuilder;
+import static util.ItUtils.newOrchestrator;
import static util.ItUtils.xooPlugin;
public class TelemetryOptOutTest {
public static MockWebServer server = new MockWebServer();
- private static Orchestrator orchestrator = newOrchestratorBuilder(
+ private static Orchestrator orchestrator = ItUtils.newOrchestrator(
builder -> builder
.addPlugin(xooPlugin())
.setServerProperty("sonar.telemetry.enable", "false")
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.tuple;
import static util.ItUtils.jsonToMap;
-import static util.ItUtils.newOrchestratorBuilder;
+import static util.ItUtils.newOrchestrator;
import static util.ItUtils.runProjectAnalysis;
import static util.ItUtils.xooPlugin;
@Test
public void sent_telemetry_data() throws Exception {
telemetryServer.enqueue(new MockResponse().setResponseCode(200));
- orchestrator = newOrchestratorBuilder(
+ orchestrator = ItUtils.newOrchestrator(
builder -> builder
.addPlugin(xooPlugin())
.setServerProperty("sonar.telemetry.url", telemetryServer.url("").toString())
@Test
public void does_not_send_telemetry_data_right_away_by_Default() {
- orchestrator = newOrchestratorBuilder(
+ orchestrator = ItUtils.newOrchestrator(
builder -> builder
.addPlugin(xooPlugin())
.setServerProperty("sonar.telemetry.url", telemetryServer.url("").toString()));
import org.junit.ClassRule;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
+import util.ItUtils;
-import static util.ItUtils.newOrchestratorBuilder;
+import static util.ItUtils.newOrchestrator;
import static util.ItUtils.xooPlugin;
@RunWith(Suite.class)
public class TestSuite {
@ClassRule
- public static final Orchestrator ORCHESTRATOR = newOrchestratorBuilder(
+ public static final Orchestrator ORCHESTRATOR = ItUtils.newOrchestrator(
builder -> builder
.addPlugin(xooPlugin()));
import org.junit.ClassRule;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
+import util.ItUtils;
-import static util.ItUtils.newOrchestratorBuilder;
+import static util.ItUtils.newOrchestrator;
import static util.ItUtils.pluginArtifact;
import static util.ItUtils.xooPlugin;
public class UiSuite {
@ClassRule
- public static final Orchestrator ORCHESTRATOR = newOrchestratorBuilder(
+ public static final Orchestrator ORCHESTRATOR = ItUtils.newOrchestrator(
builder -> builder
.addPlugin(xooPlugin())
// Used in UiExtensionsTest
import org.sonarqube.ws.client.WsClientFactories;
import org.sonarqube.ws.client.WsResponse;
import org.sonarqube.ws.client.measures.ComponentRequest;
+import util.ItUtils;
import static com.codeborne.selenide.Condition.hasText;
import static com.codeborne.selenide.Selenide.$;
import static java.lang.Integer.parseInt;
import static java.util.Collections.singletonList;
import static org.assertj.core.api.Assertions.assertThat;
-import static util.ItUtils.newOrchestratorBuilder;
+import static util.ItUtils.newOrchestrator;
public class UpgradeTest {
}
private void startAndUpgradeDevServer() {
- orchestrator = newOrchestratorBuilder(
+ orchestrator = ItUtils.newOrchestrator(
builder -> builder
.setOrchestratorProperty("orchestrator.keepDatabase", "true")
.keepBundledPlugins()
import org.sonarqube.ws.Users.CreateWsResponse.User;
import org.sonarqube.ws.Users.SearchWsResponse;
import org.sonarqube.ws.client.users.SearchRequest;
+import util.ItUtils;
import static java.lang.String.format;
import static java.nio.charset.StandardCharsets.UTF_8;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.groups.Tuple.tuple;
import static util.ItUtils.call;
-import static util.ItUtils.newOrchestratorBuilder;
+import static util.ItUtils.newOrchestrator;
/**
* Test authentication using HTTP headers.
private static final String GROUPS_HEADER = "H-Groups";
@ClassRule
- public static final Orchestrator orchestrator = newOrchestratorBuilder(
+ public static final Orchestrator orchestrator = ItUtils.newOrchestrator(
builder -> builder
.setServerProperty("sonar.web.sso.enable", "true")
.setServerProperty("sonar.web.sso.loginHeader", LOGIN_HEADER)
import util.ItUtils;
import static org.assertj.core.api.Assertions.assertThat;
-import static util.ItUtils.newOrchestratorBuilder;
+import static util.ItUtils.newOrchestrator;
public class OnboardingTest {
private static final String ONBOARDING_TUTORIAL_SHOW_TO_NEW_USERS = "sonar.onboardingTutorial.showToNewUsers";
@ClassRule
- public static final Orchestrator orchestrator = newOrchestratorBuilder();
+ public static final Orchestrator orchestrator = ItUtils.newOrchestrator();
@Rule
public Tester tester = new Tester(orchestrator).disableOrganizations();
import org.sonarqube.ws.Users.SearchWsResponse.User;
import org.sonarqube.ws.client.users.ChangePasswordRequest;
import org.sonarqube.ws.client.users.SearchRequest;
+import util.ItUtils;
import static java.util.Arrays.asList;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.groups.Tuple.tuple;
import static util.ItUtils.expectHttpError;
-import static util.ItUtils.newOrchestratorBuilder;
+import static util.ItUtils.newOrchestrator;
import static util.ItUtils.pluginArtifact;
/**
public ExpectedException thrown = ExpectedException.none();
@ClassRule
- public static final Orchestrator orchestrator = newOrchestratorBuilder(
+ public static final Orchestrator orchestrator = ItUtils.newOrchestrator(
builder -> builder
.addPlugin(pluginArtifact("security-plugin"))
.setServerProperty("sonar.security.realm", "FakeRealm"));
import org.junit.ClassRule;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
+import util.ItUtils;
-import static util.ItUtils.newOrchestratorBuilder;
+import static util.ItUtils.newOrchestrator;
import static util.ItUtils.pluginArtifact;
import static util.ItUtils.xooPlugin;
public class SonarCloudUserSuite {
@ClassRule
- public static final Orchestrator ORCHESTRATOR = newOrchestratorBuilder(
+ public static final Orchestrator ORCHESTRATOR = ItUtils.newOrchestrator(
builder -> builder
.addPlugin(xooPlugin())
import static org.assertj.core.api.Assertions.assertThat;
import static org.sonarqube.tests.Byteman.Process.WEB;
import static util.ItUtils.expectHttpError;
-import static util.ItUtils.newOrchestratorBuilder;
+import static util.ItUtils.newOrchestrator;
public class UserEsResilienceTest {
static {
byteman = new Byteman();
- orchestrator = newOrchestratorBuilder(
+ orchestrator = ItUtils.newOrchestrator(
builder -> {
byteman.install(builder, WEB);
builder
import org.junit.ClassRule;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
+import util.ItUtils;
-import static util.ItUtils.newOrchestratorBuilder;
+import static util.ItUtils.newOrchestrator;
import static util.ItUtils.pluginArtifact;
import static util.ItUtils.xooPlugin;
public class UserSuite {
@ClassRule
- public static final Orchestrator ORCHESTRATOR = newOrchestratorBuilder(
+ public static final Orchestrator ORCHESTRATOR = ItUtils.newOrchestrator(
builder -> builder
.addPlugin(xooPlugin())
import org.junit.ClassRule;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
+import util.ItUtils;
-import static util.ItUtils.newOrchestratorBuilder;
+import static util.ItUtils.newOrchestrator;
import static util.ItUtils.xooPlugin;
@RunWith(Suite.class)
public class WebhooksSuite {
@ClassRule
- public static final Orchestrator ORCHESTRATOR = newOrchestratorBuilder(
+ public static final Orchestrator ORCHESTRATOR = ItUtils.newOrchestrator(
builder -> builder
.addPlugin(xooPlugin())
private ItUtils() {
}
- public static Orchestrator newOrchestratorBuilder() {
- return newOrchestratorBuilder(t -> {}, server -> {});
+ public static Orchestrator newOrchestrator() {
+ return newOrchestrator(t -> {}, server -> {});
}
- public static Orchestrator newOrchestratorBuilder(Consumer<OrchestratorBuilder> beforeInstall) {
- return newOrchestratorBuilder(beforeInstall, server -> {
+ public static Orchestrator newOrchestrator(Consumer<OrchestratorBuilder> beforeInstall) {
+ return newOrchestrator(beforeInstall, server -> {
});
}
- public static Orchestrator newOrchestratorBuilder(Consumer<OrchestratorBuilder> beforeInstall, Consumer<Server> afterInstall) {
+ public static Orchestrator newOrchestrator(Consumer<OrchestratorBuilder> beforeInstall, Consumer<Server> afterInstall) {
OrchestratorBuilder builder = Orchestrator.builderEnv()
.setEdition(COMMUNITY)
// reduce memory for Elasticsearch