test: check raw freshness without event date filter

This commit is contained in:
lingniu
2026-07-02 09:27:22 +08:00
parent 318486b1e9
commit 42de422935
2 changed files with 3 additions and 1 deletions

View File

@@ -319,7 +319,7 @@ def build_check_specs(
min_stat: int, min_stat: int,
max_raw_age_minutes: float | None = None, max_raw_age_minutes: float | None = None,
) -> list[CheckSpec]: ) -> list[CheckSpec]:
raw_params = {"dateFrom": date_from, "dateTo": date_to, "limit": 1, "orderBy": "receivedAt"} raw_params = {"limit": 1, "orderBy": "receivedAt"}
gb32960_history_params = {"protocol": "GB32960", "dateFrom": date_from, "dateTo": date_to, "limit": 1} gb32960_history_params = {"protocol": "GB32960", "dateFrom": date_from, "dateTo": date_to, "limit": 1}
jt808_history_params = {"protocol": "JT808", "dateFrom": date_from, "dateTo": date_to, "limit": 1} jt808_history_params = {"protocol": "JT808", "dateFrom": date_from, "dateTo": date_to, "limit": 1}
yutong_mqtt_history_params = {"protocol": "YUTONG_MQTT", "dateFrom": date_from, "dateTo": date_to, "limit": 1} yutong_mqtt_history_params = {"protocol": "YUTONG_MQTT", "dateFrom": date_from, "dateTo": date_to, "limit": 1}

View File

@@ -118,6 +118,8 @@ class GoNativeProdSmokeTest(unittest.TestCase):
self.assertTrue(raw_specs) self.assertTrue(raw_specs)
for spec in raw_specs: for spec in raw_specs:
self.assertEqual(spec.params.get("orderBy"), "receivedAt") self.assertEqual(spec.params.get("orderBy"), "receivedAt")
self.assertNotIn("dateFrom", spec.params)
self.assertNotIn("dateTo", spec.params)
def test_vehicle_identifier_prefers_vin_over_vehicle_key(self): def test_vehicle_identifier_prefers_vin_over_vehicle_key(self):
identifier = smoke.vehicle_identifier({ identifier = smoke.vehicle_identifier({