feat(t230): use OCR for ERP session login
This commit is contained in:
@@ -13,6 +13,7 @@ func TestWithERPEnvironmentFileUsesApprovedFallbackValues(t *testing.T) {
|
||||
"CMROUBAO_SHUNYUNBAO_URL=https://erp.example.test",
|
||||
"CMROUBAO_SHUNYUNBAO_USERNAME=dotenv-user",
|
||||
"CMROUBAO_SHUNYUNBAO_PASSWORD='dotenv password #1'",
|
||||
"CMROUBAO_OCR_API_URL=http://127.0.0.1:8000/ocr",
|
||||
}, "\n"))
|
||||
|
||||
lookup, err := WithERPEnvironmentFile(path, func(string) (string, bool) {
|
||||
@@ -27,14 +28,16 @@ func TestWithERPEnvironmentFileUsesApprovedFallbackValues(t *testing.T) {
|
||||
}
|
||||
if cfg.ShunyunbaoURL != "https://erp.example.test" ||
|
||||
cfg.ShunyunbaoUsername != "dotenv-user" ||
|
||||
cfg.ShunyunbaoPassword != "dotenv password #1" {
|
||||
cfg.ShunyunbaoPassword != "dotenv password #1" ||
|
||||
cfg.OCRAPIURL != "http://127.0.0.1:8000/ocr" {
|
||||
t.Fatalf(
|
||||
"ERP config = %#v",
|
||||
struct {
|
||||
URL string
|
||||
Username string
|
||||
Password string
|
||||
}{cfg.ShunyunbaoURL, cfg.ShunyunbaoUsername, cfg.ShunyunbaoPassword},
|
||||
OCRURL string
|
||||
}{cfg.ShunyunbaoURL, cfg.ShunyunbaoUsername, cfg.ShunyunbaoPassword, cfg.OCRAPIURL},
|
||||
)
|
||||
}
|
||||
if _, exists := lookup("OTHER_TOOL_TOKEN"); exists {
|
||||
|
||||
Reference in New Issue
Block a user