fix(platform): unify degraded service wording
This commit is contained in:
@@ -429,13 +429,13 @@ func TestHandlerVehicleServiceOverviewEndpoint(t *testing.T) {
|
||||
if body.Data.SourceCount != 2 || body.Data.OnlineSourceCount != 1 || body.Data.CoverageStatus != "partial" {
|
||||
t.Fatalf("overview endpoint should summarize vehicle service coverage, got %+v", body.Data)
|
||||
}
|
||||
if body.Data.ServiceStatus == nil || body.Data.ServiceStatus.Status != "degraded" || body.Data.ServiceStatus.Title != "部分来源离线" {
|
||||
if body.Data.ServiceStatus == nil || body.Data.ServiceStatus.Status != "degraded" || body.Data.ServiceStatus.Title != "来源不完整" {
|
||||
t.Fatalf("overview endpoint should expose canonical service status, got %+v", body.Data.ServiceStatus)
|
||||
}
|
||||
if body.Data.SourceConsistency == nil || body.Data.SourceConsistency.SourceCount != 2 || body.Data.SourceConsistency.OnlineSourceCount != 1 {
|
||||
t.Fatalf("overview endpoint should expose source consistency, got %+v", body.Data.SourceConsistency)
|
||||
}
|
||||
if body.Data.SourceConsistency.Status != "degraded" || body.Data.SourceConsistency.Title != "部分来源离线" {
|
||||
if body.Data.SourceConsistency.Status != "degraded" || body.Data.SourceConsistency.Title != "来源不完整" {
|
||||
t.Fatalf("overview source consistency should expose diagnosis, got %+v", body.Data.SourceConsistency)
|
||||
}
|
||||
if strings.Contains(rec.Body.String(), `"raw"`) || strings.Contains(rec.Body.String(), `"history"`) {
|
||||
@@ -468,8 +468,8 @@ 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 == "degraded" && status.Title != "来源不完整" {
|
||||
t.Fatalf("summary degraded status should use vehicle-service missing source title, got %+v", status)
|
||||
}
|
||||
if status.Status == "no_data" {
|
||||
noDataStatusFound = true
|
||||
|
||||
Reference in New Issue
Block a user