feat(operations): add automated reconciliation center

This commit is contained in:
lingniu
2026-07-16 19:14:53 +08:00
parent bbab018d55
commit d67f42b4f4
25 changed files with 1697 additions and 39 deletions

View File

@@ -0,0 +1,21 @@
package main
import (
"strings"
"testing"
)
func TestRunRequiresMySQLDSN(t *testing.T) {
t.Setenv("MYSQL_DSN", "")
if err := run(); err == nil || !strings.Contains(err.Error(), "MYSQL_DSN is required") {
t.Fatalf("run() error=%v", err)
}
}
func TestRunRejectsUnsafeTimeout(t *testing.T) {
t.Setenv("MYSQL_DSN", "ignored")
t.Setenv("RECONCILIATION_TIMEOUT_SEC", "1")
if err := run(); err == nil || !strings.Contains(err.Error(), "between 10 and 1800") {
t.Fatalf("run() error=%v", err)
}
}