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

   ### Summary
   
   Adds the first dedicated unit test suite for `UpdateInstanceDTO`, the 
payload of the instance edit endpoint.
   
   The DTO requires an `instanceId` and projects the editable fields (name, 
type, endpoint, remark, admin credential ref) into `InstanceVO`, deliberately 
leaving cloud/credential bookkeeping untouched. The tests lock in the required 
field, the projection and what stays out of it.
   
   ### Changes
   
   - 
`server/src/test/java/org/apache/rocketmq/studio/instance/UpdateInstanceDTOTest.java`
     - `acceptsCompletePayload`: a fully populated payload passes validation.
     - `rejectsMissingInstanceId` / `rejectsBlankInstanceId`: null or blank 
`instanceId` yields the `instanceId is required` violation.
     - `mapsEditableFieldsToVo`: name, type, endpoint, remark and admin 
credential ref reach the VO.
     - `leavesNonEditableFieldsOutOfVo`: cloud id, vendor, credential id, 
region id and counters stay unset/default.
   
   ### Testing
   
   - `mvn -B test -Dtest=UpdateInstanceDTOTest` passes (5 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