test: verify gb32960 history tables in production smoke

This commit is contained in:
lingniu
2026-07-02 01:39:45 +08:00
parent 9bd48c5781
commit 576644eb65
3 changed files with 10 additions and 4 deletions

View File

@@ -182,7 +182,8 @@ def build_check_specs(
max_raw_age_minutes: float | None = None,
) -> list[CheckSpec]:
raw_params = {"dateFrom": date_from, "dateTo": date_to, "limit": 1}
history_params = {"protocol": "JT808", "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}
return [
CheckSpec(
"gb32960.raw",
@@ -205,8 +206,10 @@ def build_check_specs(
min_raw,
max_age_minutes=max_raw_age_minutes,
),
CheckSpec("jt808.locations", "/api/history/locations", history_params, min_history),
CheckSpec("jt808.mileage_points", "/api/history/mileage-points", history_params, min_history),
CheckSpec("gb32960.locations", "/api/history/locations", gb32960_history_params, min_history),
CheckSpec("gb32960.mileage_points", "/api/history/mileage-points", gb32960_history_params, min_history),
CheckSpec("jt808.locations", "/api/history/locations", jt808_history_params, min_history),
CheckSpec("jt808.mileage_points", "/api/history/mileage-points", jt808_history_params, min_history),
CheckSpec(
"gb32960.daily_mileage",
"/api/stats/daily-metrics",

View File

@@ -73,6 +73,8 @@ class GoNativeProdSmokeTest(unittest.TestCase):
self.assertIn("gb32960.raw", names)
self.assertIn("jt808.raw", names)
self.assertIn("yutong_mqtt.raw", names)
self.assertIn("gb32960.locations", names)
self.assertIn("gb32960.mileage_points", names)
self.assertIn("jt808.locations", names)
self.assertIn("jt808.mileage_points", names)
self.assertIn("gb32960.daily_mileage", names)