补齐阿里云保护域回归会话

使保护域本地拒绝路径使用超级管理员测试会话,确保完整 HTTP API 回归覆盖新的 DNS 权限边界。
This commit is contained in:
xuans 2026-09-29 22:42:36 +08:00
parent 853a7cdcf1
commit 93a190f4bf

View File

@ -130,7 +130,7 @@ func TestAliyunDomainCheckUsesOnlyCurrentTargetAndProtectsPCUX(t *testing.T) {
w := httptest.NewRecorder()
body := strings.NewReader(`{"domain":"pcux.cn"}`)
req := httptest.NewRequest(http.MethodPost, "/api/v1/dns/aliyun/check", body)
serveAdminHTTP(server, w, req)
serveSuperAdminHTTP(server, w, req)
if w.Code != http.StatusOK {
t.Fatalf("POST check pcux.cn 状态码 = %d,响应:%s", w.Code, w.Body.String())
}