mateclaw/mateclaw-server/src/test/java/vip/mate/ApplicationContextSmokeTest.java
倪程伟 53a12ee18d
feat(plugin/settings): search-provider catalog endpoint + grouped settings UI + plugin config form
Adds a read-only GET /api/v1/settings/search-providers catalog (admin-gated, no secrets), grouped collapsible provider cards, and a schema-driven plugin config form. Breaks a SystemSettingService<->PluginManager circular dependency via parameter @Lazy (with a context smoke test), and fixes PluginManager.updateConfig to merge instead of overwrite so omitted/blank secret fields are preserved. Hardens plugin search-provider id validation (reject-not-trim, case-insensitive conflict) and insulates the provider bridge hot path from throwing plugin code.
2026-07-04 12:06:33 +08:00

26 lines
1.0 KiB
Java

package vip.mate;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
/**
* Guards against circular bean dependencies and other wiring mistakes that
* only surface when Spring actually constructs the full application context —
* invisible to Mockito-based unit tests, which never build the real bean graph.
* <p>
* Added after a regression slipped through the unit suite: a circular dependency
* (SystemSettingService → PluginManager → ToolRegistry → I18nService →
* SystemSettingService) was introduced and went undetected by the full
* per-class unit test suite until a manual {@code spring-boot:run} smoke check.
*/
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.NONE)
class ApplicationContextSmokeTest {
@Test
void contextLoads() {
// Intentionally empty: if the ApplicationContext fails to start
// (missing bean, circular dependency, bad property, etc.), this
// test fails during Spring's context setup before the test body runs.
}
}