]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-5716 drop documentation of api/server/system
authorSimon Brandhof <simon.brandhof@sonarsource.com>
Mon, 23 Feb 2015 17:48:51 +0000 (18:48 +0100)
committerSimon Brandhof <simon.brandhof@sonarsource.com>
Mon, 23 Feb 2015 17:48:51 +0000 (18:48 +0100)
server/sonar-server/src/main/java/org/sonar/server/platform/ws/ServerWs.java
server/sonar-server/src/main/resources/org/sonar/server/platform/ws/example-system.json [deleted file]
server/sonar-server/src/test/java/org/sonar/server/platform/ws/ServerWsTest.java

index b6e8ddf66f38a4c786f633fa0f740928af23cf96..f2c5a591c0a0633a992c4001237899ed9fee810e 100644 (file)
@@ -33,7 +33,6 @@ public class ServerWs implements WebService {
       .setSince("2.10");
 
     defineIndexAction(controller);
-    defineSystemAction(controller);
     defineSetupAction(controller);
 
     controller.done();
@@ -55,16 +54,6 @@ public class ServerWs implements WebService {
     RailsHandler.addFormatParam(action);
   }
 
-  private void defineSystemAction(NewController controller) {
-    NewAction action = controller.createAction("system")
-      .setDescription("Get the system properties, server info (Java, OS), database configuration, JVM statistics and installed plugins. Requires Administer System permission")
-      .setSince("2.10")
-      .setHandler(RailsHandler.INSTANCE)
-      .setResponseExample(Resources.getResource(this.getClass(), "example-system.json"));
-
-    RailsHandler.addFormatParam(action);
-  }
-
   private void defineSetupAction(NewController controller) {
     NewAction action = controller.createAction("setup")
       .setDescription("Upgrade the SonarQube database")
diff --git a/server/sonar-server/src/main/resources/org/sonar/server/platform/ws/example-system.json b/server/sonar-server/src/main/resources/org/sonar/server/platform/ws/example-system.json
deleted file mode 100644 (file)
index dadcadb..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-[
-  {
-    "system_info": {
-      "System date": "Wed Oct 10 19:15:20 CEST 2012",
-      "JVM Vendor": "Sun Microsystems Inc.",
-      "JVM Name": "Java HotSpot(TM) Client VM"
-    },
-    "system_statistics": {
-      "Total Memory": "316 MB",
-      "Free Memory": "195 MB"
-    },
-    "sonar_info": {
-      "Version": "4.3",
-      "Started at": "Mon May 05 09:06:52 CEST 2014",
-      "Database": "PostgreSQL 9.1.9"
-    },
-    "sonar_plugins": {
-      "JaCoCo": "2.1",
-      "Java": "2.1"
-    },
-    "system_properties": {
-      "LANG": "en_US.UTF-8",
-      "LC_ALL": "en_US.UTF-8",
-      "LC_CTYPE": "UTF-8"
-    }
-  }
-]
index 2328a9ac4350233b5064a15d747d7bdc0b3c3589..7fcfceda62bd5271cb3bf39b8258fc4e9e97dac9 100644 (file)
@@ -20,7 +20,6 @@
 
 package org.sonar.server.platform.ws;
 
-import org.junit.Before;
 import org.junit.Test;
 import org.sonar.api.server.ws.RailsHandler;
 import org.sonar.api.server.ws.WebService;
@@ -30,12 +29,7 @@ import static org.assertj.core.api.Assertions.assertThat;
 
 public class ServerWsTest {
 
-  WsTester tester;
-
-  @Before
-  public void setUp() throws Exception {
-    tester = new WsTester(new ServerWs());
-  }
+  WsTester tester = new WsTester(new ServerWs());
 
   @Test
   public void define_controller() throws Exception {
@@ -43,7 +37,7 @@ public class ServerWsTest {
     assertThat(controller).isNotNull();
     assertThat(controller.since()).isEqualTo("2.10");
     assertThat(controller.description()).isNotEmpty();
-    assertThat(controller.actions()).hasSize(3);
+    assertThat(controller.actions()).hasSize(2);
   }
 
   @Test
@@ -57,17 +51,6 @@ public class ServerWsTest {
     assertThat(action.params()).hasSize(1);
   }
 
-  @Test
-  public void define_system_action() throws Exception {
-    WebService.Controller controller = tester.controller("api/server");
-
-    WebService.Action action = controller.action("system");
-    assertThat(action).isNotNull();
-    assertThat(action.handler()).isInstanceOf(RailsHandler.class);
-    assertThat(action.responseExampleAsString()).isNotEmpty();
-    assertThat(action.params()).hasSize(1);
-  }
-
   @Test
   public void define_setup_action() throws Exception {
     WebService.Controller controller = tester.controller("api/server");