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

   ### Summary
   
   Adds the first dedicated unit test suite for `UpsertPlainAccessConfigDTO`, 
the write payload of the plain access account endpoint.
   
   The DTO requires `accessKey`, trims it during the projection to 
`PlainAccessConfigVO`, carries all permission fields and excludes both secrets 
from `toString()`. The tests pin down the required-field rule, the trimming, 
the field projection and the secret-leak guard.
   
   ### Changes
   
   - 
`server/src/test/java/org/apache/rocketmq/studio/instance/acl/UpsertPlainAccessConfigDTOTest.java`
     - `acceptsCompletePayload`: a fully populated payload passes validation.
     - `rejectsMissingAccessKey` / `rejectsBlankAccessKey`: null or blank 
`accessKey` yields the `accessKey is required` violation.
     - `trimsAccessKeyWhenMappingToVo`: surrounding whitespace is stripped in 
the VO.
     - `carriesAllPermissionFieldsToVo`: secret, whitelist, admin flag and 
per-resource permissions reach the VO.
     - `mapsBlankAccessKeyToNullVo`: a null access key maps to null instead of 
NPE.
     - `secretKeyIsExcludedFromToString`: neither secret appears in the 
rendered DTO.
   
   ### Testing
   
   - `mvn -B test -Dtest=UpsertPlainAccessConfigDTOTest` passes (7 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