🧪 refactor: address code review feedback (rename fmt, improve push error logging)
Co-authored-by: qinfendebingshuo <207279273+qinfendebingshuo@users.noreply.github.com>
This commit is contained in:
parent
e3475f64e7
commit
bcecea3912
|
|
@ -50,4 +50,5 @@ jobs:
|
|||
git config user.email "zhuyuan@guanghulab.com"
|
||||
git add signal-log/
|
||||
git diff --cached --quiet || git commit -m "🧪 连通性测试信号日志 · YM-TEST-20260307-001"
|
||||
git push || true
|
||||
# push 可能因分支保护或无变更而失败,不影响测试结果
|
||||
git push || echo "⚠️ 信号日志推送失败(可能无变更或分支受保护)"
|
||||
|
|
|
|||
|
|
@ -293,13 +293,13 @@ async function main() {
|
|||
}
|
||||
|
||||
// ── 输出汇总 ──────────────────────────────────────────
|
||||
const fmt = (r) => r.ok ? `✅(page_id: ${r.pageId})` : `❌(${r.error})`;
|
||||
const formatResult = (r) => r.ok ? `✅(page_id: ${r.pageId})` : `❌(${r.error})`;
|
||||
|
||||
console.log('\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
|
||||
console.log('✅ YM-TEST-20260307-001 连通性测试完成');
|
||||
console.log(`· 信号日志写入:${signalLogSkipped ? '⚠️ 跳过(SIGNAL_LOG_DB_ID 未配置)' : fmt(results.signalLog)}`);
|
||||
console.log(`· 变更日志写入:${fmt(results.changeLog)}`);
|
||||
console.log(`· SYSLOG收件箱写入:${fmt(results.syslogInbox)}`);
|
||||
console.log(`· 信号日志写入:${signalLogSkipped ? '⚠️ 跳过(SIGNAL_LOG_DB_ID 未配置)' : formatResult(results.signalLog)}`);
|
||||
console.log(`· 变更日志写入:${formatResult(results.changeLog)}`);
|
||||
console.log(`· SYSLOG收件箱写入:${formatResult(results.syslogInbox)}`);
|
||||
console.log(`· 总结:数据桥状态 = ${bridgeStatus}`);
|
||||
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue