diff options
author | Teryk Bellahsene <teryk.bellahsene@sonarsource.com> | 2015-10-02 16:58:47 +0200 |
---|---|---|
committer | Teryk Bellahsene <teryk.bellahsene@sonarsource.com> | 2015-10-05 09:37:17 +0200 |
commit | efcae62c18cb8e07587acc9f62bd55bb4c015c5c (patch) | |
tree | f2c2ffb19e8208f7c2af1e91365d87ad5dd21c84 /server/sonar-server | |
parent | 4dba36f4e20ac32291d473a3169ee372408a9a22 (diff) | |
download | sonarqube-efcae62c18cb8e07587acc9f62bd55bb4c015c5c.tar.gz sonarqube-efcae62c18cb8e07587acc9f62bd55bb4c015c5c.zip |
SONAR-6314 Delete RoR WS api/profiles/restore
Diffstat (limited to 'server/sonar-server')
-rw-r--r-- | server/sonar-server/src/main/java/org/sonar/server/qualityprofile/ws/ProfilesWs.java | 14 | ||||
-rw-r--r-- | server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ws/ProfilesWsTest.java | 12 |
2 files changed, 1 insertions, 25 deletions
diff --git a/server/sonar-server/src/main/java/org/sonar/server/qualityprofile/ws/ProfilesWs.java b/server/sonar-server/src/main/java/org/sonar/server/qualityprofile/ws/ProfilesWs.java index 0b24b35d01c..76c57de8b96 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/qualityprofile/ws/ProfilesWs.java +++ b/server/sonar-server/src/main/java/org/sonar/server/qualityprofile/ws/ProfilesWs.java @@ -34,7 +34,6 @@ public class ProfilesWs implements WebService { .setDescription("Former quality profiles web service"); defineBackupAction(controller); - defineRestoreAction(controller); controller.done(); } @@ -55,17 +54,4 @@ public class ProfilesWs implements WebService { .setExampleValue("Sonar way"); RailsHandler.addFormatParam(action); } - - private static void defineRestoreAction(NewController controller) { - WebService.NewAction action = controller.createAction("restore") - .setDescription("Restore a quality profile backup. Requires Administer Quality Profiles permission") - .setSince("3.1") - .setPost(true) - .setHandler(RailsHandler.INSTANCE); - - action.createParam("backup") - .setRequired(true) - .setDescription("Path to the file containing the backup (HTML format)"); - RailsHandler.addJsonOnlyFormatParam(action); - } } diff --git a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ws/ProfilesWsTest.java b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ws/ProfilesWsTest.java index 78cb5ff6802..3f77ff988e4 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ws/ProfilesWsTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ws/ProfilesWsTest.java @@ -46,7 +46,7 @@ public class ProfilesWsTest { assertThat(controller).isNotNull(); assertThat(controller.path()).isEqualTo("api/profiles"); assertThat(controller.description()).isNotEmpty(); - assertThat(controller.actions()).hasSize(2); + assertThat(controller.actions()).hasSize(1); } @Test @@ -58,14 +58,4 @@ public class ProfilesWsTest { assertThat(restoreProfiles.handler()).isInstanceOf(RailsHandler.class); assertThat(restoreProfiles.params()).hasSize(3); } - - @Test - public void define_restore_action() { - WebService.Controller controller = tester.controller("api/profiles"); - - WebService.Action restoreProfiles = controller.action("restore"); - assertThat(restoreProfiles).isNotNull(); - assertThat(restoreProfiles.handler()).isInstanceOf(RailsHandler.class); - assertThat(restoreProfiles.params()).hasSize(2); - } } |