diff options
author | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2015-09-22 16:24:33 +0200 |
---|---|---|
committer | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2015-09-25 12:14:54 +0200 |
commit | 0d7c71ee21a8d77948523fa1d331a12f61637a30 (patch) | |
tree | 0f7677d394f37927872653ed9ea0ac0b1eea5596 | |
parent | e9584a571a9c09ad5cc5a11f01525bccf48f3e0b (diff) | |
download | sonarqube-0d7c71ee21a8d77948523fa1d331a12f61637a30.tar.gz sonarqube-0d7c71ee21a8d77948523fa1d331a12f61637a30.zip |
SONAR-6143 add new_sqale_debt_ratio to default quality gate
2 files changed, 2 insertions, 1 deletions
diff --git a/server/sonar-server/src/main/java/org/sonar/server/qualitygate/RegisterQualityGates.java b/server/sonar-server/src/main/java/org/sonar/server/qualitygate/RegisterQualityGates.java index b0794261526..8231be32e31 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/qualitygate/RegisterQualityGates.java +++ b/server/sonar-server/src/main/java/org/sonar/server/qualitygate/RegisterQualityGates.java @@ -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); diff --git a/server/sonar-server/src/test/java/org/sonar/server/qualitygate/RegisterQualityGatesTest.java b/server/sonar-server/src/test/java/org/sonar/server/qualitygate/RegisterQualityGatesTest.java index 0b41a677775..02bc0868677 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/qualitygate/RegisterQualityGatesTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/qualitygate/RegisterQualityGatesTest.java @@ -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(); |