From 3365d9c48f13c2d47a5d4e119a53a61dc5eb6ce8 Mon Sep 17 00:00:00 2001 From: Eric Hartmann Date: Mon, 11 Dec 2017 12:14:55 +0100 Subject: [PATCH] SONAR-10134 Add check that built-in qg is not deleted --- .../org/sonar/server/organization/ws/DeleteActionTest.java | 3 +++ 1 file changed, 3 insertions(+) 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()); -- 2.39.5