jinmeiliao commented on a change in pull request #7387:
URL: https://github.com/apache/geode/pull/7387#discussion_r818024208



##########
File path: 
geode-wan/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/CreateRegionCommandDUnitTest.java
##########
@@ -54,6 +59,63 @@ public void before() throws Exception {
     gfsh.connectAndVerify(locator);
   }
 
+  public Object[] replicatedRegionAndScopePairs() {

Review comment:
       It would be nice to add a few junit tests in `CreateRegionCommandTest`, 
where you can assert on the behavior if failed validation.

##########
File path: 
geode-gfsh/src/main/java/org/apache/geode/management/internal/cli/commands/CreateRegionCommand.java
##########
@@ -227,9 +230,22 @@ public ResultModel createRegion(
       regionConfig.setType(regionShortcut.name());
       regionConfig.setRegionAttributes(
           new 
RegionConverter().createRegionAttributesByType(regionShortcut.name()));
+      RegionAttributesType regionAttributesType = 
regionConfig.getRegionAttributes();

Review comment:
       these type of validation can be done in the `preExecution` method on the 
gfsh side , see logic in the `Interceptor` inner class in the same class filee.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to