]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-6143 add new_sqale_debt_ratio to default quality gate 529/head
authorSébastien Lesaint <sebastien.lesaint@sonarsource.com>
Tue, 22 Sep 2015 14:24:33 +0000 (16:24 +0200)
committerSébastien Lesaint <sebastien.lesaint@sonarsource.com>
Fri, 25 Sep 2015 10:14:54 +0000 (12:14 +0200)
server/sonar-server/src/main/java/org/sonar/server/qualitygate/RegisterQualityGates.java
server/sonar-server/src/test/java/org/sonar/server/qualitygate/RegisterQualityGatesTest.java

index b079426152613c975f2a4b1b6541e2169357d7f1..8231be32e31c4c2c735bd0d76f63ebba92014b88 100644 (file)
@@ -59,6 +59,7 @@ public class RegisterQualityGates implements Startable {
     QualityGateDto builtin = qualityGates.create(BUILTIN_QUALITY_GATE);
     qualityGates.createCondition(builtin.getId(), CoreMetrics.BLOCKER_VIOLATIONS_KEY, QualityGateConditionDto.OPERATOR_GREATER_THAN, null, "0", null);
     qualityGates.createCondition(builtin.getId(), CoreMetrics.CRITICAL_VIOLATIONS_KEY, QualityGateConditionDto.OPERATOR_GREATER_THAN, null, "0", 3);
+    qualityGates.createCondition(builtin.getId(), CoreMetrics.NEW_SQALE_DEBT_RATIO_KEY, QualityGateConditionDto.OPERATOR_GREATER_THAN, null, "5", 3);
     qualityGates.createCondition(builtin.getId(), CoreMetrics.TEST_ERRORS_KEY, QualityGateConditionDto.OPERATOR_GREATER_THAN, null, "0", null);
     qualityGates.createCondition(builtin.getId(), CoreMetrics.TEST_FAILURES_KEY, QualityGateConditionDto.OPERATOR_GREATER_THAN, null, "0", null);
     qualityGates.createCondition(builtin.getId(), CoreMetrics.NEW_COVERAGE_KEY, QualityGateConditionDto.OPERATOR_LESS_THAN, null, "80", 3);
index 0b41a6777755773aaf06ba94482595081993a3ca..02bc0868677d2798bce8531e03eef2b00ba25d25 100644 (file)
@@ -59,7 +59,7 @@ public class RegisterQualityGatesTest {
 
     verify(templateDao).countByTypeAndKey(templateType, templateName);
     verify(qualityGates).create(templateName);
-    verify(qualityGates, times(8)).createCondition(anyLong(), anyString(), anyString(), anyString(), anyString(), anyInt());
+    verify(qualityGates, times(9)).createCondition(anyLong(), anyString(), anyString(), anyString(), anyString(), anyInt());
     ArgumentCaptor<LoadedTemplateDto> templateArg = ArgumentCaptor.forClass(LoadedTemplateDto.class);
     verify(templateDao).insert(templateArg.capture());
     LoadedTemplateDto template = templateArg.getValue();