aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-db-core
diff options
context:
space:
mode:
authorSébastien Lesaint <sebastien.lesaint@sonarsource.com>2019-05-20 16:39:42 +0200
committerSonarTech <sonartech@sonarsource.com>2019-05-23 20:21:09 +0200
commit1f3ee626c1faa8f32aa15ce8dcc0ed333e6e57aa (patch)
tree7f8832a9e91b4be6d726fb5bbfc5df6f491a1abb /server/sonar-db-core
parent49451f5a6eb77a234072584192eaa576c78e3390 (diff)
downloadsonarqube-1f3ee626c1faa8f32aa15ce8dcc0ed333e6e57aa.tar.gz
sonarqube-1f3ee626c1faa8f32aa15ce8dcc0ed333e6e57aa.zip
SONAR-11264 enforce ES boostrap checks on all editions
Diffstat (limited to 'server/sonar-db-core')
-rw-r--r--server/sonar-db-core/src/test/java/org/sonar/db/CreateDb.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/server/sonar-db-core/src/test/java/org/sonar/db/CreateDb.java b/server/sonar-db-core/src/test/java/org/sonar/db/CreateDb.java
index 0106b571634..b81ea66aa01 100644
--- a/server/sonar-db-core/src/test/java/org/sonar/db/CreateDb.java
+++ b/server/sonar-db-core/src/test/java/org/sonar/db/CreateDb.java
@@ -26,6 +26,7 @@ import com.sonar.orchestrator.locator.Location;
import org.apache.commons.lang.StringUtils;
import java.io.File;
+import org.sonar.api.utils.log.Loggers;
import static com.sonar.orchestrator.container.Edition.COMMUNITY;
@@ -42,6 +43,7 @@ public class CreateDb {
builder.setSonarVersion(version);
}
builder.setOrchestratorProperty("orchestrator.workspaceDir", "build/it");
+ builder.setServerProperty("sonar.es.bootstrap.checks.disable", areEsBootStrapChecksDisabled() ? "true" : "false");
Orchestrator orchestrator = builder.build();
try {
@@ -50,4 +52,12 @@ public class CreateDb {
orchestrator.stop();
}
}
+
+ private static boolean areEsBootStrapChecksDisabled() {
+ boolean flag = "true".equalsIgnoreCase(System.getenv("CIRRUS_CI"));
+ if (flag) {
+ Loggers.get(CreateDb.class).info("Running on Cirrus: ES Bootstrap checks are disabled");
+ }
+ return flag;
+ }
}