diff options
-rw-r--r-- | server/sonar-server/src/main/java/org/sonar/server/qualityprofile/ws/ExportAction.java | 2 | ||||
-rw-r--r-- | server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ws/ExportActionTest.java | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/server/sonar-server/src/main/java/org/sonar/server/qualityprofile/ws/ExportAction.java b/server/sonar-server/src/main/java/org/sonar/server/qualityprofile/ws/ExportAction.java index 50f907490eb..cea5b11724e 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/qualityprofile/ws/ExportAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/qualityprofile/ws/ExportAction.java @@ -89,7 +89,7 @@ public class ExportAction implements QProfileWsAction { action.createParam(PARAM_QUALITY_PROFILE) .setDescription("Quality profile name to export. If left empty, the default profile for the language is exported. If this parameter is set, '%s' must not be set.", PARAM_KEY) - .setDeprecatedKey("profileName", "6.6") + .setDeprecatedKey("name", "6.6") .setExampleValue("My Sonar way"); action.createParam(PARAM_LANGUAGE) diff --git a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ws/ExportActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ws/ExportActionTest.java index 55f46efe64e..7a08c259b7a 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ws/ExportActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ws/ExportActionTest.java @@ -48,8 +48,8 @@ import org.sonar.server.ws.WsActionTester; import static java.lang.String.format; import static org.assertj.core.api.Assertions.assertThat; -import static org.sonarqube.ws.client.qualityprofile.QualityProfileWsParameters.PARAM_LANGUAGE; import static org.sonarqube.ws.client.qualityprofile.QualityProfileWsParameters.PARAM_KEY; +import static org.sonarqube.ws.client.qualityprofile.QualityProfileWsParameters.PARAM_LANGUAGE; public class ExportActionTest { @@ -74,14 +74,19 @@ public class ExportActionTest { assertThat(definition.isPost()).isFalse(); assertThat(definition.isInternal()).isFalse(); assertThat(definition.params()).extracting(WebService.Param::key).containsExactlyInAnyOrder("key", "language", "qualityProfile", "organization"); + WebService.Param organizationParam = definition.param("organization"); assertThat(organizationParam.since()).isEqualTo("6.4"); assertThat(organizationParam.isInternal()).isTrue(); + WebService.Param key = definition.param("key"); assertThat(key.since()).isEqualTo("6.5"); assertThat(key.deprecatedSince()).isEqualTo("6.6"); + WebService.Param name = definition.param("qualityProfile"); assertThat(name.deprecatedSince()).isNullOrEmpty(); + assertThat(name.deprecatedKey()).isEqualTo("name"); + WebService.Param language = definition.param("language"); assertThat(language.deprecatedSince()).isNullOrEmpty(); } |