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

   ### Motivation
   
   The existing `AlertRuleTransferServiceTest` covers export portability, 
cross-domain import rejection, validate-before-create and fresh-id import, but 
the envelope validation branches (null document, version, rule-count bounds) 
and the metric trimming on import are untested.
   
   ### Changes
   
   - `rejectsNullImportDocument`: a missing import document is a 400 and 
nothing is touched.
   - `rejectsUnsupportedImportVersion`: an unknown document version is a 400 
before any rule work starts.
   - `rejectsEmptyAndOversizedRuleLists`: an empty rule list and a 201-rule 
payload both fail with 400, keeping the import between 1 and 200 rules.
   - `trimsImportedMetricBeforeValidationAndCreation`: surrounding whitespace 
on an imported metric is stripped before the candidate reaches validation and 
creation.
   
   ### Verification
   
   ```
   mvn -B test -Dtest=AlertRuleTransferServiceTest
   [INFO] Tests run: 8, 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]

Reply via email to