geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sai_boorlaga...@apache.org
Subject [geode] branch develop updated: GEODE-5083: Alter region --name option no longer auto completes (#1898)
Date Thu, 03 May 2018 15:16:24 GMT
This is an automated email from the ASF dual-hosted git repository.

sai_boorlagadda pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git


The following commit(s) were added to refs/heads/develop by this push:
     new 9e4a51f  GEODE-5083: Alter region --name option no longer auto completes (#1898)
9e4a51f is described below

commit 9e4a51f67e7c7a0dd69d5d78bc4f6d8700153382
Author: Sai Boorlagadda <sai.boorlagadda@gmail.com>
AuthorDate: Thu May 3 08:16:11 2018 -0700

    GEODE-5083: Alter region --name option no longer auto completes (#1898)
---
 .../geode/management/internal/cli/commands/AlterRegionCommand.java | 1 +
 .../management/internal/cli/commands/AlterRegionCommandTest.java   | 7 +++++++
 2 files changed, 8 insertions(+)

diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/AlterRegionCommand.java
b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/AlterRegionCommand.java
index 7104b99..9c24efe 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/AlterRegionCommand.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/AlterRegionCommand.java
@@ -46,6 +46,7 @@ public class AlterRegionCommand extends InternalGfshCommand {
   @CliMetaData(relatedTopic = CliStrings.TOPIC_GEODE_REGION)
   public Result alterRegion(
       @CliOption(key = CliStrings.ALTER_REGION__REGION, mandatory = true,
+          optionContext = ConverterHint.REGION_PATH,
           help = CliStrings.ALTER_REGION__REGION__HELP) String regionPath,
       @CliOption(key = {CliStrings.GROUP, CliStrings.GROUPS},
           optionContext = ConverterHint.MEMBERGROUP,
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/AlterRegionCommandTest.java
b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/AlterRegionCommandTest.java
index 9e86cef..6f3bbba 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/AlterRegionCommandTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/AlterRegionCommandTest.java
@@ -71,4 +71,11 @@ public class AlterRegionCommandTest {
     GfshParseResult result = parser.parse(command);
     assertThat(result.getParamValue("entry-idle-time-custom-expiry")).isEqualTo(ClassName.EMPTY);
   }
+
+  @Test
+  public void regionNameIsConverted() {
+    String command = "alter region --name=Person";
+    GfshParseResult result = parser.parse(command);
+    assertThat(result.getParamValue("name")).isEqualTo("/Person");
+  }
 }

-- 
To stop receiving notification emails like this one, please contact
sai_boorlagadda@apache.org.

Mime
View raw message