]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-10214 Deprecated value of "qualityProfile" is "name", not "profileName"
authorJulien Lancelot <julien.lancelot@sonarsource.com>
Tue, 19 Dec 2017 14:52:18 +0000 (15:52 +0100)
committerJulien Lancelot <julien.lancelot@sonarsource.com>
Wed, 20 Dec 2017 09:04:24 +0000 (10:04 +0100)
server/sonar-server/src/main/java/org/sonar/server/qualityprofile/ws/ExportAction.java
server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ws/ExportActionTest.java

index 50f907490ebb9ad86083c3cc1e5d74a061e9c61e..cea5b11724e2da799cc8924ab51d73e9dda8bec1 100644 (file)
@@ -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)
index 55f46efe64ead3fdccb5b287390301e220091063..7a08c259b7a8c823911061650784ac24465075e5 100644 (file)
@@ -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();
   }