From: alain <108417558+alain-kermis-sonarsource@users.noreply.github.com>
Date: Wed, 7 Sep 2022 12:58:33 +0000 (+0200)
Subject: SONAR-12761 Update system health web service description
X-Git-Tag: 9.7.0.61563~252
X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c36ac5942fd6e1de044957ac75d8574716bdeb16;p=sonarqube.git
SONAR-12761 Update system health web service description
---
diff --git a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/platform/ws/HealthActionSupport.java b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/platform/ws/HealthActionSupport.java
index 05697c98be6..66d7a4e7d7c 100644
--- a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/platform/ws/HealthActionSupport.java
+++ b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/platform/ws/HealthActionSupport.java
@@ -45,7 +45,7 @@ public class HealthActionSupport {
void define(WebService.NewController controller, SystemWsAction handler) {
controller.createAction("health")
.setDescription("Provide health status of SonarQube." +
- "
Require 'Administer System' permission or authentication with passcode
" +
+ "Although global health is calculated based on both application and search nodes, detailed information is returned only for application nodes.
" +
" " +
"
" +
" - GREEN: SonarQube is fully operational
" +
diff --git a/server/sonar-webserver-webapi/src/main/resources/org/sonar/server/platform/ws/example-health.json b/server/sonar-webserver-webapi/src/main/resources/org/sonar/server/platform/ws/example-health.json
index 28c8b37cc84..de82da9645d 100644
--- a/server/sonar-webserver-webapi/src/main/resources/org/sonar/server/platform/ws/example-health.json
+++ b/server/sonar-webserver-webapi/src/main/resources/org/sonar/server/platform/ws/example-health.json
@@ -31,33 +31,6 @@
"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": []
}
]
}
diff --git a/server/sonar-webserver-webapi/src/test/java/org/sonar/server/platform/ws/HealthActionTest.java b/server/sonar-webserver-webapi/src/test/java/org/sonar/server/platform/ws/HealthActionTest.java
index ed79a2576b5..76d47596723 100644
--- a/server/sonar-webserver-webapi/src/test/java/org/sonar/server/platform/ws/HealthActionTest.java
+++ b/server/sonar-webserver-webapi/src/test/java/org/sonar/server/platform/ws/HealthActionTest.java
@@ -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();