]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-10134 Add check that built-in qg is not deleted
authorEric Hartmann <hartmann.eric@gmail.com>
Mon, 11 Dec 2017 11:14:55 +0000 (12:14 +0100)
committerJulien Lancelot <julien.lancelot@sonarsource.com>
Thu, 14 Dec 2017 16:03:35 +0000 (17:03 +0100)
server/sonar-server/src/test/java/org/sonar/server/organization/ws/DeleteActionTest.java

index a03fce3d006655331450b9e170469a3a7706838e..e8da7431e3d8c745c4e0dca0762ac3a0874b8610 100644 (file)
@@ -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());