fix(t233): add redacted ERP diagnostics

This commit is contained in:
QiuSW
2026-07-29 11:24:04 +08:00
parent 817a968233
commit 1e703ef257
14 changed files with 412 additions and 28 deletions
+2 -1
View File
@@ -14,6 +14,7 @@ func TestWithERPEnvironmentFileUsesApprovedFallbackValues(t *testing.T) {
"CMROUBAO_SHUNYUNBAO_USERNAME=dotenv-user",
"CMROUBAO_SHUNYUNBAO_PASSWORD='dotenv password #1'",
"CMROUBAO_OCR_API_URL=http://127.0.0.1:8000/ocr",
"CMROUBAO_ERP_DEBUG_LOG=true",
}, "\n"))
lookup, err := WithERPEnvironmentFile(path, func(string) (string, bool) {
@@ -29,7 +30,7 @@ func TestWithERPEnvironmentFileUsesApprovedFallbackValues(t *testing.T) {
if cfg.ShunyunbaoURL != "https://erp.example.test" ||
cfg.ShunyunbaoUsername != "dotenv-user" ||
cfg.ShunyunbaoPassword != "dotenv password #1" ||
cfg.OCRAPIURL != "http://127.0.0.1:8000/ocr" {
cfg.OCRAPIURL != "http://127.0.0.1:8000/ocr" || !cfg.ERPDebugLog {
t.Fatalf(
"ERP config = %#v",
struct {