]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-6377 rename status + add better description of it
authorSébastien Lesaint <sebastien.lesaint@sonarsource.com>
Wed, 29 Apr 2015 12:50:51 +0000 (14:50 +0200)
committerSébastien Lesaint <sebastien.lesaint@sonarsource.com>
Thu, 30 Apr 2015 09:07:45 +0000 (11:07 +0200)
server/sonar-server/src/main/java/org/sonar/server/plugins/ws/AvailablePluginsWsAction.java
server/sonar-server/src/main/java/org/sonar/server/plugins/ws/PluginWSCommons.java
server/sonar-server/src/test/java/org/sonar/server/plugins/ws/AvailablePluginsWsActionTest.java
server/sonar-server/src/test/java/org/sonar/server/plugins/ws/PluginWSCommonsTest.java

index 8789ee043edcb0c7608091150ed26e7292d0f5ec..1940a8597533e28268f3bbbbe5a96ec89d2a857f 100644 (file)
@@ -52,7 +52,13 @@ public class AvailablePluginsWsAction implements PluginsWsAction {
         "<br/>" +
         "Plugin information is retrieved from Update Center. Date and time at which Update Center was last refreshed is provided in the response." +
         "<br/>" +
-        "Update status values are: [COMPATIBLE, INCOMPATIBLE, REQUIRES_UPGRADE, DEPS_REQUIRE_UPGRADE]")
+        "Update status values are: " +
+          "<ul>" +
+          "<li>COMPATIBLE: plugin is compatible with current SonarQube instance.</li>" +
+          "<li>INCOMPATIBLE: plugin is not compatible with current SonarQube instance.</li>" +
+          "<li>REQUIRES_SYSTEM_UPGRADE: plugin requires SonarQube to be upgraded before being installed.</li>" +
+          "<li>DEPS_REQUIRE_SYSTEM_UPGRADE: at least plugin on which the plugin is dependent requires SonarQube to be upgraded.</li>" +
+          "</ul>")
       .setSince("5.2")
       .setHandler(this)
       .setResponseExample(Resources.getResource(this.getClass(), "example-available_plugins.json"));
index 1e694e0ed140dc139b55c1f7ffc10150d52d6263..d10d23e87d05bbe121f4b85474003b4c270bc52d 100644 (file)
@@ -207,9 +207,9 @@ public class PluginWSCommons {
       case INCOMPATIBLE:
         return "INCOMPATIBLE";
       case REQUIRE_SONAR_UPGRADE:
-        return "REQUIRES_UPGRADE";
+        return "REQUIRES_SYSTEM_UPGRADE";
       case DEPENDENCIES_REQUIRE_SONAR_UPGRADE:
-        return "DEPS_REQUIRE_UPGRADE";
+        return "DEPS_REQUIRE_SYSTEM_UPGRADE";
       default:
         throw new IllegalArgumentException("Unsupported value of PluginUpdate.Status " + status);
     }
index 44128dfdea64e509efdb14e2f2c12d175c3e0762..ac70bc874cd5172d638a1f7a1bb2ac6b6081bd57 100644 (file)
@@ -100,13 +100,13 @@ public class AvailablePluginsWsActionTest extends AbstractUpdateCenterBasedPlugi
   }
 
   @Test
-  public void status_REQUIRE_SONAR_UPGRADE_is_displayed_REQUIRES_UPGRADE_in_JSON() throws Exception {
-    checkStatusDisplayedInJson(REQUIRE_SONAR_UPGRADE, "REQUIRES_UPGRADE");
+  public void status_REQUIRE_SONAR_UPGRADE_is_displayed_REQUIRES_SYSTEM_UPGRADE_in_JSON() throws Exception {
+    checkStatusDisplayedInJson(REQUIRE_SONAR_UPGRADE, "REQUIRES_SYSTEM_UPGRADE");
   }
 
   @Test
-  public void status_DEPENDENCIES_REQUIRE_SONAR_UPGRADE_is_displayed_DEPS_REQUIRE_UPGRADE_in_JSON() throws Exception {
-    checkStatusDisplayedInJson(DEPENDENCIES_REQUIRE_SONAR_UPGRADE, "DEPS_REQUIRE_UPGRADE");
+  public void status_DEPENDENCIES_REQUIRE_SONAR_UPGRADE_is_displayed_DEPS_REQUIRE_SYSTEM_UPGRADE_in_JSON() throws Exception {
+    checkStatusDisplayedInJson(DEPENDENCIES_REQUIRE_SONAR_UPGRADE, "DEPS_REQUIRE_SYSTEM_UPGRADE");
   }
 
   private void checkStatusDisplayedInJson(PluginUpdate.Status status, String expectedValue) throws Exception {
index 2c77cf638bed922b217ecab05537c2431b5eac93..218316209cb3f851f8fc1fb9ec82387d68773760 100644 (file)
@@ -221,12 +221,12 @@ public class PluginWSCommonsTest {
 
   @Test
   public void status_REQUIRE_SONAR_UPGRADE_is_displayed_REQUIRES_UPGRADE_in_JSON() {
-    assertThat(toJSon(REQUIRE_SONAR_UPGRADE)).isEqualTo("REQUIRES_UPGRADE");
+    assertThat(toJSon(REQUIRE_SONAR_UPGRADE)).isEqualTo("REQUIRES_SYSTEM_UPGRADE");
   }
 
   @Test
-  public void status_DEPENDENCIES_REQUIRE_SONAR_UPGRADE_is_displayed_DEPS_REQUIRE_UPGRADE_in_JSON() {
-    assertThat(toJSon(DEPENDENCIES_REQUIRE_SONAR_UPGRADE)).isEqualTo("DEPS_REQUIRE_UPGRADE");
+  public void status_DEPENDENCIES_REQUIRE_SONAR_UPGRADE_is_displayed_DEPS_REQUIRE_SYSTEM_UPGRADE_in_JSON() {
+    assertThat(toJSon(DEPENDENCIES_REQUIRE_SONAR_UPGRADE)).isEqualTo("DEPS_REQUIRE_SYSTEM_UPGRADE");
   }
 
   @Test