youngkermit8-coder opened a new issue, #1511: URL: https://github.com/apache/rocketmq-dashboard/issues/1511
## Bug Report ### Environment - Branch: `rocketmq-studio` - JDK: 21 ### Description `SettingsServiceTest` starts its Prometheus fixture on `127.0.0.1`, while the production SSRF guard now correctly rejects loopback data-source URLs after #1423. Seven existing tests therefore fail before they reach their intended HTTP/authentication assertions. ### Reproduction ```text mvn -B -ntp -Dtest=SettingsServiceTest test Tests run: 30, Failures: 7, Errors: 0, Skipped: 0 ``` The failures include the query URL, Basic authentication, Bearer authentication, locale normalization, validation ordering, and Prometheus error-detail cases. Each receives `Data source URL must not point to a local or private address` because the shared fixture URL is loopback. ### Expected behavior The test suite should exercise outbound request construction deterministically without weakening the production SSRF policy or depending on a host network interface. ### Proposed scope - Let tests inject a prebuilt `RestClient` while keeping the public production constructor and its connect/read timeout configuration unchanged. - Replace the loopback `HttpServer` fixture with Spring's `MockRestServiceServer`. - Preserve assertions for request path/query, authentication headers, successful responses, and Prometheus error bodies. - Verify all `SettingsServiceTest` cases pass without real network access. -- 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]
