Files
junhong_cmp_fiber/internal/infrastructure/releasegate/checker_test.go
break 17782d5f8e
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 9m20s
实现七月迭代公共技术基础
2026-07-23 17:52:48 +09:00

21 lines
592 B
Go

package releasegate
import "testing"
func TestReportBlocksOnlyOnBlockingFindings(t *testing.T) {
t.Parallel()
report := Report{Phase: PhasePre, Findings: []Finding{{
Code: "FOUNDATION_OBJECT_MISSING", Severity: SeverityInfo, Object: "tb_outbox_event",
}}}
if !report.Passed() {
t.Fatal("迁移前公共对象尚未创建不应单独阻断发布")
}
report.Findings = append(report.Findings, Finding{
Code: "OUTBOX_UNDELIVERED", Severity: SeverityBlock, Object: "tb_outbox_event", Count: 1,
})
if report.Passed() {
t.Fatal("存在未投递事件时必须阻断发布")
}
}