test(ops): 修复健康分数测试用例期望值

- 更新 TestComputeBusinessHealth 中 SLA 95% 边界测试的期望值
- 更新 TestComputeDashboardHealthScore 中中等健康度测试的期望值
- 适配移除延迟组件后的新健康分数计算逻辑
This commit is contained in:
IanShaw027
2026-01-14 23:39:09 +08:00
parent 76448ab555
commit 9b10241561
2 changed files with 168 additions and 4 deletions

View File

@@ -127,8 +127,8 @@ func TestComputeDashboardHealthScore_Comprehensive(t *testing.T) {
MemoryUsagePercent: float64Ptr(75),
},
},
wantMin: 60,
wantMax: 85,
wantMin: 57,
wantMax: 58,
},
{
name: "DB failure",
@@ -277,8 +277,8 @@ func TestComputeBusinessHealth(t *testing.T) {
UpstreamErrorRate: 0,
Duration: OpsPercentiles{P99: intPtr(500)},
},
wantMin: 50,
wantMax: 60,
wantMin: 37,
wantMax: 38,
},
{
name: "error rate boundary 0.5%",