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

   ### Summary
   
   Adds the first dedicated unit test suite for `UpdateCloudCredentialDTO`, the 
payload of the cloud credential edit endpoint.
   
   The DTO requires a numeric `id`, keeps `secretKey` out of `toString()` and 
leaves the remaining fields optional. The tests cover the required id, the 
secret-leak guard and the minimal-payload path.
   
   ### Changes
   
   - 
`server/src/test/java/org/apache/rocketmq/studio/provider/credential/UpdateCloudCredentialDTOTest.java`
     - `acceptsCompletePayload`: a fully populated payload passes validation.
     - `rejectsMissingId`: null id yields the `credential id is required` 
violation.
     - `secretKeyIsExcludedFromToString`: the secret never appears in the 
rendered DTO.
     - `optionalFieldsMayBeAbsent`: id-only payload validates cleanly.
   
   ### Testing
   
   - `mvn -B test -Dtest=UpdateCloudCredentialDTOTest` passes (4 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