test: verify mqtt history tables in production smoke

This commit is contained in:
lingniu
2026-07-02 01:41:08 +08:00
parent 576644eb65
commit 4e8434c511
3 changed files with 7 additions and 2 deletions

View File

@@ -184,6 +184,7 @@ def build_check_specs(
raw_params = {"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}
yutong_mqtt_history_params = {"protocol": "YUTONG_MQTT", "dateFrom": date_from, "dateTo": date_to, "limit": 1}
return [
CheckSpec(
"gb32960.raw",
@@ -210,6 +211,8 @@ def build_check_specs(
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("yutong_mqtt.locations", "/api/history/locations", yutong_mqtt_history_params, min_history),
CheckSpec("yutong_mqtt.mileage_points", "/api/history/mileage-points", yutong_mqtt_history_params, min_history),
CheckSpec(
"gb32960.daily_mileage",
"/api/stats/daily-metrics",

View File

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