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

   ### Summary
   
   Adds the first dedicated unit test suite for `Acl2PolicyContext`, the ACL 
2.0 RBAC model passed between controller and service layers.
   
   The model bundles rule factories and a consistency `validate()` pass. The 
tests pin the rule factory shapes, the required-field checks, per-rule 
validation with indexed messages, the effect defaulting and the bound-type 
whitelist.
   
   ### Changes
   
   - 
`server/src/test/java/org/apache/rocketmq/studio/model/Acl2PolicyContextTest.java`
     - `defaultAllowRuleCarriesExpectedShape` / 
`denyAllRuleCarriesExpectedShape`: factory defaults (actions, effect, priority).
     - `validateAcceptsCompleteContext` / `validateAcceptsAllBoundTypes` / 
`validateAllowsNullRules`: happy paths.
     - `validateRejectsBlankAccessKey` / `validateRejectsBlankPolicyName` / 
`validateRejectsEmptyRulesList`: required-field guards.
     - `validateRejectsBlankResourcePatternInRule` / 
`validateRejectsEmptyActionsInRule` / `validateRejectsUnknownEffect`: per-rule 
checks with indexed messages.
     - `validateDefaultsNullEffectToAllow`: missing effect defaults to Allow.
     - `validateRejectsUnknownBoundType`: the USER/GROUP/SERVICE_ACCOUNT 
whitelist.
     - `adminFlagDefaultsToFalse`: lombok accessor behaves for the primitive 
flag.
   
   ### Testing
   
   - `mvn -B test -Dtest=Acl2PolicyContextTest` passes (14 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