补齐阿里云保护域回归会话
使保护域本地拒绝路径使用超级管理员测试会话,确保完整 HTTP API 回归覆盖新的 DNS 权限边界。
This commit is contained in:
parent
853a7cdcf1
commit
93a190f4bf
@ -130,7 +130,7 @@ func TestAliyunDomainCheckUsesOnlyCurrentTargetAndProtectsPCUX(t *testing.T) {
|
|||||||
w := httptest.NewRecorder()
|
w := httptest.NewRecorder()
|
||||||
body := strings.NewReader(`{"domain":"pcux.cn"}`)
|
body := strings.NewReader(`{"domain":"pcux.cn"}`)
|
||||||
req := httptest.NewRequest(http.MethodPost, "/api/v1/dns/aliyun/check", body)
|
req := httptest.NewRequest(http.MethodPost, "/api/v1/dns/aliyun/check", body)
|
||||||
serveAdminHTTP(server, w, req)
|
serveSuperAdminHTTP(server, w, req)
|
||||||
if w.Code != http.StatusOK {
|
if w.Code != http.StatusOK {
|
||||||
t.Fatalf("POST check pcux.cn 状态码 = %d,响应:%s", w.Code, w.Body.String())
|
t.Fatalf("POST check pcux.cn 状态码 = %d,响应:%s", w.Code, w.Body.String())
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user