justinmclean opened a new issue, #9076:
URL: https://github.com/apache/gravitino/issues/9076
### What would you like to be improved?
Prevent the SetModelVersionProperty CLI command from accepting both an alias
and version (or neither), ensuring it fails instead of invoking the server with
invalid inputs. Include unit tests, for example:
```
@Test
void validateBothAliasAndVersion() {
CommandLine mockCmdLine = Mockito.mock(CommandLine.class);
CommandContext context = new CommandContext(mockCmdLine);
SetModelVersionProperty command =
new SetModelVersionProperty(
context,
"metalake1",
"catalog1",
"schema1",
"model1",
1,
"alias1",
"prop",
"value");
Assertions.assertThrows(RuntimeException.class, command::validate);
}
```
### How should we improve?
Improve validation and add unit tests, note you'll need to do this `
Main.useExit = false;`.
--
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]