sync: 同步 v1.0.4 并脱敏配置与镜像

This commit is contained in:
MiFaZhan
2026-10-29 14:36:49 +08:00
parent 743e8e6e6e
commit 2206a393f7
516 changed files with 18119 additions and 2253 deletions
+15
View File
@@ -0,0 +1,15 @@
package model
import "testing"
func TestAgentDeptPaginationDefaultsAndBounds(t *testing.T) {
for _, test := range []struct{ page, size, wantPage, wantSize int }{
{0, 0, 1, 20}, {-1, -10, 1, 20}, {3, 50, 3, 50}, {1, 5000, 1, 2000},
} {
params := AgentDeptListParam{Page: test.page, PageSize: test.size}
params.NormalizePagination()
if params.Page != test.wantPage || params.PageSize != test.wantSize {
t.Fatalf("pagination = %d/%d, want %d/%d", params.Page, params.PageSize, test.wantPage, test.wantSize)
}
}
}