修正部署结果接口部分成功状态测试
按接口实际契约使用 207 Multi-Status 验证部分服务器部署成功,并保留结果脱敏与权限专项覆盖。
This commit is contained in:
parent
40d2b61b07
commit
79e57cdd60
@ -28,7 +28,7 @@ func TestTaskDeploymentResultsIssueAndRead(t *testing.T) {
|
|||||||
defer closeDB()
|
defer closeDB()
|
||||||
response := httptest.NewRecorder()
|
response := httptest.NewRecorder()
|
||||||
serveAdminHTTP(server, response, httptest.NewRequest(http.MethodPost, "/api/v1/domains/domain-1/issue", nil))
|
serveAdminHTTP(server, response, httptest.NewRequest(http.MethodPost, "/api/v1/domains/domain-1/issue", nil))
|
||||||
if response.Code != http.StatusBadGateway {
|
if response.Code != http.StatusMultiStatus {
|
||||||
t.Fatalf("部分部署失败响应错误:%d %s", response.Code, response.Body.String())
|
t.Fatalf("部分部署失败响应错误:%d %s", response.Code, response.Body.String())
|
||||||
}
|
}
|
||||||
items, err := tasks.ListTasks(t.Context(), "", 10)
|
items, err := tasks.ListTasks(t.Context(), "", 10)
|
||||||
@ -98,7 +98,7 @@ func TestTaskDeploymentResultsVisibility(t *testing.T) {
|
|||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
for _, tc := range []struct {
|
for _, tc := range []struct {
|
||||||
name string
|
name string
|
||||||
cookie *http.Cookie
|
cookie *http.Cookie
|
||||||
status int
|
status int
|
||||||
}{
|
}{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user