feat(operations): add automated reconciliation center
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user