fix(shadow): respect queue phases and compress input evidence

This commit is contained in:
zgw
2026-09-08 11:23:50 +08:00
parent 414b3bf4a9
commit af8b5f1830
40 changed files with 1035 additions and 46 deletions

View File

@@ -116,6 +116,7 @@ class Ft546ShadowApplicationTest {
context.getBean(com.ruoyi.wcs.port.out
.TrafficStateRepository.class));
assertNotNull(context.getBean(ShadowStatusController.class));
assertNotNull(context.getBean(com.ruoyi.shadow.web.ShadowInputController.class));
Map<String, String> persisted = context.getBean(
RecordingShadowDatabaseGate.class).getPersistedChecks();
assertNotNull(persisted);
@@ -138,11 +139,19 @@ class Ft546ShadowApplicationTest {
.andExpect(jsonPath("$.status").value("STARTING"))
.andExpect(jsonPath("$.checkedAt").exists())
.andExpect(jsonPath("$.evidenceBacklog").value(0))
.andExpect(jsonPath("$.runtimeIdentity.buildId").value("ft546-shadow-20260908-phase-storage-v2"))
.andExpect(jsonPath("$.runtimeIdentity.effectiveSettingsSha256").exists())
.andExpect(jsonPath("$.runtimeIdentity.safePointConfiguration").value("UNCONFIGURED"))
.andExpect(jsonPath("$.startupChecks.SHADOW_ENABLED")
.value("PASS"))
.andExpect(jsonPath(
"$.startupChecks.SIDE_EFFECT_BEANS_ABSENT")
.value("PASS"));
mvc.perform(get("/shadow/inputs/00000000-0000-0000-0000-000000000001")
.with(request -> { request.setRemoteAddr("10.6.22.6"); return request; }))
.andExpect(status().isForbidden());
mvc.perform(get("/shadow/inputs/not-a-uuid"))
.andExpect(status().isBadRequest());
});
}