You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gravitino.apache.org by "Surya00011 (via GitHub)" <gi...@apache.org> on 2025/08/25 14:41:08 UTC
[PR] [#8207] feat(cli): add validate method to OwnerDetails to check entityType is not null [gravitino]
Surya00011 opened a new pull request, #8273:
URL: https://github.com/apache/gravitino/pull/8273
Hi @justinmclean ,
### What changes were proposed in this pull request?
- Implemented `validate()` method in `OwnerDetails` class to check for null or invalid entity types and exit with an error message if invalid.
- Added new JUnit test class `TestOwnerDetails`:
- `testValidate_withValidEntityType_shouldPass`: ensures that valid entity types pass validation.
- `testValidate_withInvalidEntityType_shouldExit`: ensures that invalid entity types trigger error exit.
### Why are the changes needed?
- Before this change, `OwnerDetails` did not perform validation for `entityType`.
- Adding validation ensures invalid entity types are caught early with a clear error message, improving the robustness of the CLI.
Fix: #(issue-id)
### Does this PR introduce _any_ user-facing change?
- Yes, users providing an invalid entity type will now see a proper error message instead of unexpected behavior.
- No breaking changes for valid inputs.
### How was this patch tested?
- Added `TestOwnerDetails` JUnit test class.
- Verified behavior for both valid and invalid entity types.
- Used `Mockito` for mocking `CommandLine`.
- Confirmed CLI does not exit silently but throws an error in tests for invalid inputs.
--
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: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#8207] feat(cli): add validate method to OwnerDetails to check entityType is not null [gravitino]
Posted by "justinmclean (via GitHub)" <gi...@apache.org>.
justinmclean merged PR #8273:
URL: https://github.com/apache/gravitino/pull/8273
--
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: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org