fix: 清除硬编码API Key与机器特定路径,改用环境变量+混合式路径解析

This commit is contained in:
hangshuo652
2026-08-25 21:53:18 +08:00
parent b3895a905e
commit 8e81f960af
32 changed files with 200 additions and 76 deletions
+7 -4
View File
@@ -1,12 +1,12 @@
"""
Golden tests — 对接真实 COBOL 信用卡月结系统
数据源: D:\cobol-java\jcl-cobol-git\
数据源: COBOL_GIT_ROOT 环境变量指定的 jcl-cobol-git 目录
验证目标: 28 transactions → 20 valid + 8 rejected → 6 cards → ¥48,250.20 total
"""
import sys, os
sys.path.insert(0, r"D:\cobol-java\v3-gstack-code-gen")
from pathlib import Path
sys.path.insert(0, str(Path(__file__).resolve().parent.parent))
from data.field_tree import Field, FieldTree
from comparator.cobol_binary_reader import CobolBinaryReader
from comparator.normalizer import Normalizer
@@ -14,7 +14,10 @@ from comparator.field_compare import compare_field
from comparator.aligner import align_records
from preprocessor import CopybookPreprocessor
GOLDEN = Path(r"D:\cobol-java\jcl-cobol-git")
GOLDEN = Path(
os.environ.get("COBOL_GIT_ROOT",
Path(__file__).resolve().parent.parent.parent / "jcl-cobol-git")
)
# ── Test 1: TXCPY COPYBOOK 结构验证 ──