fix(platform): clarify vehicle service status labels
This commit is contained in:
@@ -159,6 +159,9 @@ func TestHandlerVehicleCoverageTreatsMissingCanonicalSourceAsDegraded(t *testing
|
||||
if row.ServiceStatus == nil || row.ServiceStatus.Status != "degraded" {
|
||||
t.Fatalf("missing canonical source should degrade vehicle service, got row=%+v body=%s", row, rec.Body.String())
|
||||
}
|
||||
if row.ServiceStatus.Title != "来源不完整" {
|
||||
t.Fatalf("missing canonical source should use explicit incomplete-source title, got row=%+v body=%s", row, rec.Body.String())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -410,6 +413,9 @@ func TestHandlerVehicleServiceSummaryEndpoint(t *testing.T) {
|
||||
}
|
||||
noDataStatusFound := false
|
||||
for _, status := range body.Data.ServiceStatuses {
|
||||
if status.Status == "degraded" && status.Title != "来源异常" {
|
||||
t.Fatalf("summary degraded status should use broad source exception title, got %+v", status)
|
||||
}
|
||||
if status.Status == "no_data" {
|
||||
noDataStatusFound = true
|
||||
if status.Title != "暂无数据来源" || status.Count != body.Data.NoDataVehicles {
|
||||
|
||||
Reference in New Issue
Block a user