From c36ac5942fd6e1de044957ac75d8574716bdeb16 Mon Sep 17 00:00:00 2001
From: alain <108417558+alain-kermis-sonarsource@users.noreply.github.com>
Date: Wed, 7 Sep 2022 14:58:33 +0200
Subject: [PATCH] SONAR-12761 Update system health web service description
---
.../platform/ws/HealthActionSupport.java | 2 +-
.../server/platform/ws/example-health.json | 27 ---------------
.../server/platform/ws/HealthActionTest.java | 33 -------------------
3 files changed, 1 insertion(+), 61 deletions(-)
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();
--
2.39.5