fix: 完善工作流公共接口上传与错误契约
- 区分 HTTP 请求标识与内部上传标识,补齐 Redis 旧记录兼容和关联日志 - 保持归一化 MIME 一致,并隔离工作流鉴权错误契约对其他公共接口的影响 - 收口 Multipart 操作日志与对象存储故障分类,归档范围:S05
This commit is contained in:
@@ -112,6 +112,7 @@ public class PublicWorkflowControllerRoutingTest {
|
||||
when(multipartMapper.map(any()))
|
||||
.thenReturn(Map.of("file", List.of()));
|
||||
when(uploadLifecycleService.prepare(
|
||||
anyString(),
|
||||
eq("{}"),
|
||||
anyMap(),
|
||||
anyMap()))
|
||||
@@ -181,6 +182,7 @@ public class PublicWorkflowControllerRoutingTest {
|
||||
eq("{}"),
|
||||
anyMap());
|
||||
verify(uploadLifecycleService, never()).prepare(
|
||||
anyString(),
|
||||
anyString(),
|
||||
anyMap(),
|
||||
anyMap());
|
||||
@@ -209,12 +211,14 @@ public class PublicWorkflowControllerRoutingTest {
|
||||
mockMvc.perform(multipart(RUN_PATH)
|
||||
.file(metadata)
|
||||
.file(file)
|
||||
.header("ApiKey", "key"))
|
||||
.header("ApiKey", "key")
|
||||
.header("X-Request-Id", "request-multipart"))
|
||||
.andExpect(status().isOk())
|
||||
.andExpect(jsonPath("$.data").value("execute-1"));
|
||||
|
||||
verify(multipartMapper).map(any());
|
||||
verify(uploadLifecycleService).prepare(
|
||||
eq("request-multipart"),
|
||||
eq("{}"),
|
||||
anyMap(),
|
||||
anyMap());
|
||||
|
||||
Reference in New Issue
Block a user