tju-yxq opened a new pull request, #2044:
URL: https://github.com/apache/rocketmq-dashboard/pull/2044

   ## Summary
   
   Follow-up controller coverage for #1826 / #1827.
   
   `CreateCertDTO` and `UpdateCertDTO` both declare the supported certificate 
type values with Bean Validation. Existing controller coverage already checked 
the create endpoint rejects an unsupported type; this PR adds the matching 
MockMvc regression test for the update endpoint.
   
   ## Change
   
   - Add `K8sCertControllerTest#updateCertShouldRejectUnsupportedType`.
   - Verify `POST /api/k8s-certs/update` returns `400` with `type must be one 
of TLS, mTLS, ServiceAccount` when `type` is `PEM`.
   - Verify the request is rejected before `K8sCertService` is invoked.
   
   ## Verification
   
   ```bash
   cd server
   mvn -DskipTests=false 
"-Dtest=K8sCertControllerTest#updateCertShouldRejectUnsupportedType+createCertShouldRejectUnsupportedType,K8sCertServiceTest#createCertShouldRejectInvalidTypeBeforeSave+updateCertShouldRejectInvalidTypeBeforeSave"
 test
   ```
   
   Result from this branch: `BUILD SUCCESS`; Maven ran the two matching 
controller tests, with `Tests run: 2, Failures: 0, Errors: 0, Skipped: 0`.
   
   ## Evidence boundary
   
   - Verified with MockMvc/controller validation tests.
   - Not verified with a live Kubernetes cluster, browser UI, or deployed HTTP 
environment.


-- 
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