65653e5c01
build / build (push) Successful in 1m14s
已覆盖只允许正确或错误,未覆盖可待确认,缺引用不再阻止正确结论。 复用统一事务写入与不可变审计重评旧待确认,保留原问答和人工结论。 验证:全仓 make verify、真实隔离 PostgreSQL 全包与 race 回归通过。
24 lines
812 B
Go
24 lines
812 B
Go
package qaopsquality
|
|
|
|
import (
|
|
"knowledge-governance/internal/dobotaiops"
|
|
"testing"
|
|
)
|
|
|
|
func TestUnansweredRecordsAreNotBusinessPending(t *testing.T) {
|
|
for _, coverage := range []string{"", "covered", "uncovered"} {
|
|
got := ProjectMasterWithEdits(View{}, map[string]string{"is_correct": "待确认"}, dobotaiops.CoverageCheck{Verdict: coverage}, nil).Effective.Correctness
|
|
expected := "pending"
|
|
if coverage == "" {
|
|
expected = ""
|
|
}
|
|
if got != expected {
|
|
t.Fatalf("coverage=%q correctness=%q expected=%q", coverage, got, expected)
|
|
}
|
|
}
|
|
got := ProjectMasterWithEdits(View{}, map[string]string{"is_correct": "待确认"}, dobotaiops.CoverageCheck{}, nil, dobotaiops.RecordFeedback{Down: 1})
|
|
if got.Effective.Correctness != "incorrect" {
|
|
t.Fatal("technical state bypassed active downvote")
|
|
}
|
|
}
|