From a42eb5b4853a8ae8349e5348a9e179c2aec0e70a Mon Sep 17 00:00:00 2001 From: Jacek Date: Tue, 27 Sep 2022 10:26:29 +0200 Subject: [PATCH] SONAR-17194 Remove 'statistics' from response example of api/system/info --- .../server/platform/ws/info-example.json | 24 ------------------- .../server/platform/ws/InfoActionTest.java | 8 +++---- 2 files changed, 4 insertions(+), 28 deletions(-) diff --git a/server/sonar-webserver-webapi/src/main/resources/org/sonar/server/platform/ws/info-example.json b/server/sonar-webserver-webapi/src/main/resources/org/sonar/server/platform/ws/info-example.json index f7bb42019c2..a7f679e72e6 100644 --- a/server/sonar-webserver-webapi/src/main/resources/org/sonar/server/platform/ws/info-example.json +++ b/server/sonar-webserver-webapi/src/main/resources/org/sonar/server/platform/ws/info-example.json @@ -190,29 +190,5 @@ "Pool Max Wait (ms)": 5000, "Pool Remove Abandoned": false, "Pool Remove Abandoned Timeout (seconds)": 300 - }, - "Statistics": { - "id": "AU-TpxcB-iU5OvuD2FL7", - "version": "5.1", - "plugins": { - "scmgit": "1.0-RC1", - "findbugs": "3.1", - "scmsvn": "1.0-RC1", - "java": "2.9.1" - }, - "userCount": 3, - "projectCount": 2, - "lines": 500, - "ncloc": 300, - "projectCountByLanguage": { - "java": 2, - "kotlin": 1, - "js": 1 - }, - "nclocByLanguage": { - "java": 500, - "kotlin": 2500, - "js": 50 - } } } diff --git a/server/sonar-webserver-webapi/src/test/java/org/sonar/server/platform/ws/InfoActionTest.java b/server/sonar-webserver-webapi/src/test/java/org/sonar/server/platform/ws/InfoActionTest.java index 3b29eea438f..024ddacf6e6 100644 --- a/server/sonar-webserver-webapi/src/test/java/org/sonar/server/platform/ws/InfoActionTest.java +++ b/server/sonar-webserver-webapi/src/test/java/org/sonar/server/platform/ws/InfoActionTest.java @@ -32,13 +32,13 @@ import static org.assertj.core.api.Assertions.assertThatThrownBy; public class InfoActionTest { @Rule - public UserSessionRule userSessionRule = UserSessionRule.standalone() + public final UserSessionRule userSessionRule = UserSessionRule.standalone() .logIn("login") .setName("name"); - private SystemInfoWriter jsonWriter = json -> json.prop("key", "value"); - private InfoAction underTest = new InfoAction(userSessionRule, jsonWriter); - private WsActionTester ws = new WsActionTester(underTest); + private final SystemInfoWriter jsonWriter = json -> json.prop("key", "value"); + private final InfoAction underTest = new InfoAction(userSessionRule, jsonWriter); + private final WsActionTester ws = new WsActionTester(underTest); @Test public void test_definition() { -- 2.39.5