yyqdbngt opened a new pull request, #3773: URL: https://github.com/apache/rocketmq-dashboard/pull/3773
### Motivation The existing `AlertRuleAssetControllerTest` covers the happy paths of listing, raw YAML retrieval and attachment headers, but not the empty catalog, the export body bytes or the failure translation of the service layer. ### Changes - `listAssetsShouldReturnEmptyListWhenNoAssets`: an empty asset catalog is exposed as an empty `data` array with a 200 result. - `exportAssetShouldReturnYamlBodyAsUtf8`: the exported body carries the exact YAML bytes encoded as UTF-8, preserving non-ASCII content (asserted via `content().bytes`). - `listAssetsShouldTranslateServiceFailureToServerError`: a service failure surfaces as a 5xx response through the global handler. ### Verification ``` mvn -B test -Dtest=AlertRuleAssetControllerTest [INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0 [INFO] BUILD SUCCESS ``` -- 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]
