From: Eric Hartmann Date: Mon, 11 Dec 2017 11:14:55 +0000 (+0100) Subject: SONAR-10134 Add check that built-in qg is not deleted X-Git-Tag: 7.0-RC1~120 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=3365d9c48f13c2d47a5d4e119a53a61dc5eb6ce8;p=sonarqube.git SONAR-10134 Add check that built-in qg is not deleted --- diff --git a/server/sonar-server/src/test/java/org/sonar/server/organization/ws/DeleteActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/organization/ws/DeleteActionTest.java index a03fce3d006..e8da7431e3d 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/organization/ws/DeleteActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/organization/ws/DeleteActionTest.java @@ -364,6 +364,9 @@ public class DeleteActionTest { assertThat(db.select("select uuid as \"uuid\" from quality_gates")) .extracting(row -> (String) row.get("uuid")) .containsOnly(qualityGateInOtherOrg.getUuid(), qualityGateFinder.getBuiltInQualityGate(db.getSession()).getUuid()); + + // Built-in quality gate must not be destroyed + assertThat(qualityGateFinder.getBuiltInQualityGate(db.getSession())).isNotNull(); assertThat(db.select("select organization_uuid as \"organizationUuid\" from org_quality_gates")) .extracting(row -> (String) row.get("organizationUuid")) .containsOnly(otherOrg.getUuid());