yyqdbngt opened a new pull request, #3530:
URL: https://github.com/apache/rocketmq-dashboard/pull/3530

   ### Summary
   
   Adds the first dedicated unit test suite for `CreateNameServerDTO`, covering 
the bean-validation contract of the create name server request payload.
   
   The DTO declares two required fields (`clusterId`, `addr`) with `@NotBlank` 
and an optional `version`; the new tests lock in both the pass and fail 
branches so a future relaxation of the constraints is caught early.
   
   ### Changes
   
   - 
`server/src/test/java/org/apache/rocketmq/studio/cluster/nameserver/CreateNameServerDTOTest.java`
     - `acceptsCompletePayload`: a fully populated payload passes validation.
     - `rejectsMissingClusterId` / `rejectsBlankClusterId`: null or 
whitespace-only `clusterId` yields the `clusterId is required` violation.
     - `rejectsMissingAddr` / `rejectsBlankAddr`: null or blank `addr` yields 
the `addr is required` violation.
     - `versionRemainsOptional`: omitting `version` still validates cleanly.
   
   ### Testing
   
   - `mvn -B test -Dtest=CreateNameServerDTOTest` passes (6 tests, all green).


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