fix: normalize live verify peer filters
Some checks failed
ci/woodpecker/push/woodpecker Pipeline was canceled
Some checks failed
ci/woodpecker/push/woodpecker Pipeline was canceled
This commit is contained in:
@@ -55,6 +55,24 @@ class VehicleIngestLiveVerifyTest(unittest.TestCase):
|
||||
self.assertIn("ts >= '2026-06-29 00:00:00'", sql)
|
||||
self.assertIn("ts <= '2026-06-29 23:59:59'", sql)
|
||||
|
||||
def test_gb32960_peer_filter_treats_plain_ip_as_contains_pattern(self):
|
||||
sql = live_verify.gb32960_platform_login_count_sql(
|
||||
date_from="2026-06-29 00:00:00",
|
||||
date_to="2026-06-29 23:59:59",
|
||||
peer_like="115.29.187.205",
|
||||
)
|
||||
|
||||
self.assertIn("peer LIKE '%115.29.187.205%'", sql)
|
||||
|
||||
def test_gb32960_peer_filter_preserves_explicit_like_pattern(self):
|
||||
sql = live_verify.gb32960_platform_login_count_sql(
|
||||
date_from="2026-06-29 00:00:00",
|
||||
date_to="2026-06-29 23:59:59",
|
||||
peer_like="115.29.187.%",
|
||||
)
|
||||
|
||||
self.assertIn("peer LIKE '115.29.187.%'", sql)
|
||||
|
||||
def test_jt808_location_sql_uses_dedicated_location_stable_without_protocol_filter(self):
|
||||
sql = live_verify.jt808_location_count_sql(
|
||||
date_from="2026-06-29 00:00:00",
|
||||
|
||||
Reference in New Issue
Block a user