aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@sonarsource.com>2017-12-19 15:52:18 +0100
committerJulien Lancelot <julien.lancelot@sonarsource.com>2017-12-20 10:04:24 +0100
commit527a13d12e2457845d2631e2615181f6173c13bc (patch)
tree5175264fd3336952bdbc6bc40c846252b7e7b346
parent8d3f85ca3272be3b99826c86d24dd4ca54ae85ed (diff)
downloadsonarqube-527a13d12e2457845d2631e2615181f6173c13bc.tar.gz
sonarqube-527a13d12e2457845d2631e2615181f6173c13bc.zip
SONAR-10214 Deprecated value of "qualityProfile" is "name", not "profileName"
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/qualityprofile/ws/ExportAction.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ws/ExportActionTest.java7
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();
}