feat(platform): expose missing sources per vehicle
This commit is contained in:
@@ -92,6 +92,18 @@ func TestHandlerVehicleCoverage(t *testing.T) {
|
||||
if body.Data.Items[0].ServiceStatus.Status != "degraded" {
|
||||
t.Fatalf("coverage row should expose degraded status, got %+v", body.Data.Items[0].ServiceStatus)
|
||||
}
|
||||
var rawBody struct {
|
||||
Data Page[struct {
|
||||
VIN string `json:"vin"`
|
||||
MissingProtocols []string `json:"missingProtocols"`
|
||||
}] `json:"data"`
|
||||
}
|
||||
if err := json.Unmarshal(rec.Body.Bytes(), &rawBody); err != nil {
|
||||
t.Fatalf("response JSON should decode missing source evidence: %v body=%s", err, rec.Body.String())
|
||||
}
|
||||
if len(rawBody.Data.Items) == 0 || !containsString(rawBody.Data.Items[0].MissingProtocols, "YUTONG_MQTT") {
|
||||
t.Fatalf("coverage row should expose missing canonical protocols, got %+v body=%s", rawBody.Data.Items, rec.Body.String())
|
||||
}
|
||||
}
|
||||
|
||||
func TestHandlerVehicleCoverageFiltersServiceStatus(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user