feat(platform): return service status in vehicle overview
This commit is contained in:
@@ -224,6 +224,9 @@ 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 != "部分来源离线" {
|
||||
t.Fatalf("overview endpoint should expose canonical service status, got %+v", body.Data.ServiceStatus)
|
||||
}
|
||||
if strings.Contains(rec.Body.String(), `"raw"`) || strings.Contains(rec.Body.String(), `"history"`) {
|
||||
t.Fatalf("overview endpoint should not return heavy detail pages: %s", rec.Body.String())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user