feat(ocr): 新增本地 OCR sidecar

This commit is contained in:
yml
2026-11-17 17:26:59 +08:00
parent a6eb6c95b9
commit 90addb80d5
166 changed files with 72858 additions and 34 deletions
+7
View File
@@ -111,6 +111,13 @@ func TestLoadDatabaseConfigInvalidValuesUseDefaults(t *testing.T) {
}
}
func TestLoadOCRServiceURL(t *testing.T) {
t.Setenv("OCR_SERVICE_URL", " http://ocr:8787/ ")
if got := Load().OCRServiceURL; got != "http://ocr:8787" {
t.Fatalf("OCRServiceURL = %q, want http://ocr:8787", got)
}
}
// TestFieldEncryptionLegacyKeyNonProductionDefaultsToHistoric 验证非生产环境未设置 legacy 时
// 回退到历史硬编码密钥(开发态零配置兼容旧密文)。
func TestFieldEncryptionLegacyKeyNonProductionDefaultsToHistoric(t *testing.T) {