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: [email protected]

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

Reply via email to