yyqdbngt opened a new pull request, #3536:
URL: https://github.com/apache/rocketmq-dashboard/pull/3536
### Summary
Adds the first dedicated unit test suite for `AuditCleanupDTO`, the
retention window payload of the audit log cleanup endpoint.
The DTO restricts `beforeDays` to the 1..365 range via `@Positive` and
`@Max` while leaving the field optional. The tests cover both bounds, the
boundary value and the absent-field path.
### Changes
-
`server/src/test/java/org/apache/rocketmq/studio/ops/audit/AuditCleanupDTOTest.java`
- `acceptsPositiveWithinLimit`: a typical 30-day window passes.
- `acceptsBoundaryOfThreeHundredSixtyFiveDays`: the 365 boundary passes.
- `rejectsZero` / `rejectsNegative`: 0 and negative values yield the
positive violation.
- `rejectsBeyondThreeHundredSixtyFiveDays`: 366 yields the upper-bound
violation.
- `fieldIsOptional`: an untouched payload validates cleanly.
### Testing
- `mvn -B test -Dtest=AuditCleanupDTOTest` 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]