aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-db-dao/src
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@sonarsource.com>2017-12-07 17:05:12 +0100
committerJulien Lancelot <julien.lancelot@sonarsource.com>2017-12-14 17:03:35 +0100
commit03c66a89924660cc0ee053e9dd73d061165a30d9 (patch)
tree25598058e994b12d3c39164fca68d015cf614f13 /server/sonar-db-dao/src
parent67ed6ff49b43f30db67c87345b0cf91e2cfa0127 (diff)
downloadsonarqube-03c66a89924660cc0ee053e9dd73d061165a30d9.tar.gz
sonarqube-03c66a89924660cc0ee053e9dd73d061165a30d9.zip
SONAR-10136 Set built-in QG as default of new organization
Diffstat (limited to 'server/sonar-db-dao/src')
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/DbTester.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/DbTester.java b/server/sonar-db-dao/src/test/java/org/sonar/db/DbTester.java
index 7e7870e09ea..e0d9e2322a2 100644
--- a/server/sonar-db-dao/src/test/java/org/sonar/db/DbTester.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/DbTester.java
@@ -30,6 +30,7 @@ import org.apache.commons.lang.StringUtils;
import org.picocontainer.containers.TransientPicoContainer;
import org.sonar.api.utils.System2;
import org.sonar.core.util.SequenceUuidFactory;
+import org.sonar.core.util.Uuids;
import org.sonar.db.component.ComponentDbTester;
import org.sonar.db.event.EventDbTester;
import org.sonar.db.favorite.FavoriteDbTester;
@@ -156,7 +157,7 @@ public class DbTester extends AbstractDbTester<TestDb> {
db.start();
db.truncateTables();
initDbClient();
- // TODO : insertBuiltInQualityGateIfTableExists();
+ insertBuiltInQualityGateIfTableExists();
if (!disableDefaultOrganization) {
insertDefaultOrganization();
@@ -168,6 +169,7 @@ public class DbTester extends AbstractDbTester<TestDb> {
try (DbSession dbSession = db.getMyBatis().openSession(false)) {
if (DatabaseUtils.tableExists("quality_gates", dbSession.getConnection())) {
builtInQualityGate = new QualityGateDto()
+ .setUuid(Uuids.createFast())
.setName("Sonar way")
.setBuiltIn(true)
.setCreatedAt(new Date(system2.now()))