]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-12761 Update system health web service description
authoralain <108417558+alain-kermis-sonarsource@users.noreply.github.com>
Wed, 7 Sep 2022 12:58:33 +0000 (14:58 +0200)
committersonartech <sonartech@sonarsource.com>
Wed, 7 Sep 2022 20:03:11 +0000 (20:03 +0000)
server/sonar-webserver-webapi/src/main/java/org/sonar/server/platform/ws/HealthActionSupport.java
server/sonar-webserver-webapi/src/main/resources/org/sonar/server/platform/ws/example-health.json
server/sonar-webserver-webapi/src/test/java/org/sonar/server/platform/ws/HealthActionTest.java

index 05697c98be6735ee4d6a62396f8e7e6f4c5c8276..66d7a4e7d7cb19a323eeb54715a9f16765766c6f 100644 (file)
@@ -45,7 +45,7 @@ public class HealthActionSupport {
   void define(WebService.NewController controller, SystemWsAction handler) {
     controller.createAction("health")
       .setDescription("Provide health status of SonarQube." +
-        "<p>Require 'Administer System' permission or authentication with passcode</p>" +
+        "<p>Although global health is calculated based on both application and search nodes, detailed information is returned only for application nodes.</p>" +
         "<p> " +
         " <ul>" +
         " <li>GREEN: SonarQube is fully operational</li>" +
index 28c8b37cc84c94a2e0d97c621bf1d1a182597065..de82da9645dcafc0ab3ce3f65c621209a44b3ef0 100644 (file)
           "message": "bar"
         }
       ]
-    },
-    {
-      "name": "es-1",
-      "type": "SEARCH",
-      "host": "192.168.1.3",
-      "port": 999,
-      "startedAt": "2015-08-13T23:34:59+0200",
-      "health": "GREEN",
-      "causes": []
-    },
-    {
-      "name": "es-2",
-      "type": "SEARCH",
-      "host": "192.168.1.4",
-      "port": 999,
-      "startedAt": "2015-08-13T23:34:59+0200",
-      "health": "GREEN",
-      "causes": []
-    },
-    {
-      "name": "es-3",
-      "type": "SEARCH",
-      "host": "192.168.1.5",
-      "port": 999,
-      "startedAt": "2015-08-13T23:34:59+0200",
-      "health": "GREEN",
-      "causes": []
     }
   ]
 }
index ed79a2576b56fef50a881b1b84a6fea3a1d3518f..76d47596723df4244e542e28d04cd78a82f9ea27 100644 (file)
@@ -166,39 +166,6 @@ public class HealthActionTest {
                   .setPort(999)
                   .setStartedAt(time)
                   .build())
-              .build(),
-            newNodeHealthBuilder()
-              .setStatus(NodeHealth.Status.GREEN)
-              .setDetails(
-                newNodeDetailsBuilder()
-                  .setName("es-1")
-                  .setType(NodeDetails.Type.SEARCH)
-                  .setHost("192.168.1.3")
-                  .setPort(999)
-                  .setStartedAt(time)
-                  .build())
-              .build(),
-            newNodeHealthBuilder()
-              .setStatus(NodeHealth.Status.GREEN)
-              .setDetails(
-                newNodeDetailsBuilder()
-                  .setName("es-2")
-                  .setType(NodeDetails.Type.SEARCH)
-                  .setHost("192.168.1.4")
-                  .setPort(999)
-                  .setStartedAt(time)
-                  .build())
-              .build(),
-            newNodeHealthBuilder()
-              .setStatus(NodeHealth.Status.GREEN)
-              .setDetails(
-                newNodeDetailsBuilder()
-                  .setName("es-3")
-                  .setType(NodeDetails.Type.SEARCH)
-                  .setHost("192.168.1.5")
-                  .setPort(999)
-                  .setStartedAt(time)
-                  .build())
               .build())));
 
     TestResponse response = underTest.newRequest().execute();