justinmclean opened a new issue, #7984:
URL: https://github.com/apache/gravitino/issues/7984

   ### What would you like to be improved?
   
   Add validate method to 
clients/cli/src/main/java/org/apache/gravitino/cli/commands/SetOwner.java
   
   Here a test that should help:
   ```
     @Test
     void testSetOwnerInvalidEntityType() {
       Main.useExit = false;
       CommandContext context = new CommandContext(mockCommandLine);
       SetOwner setOwner = new SetOwner(context, "metalake_demo", "obj", 
"invalid", "user", false);
       assertThrows(RuntimeException.class, setOwner::validate);
       String errOutput = new String(errContent.toByteArray(), 
StandardCharsets.UTF_8).trim();
       assertEquals(ErrorMessages.UNKNOWN_ENTITY, errOutput);
     }
   ```
   
   ### How should we improve?
   
   See above.


-- 
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