summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2018-06-05 19:58:47 +0200
committerSonarTech <sonartech@sonarsource.com>2018-06-12 20:21:02 +0200
commit7391d7cca849fbc5285cb1fa1e7017dae534bef4 (patch)
tree650ef3cf8a2cfa04eb3e643dbc819144ff013cdf
parentbc77880000972d94d4bc273f76535e83a938125b (diff)
downloadsonarqube-7391d7cca849fbc5285cb1fa1e7017dae534bef4.tar.gz
sonarqube-7391d7cca849fbc5285cb1fa1e7017dae534bef4.zip
SONAR-10689 use enterprise edition in IT PluginsTest
-rw-r--r--build.gradle2
-rw-r--r--tests/src/test/java/org/sonarqube/tests/plugins/PluginsTest.java21
2 files changed, 18 insertions, 5 deletions
diff --git a/build.gradle b/build.gradle
index 0825e7214cd..da0ddc26b2a 100644
--- a/build.gradle
+++ b/build.gradle
@@ -211,7 +211,7 @@ subprojects {
dependency 'org.postgresql:postgresql:42.2.2'
dependency 'org.reflections:reflections:0.9.9'
dependency 'org.simpleframework:simple:4.1.21'
- dependency 'org.sonarsource.orchestrator:sonar-orchestrator:3.19.0.1623'
+ dependency 'org.sonarsource.orchestrator:sonar-orchestrator:3.19.0.1627'
dependency('org.sonarsource:sonar-persistit:3.3.2') {
exclude 'commons-logging:commons-logging'
}
diff --git a/tests/src/test/java/org/sonarqube/tests/plugins/PluginsTest.java b/tests/src/test/java/org/sonarqube/tests/plugins/PluginsTest.java
index 137ed11e92d..2a6fd092a0e 100644
--- a/tests/src/test/java/org/sonarqube/tests/plugins/PluginsTest.java
+++ b/tests/src/test/java/org/sonarqube/tests/plugins/PluginsTest.java
@@ -23,12 +23,16 @@ import com.sonar.orchestrator.Orchestrator;
import com.sonar.orchestrator.OrchestratorBuilder;
import com.sonar.orchestrator.build.BuildResult;
import com.sonar.orchestrator.build.SonarScanner;
+import com.sonar.orchestrator.locator.FileLocation;
+import com.sonar.orchestrator.locator.Location;
import com.sonar.orchestrator.locator.MavenLocation;
import com.sonar.orchestrator.locator.URLLocation;
+import java.io.File;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Arrays;
import java.util.List;
+import org.apache.commons.lang.StringUtils;
import org.junit.BeforeClass;
import org.junit.Rule;
import org.junit.Test;
@@ -52,8 +56,8 @@ import org.sonarqube.tests.plugins.checks.SwiftCheck;
import org.sonarqube.tests.plugins.checks.Validation;
import org.sonarqube.tests.plugins.checks.WebCheck;
+import static com.sonar.orchestrator.container.Edition.ENTERPRISE;
import static org.assertj.core.api.Assertions.fail;
-import static util.ItUtils.newOrchestratorBuilder;
/**
* Verify that latest releases of the plugins available in update center
@@ -82,8 +86,18 @@ public class PluginsTest {
@BeforeClass
public static void startServer() throws MalformedURLException {
- OrchestratorBuilder builder = newOrchestratorBuilder();
-
+ OrchestratorBuilder builder = Orchestrator.builderEnv()
+ .setEdition(ENTERPRISE)
+ .setServerProperty("sonar.search.javaOpts", "-Xms128m -Xmx128m")
+ .setOrchestratorProperty("orchestrator.workspaceDir", "build/it")
+ .activateLicense();
+ String version = System.getProperty("sonar.runtimeVersion");
+ if (StringUtils.isEmpty(version)) {
+ Location zip = FileLocation.byWildcardMavenFilename(new File("../private/edition-enterprise/build/distributions"), "sonarqube-enterprise-*.zip");
+ builder.setZipLocation(zip);
+ } else {
+ builder.setSonarVersion(version);
+ }
installPlugin(builder, "com.sonarsource.abap", "sonar-abap-plugin");
installPlugin(builder, "org.codehaus.sonar-plugins.android", "sonar-android-plugin");
installPlugin(builder, "org.sonarsource.auth.bitbucket", "sonar-auth-bitbucket-plugin");
@@ -117,7 +131,6 @@ public class PluginsTest {
installPlugin(builder, "com.sonarsource.vbnet", "sonar-vbnet-plugin");
installPlugin(builder, "org.sonarsource.web", "sonar-web-plugin");
installPlugin(builder, "org.sonarsource.xml", "sonar-xml-plugin");
- installPlugin(builder, "com.sonarsource.license", "sonar-dev-license-plugin");
builder.activateLicense();