fix(fingerprint): drop the GS1920 and GS2210 switch patterns

GS1920 and GS2210 are Zyxel switches. Counting them as evidence for a
VMG gateway driver made discovery score a Zyxel switch higher for this
driver than a real VMG gateway.

Closes #4
This commit is contained in:
Christian Manivong committed 2026-11-01 21:54:55 +01:00
1 parent 7fbb7034d3
commit d5362fd382
3 files changed
+15 -2

No files matched your search

+12
View File
@@ -421,3 +421,15 @@ class TestZyxelVMGDriver:
def test_cli(self):
self._setup_mocked_http()
assert self.driver.cli(["show version"]) == {}
@pytest.mark.parametrize("switch_model", ["gs1920", "gs2210"])
def test_a_zyxel_switch_page_adds_no_evidence_for_this_gateway(switch_model):
"""GS1920 and GS2210 are Zyxel switches, not VMG gateways."""
page = f"zyxel {switch_model}-24hp web configurator"
matching = [
rule.pattern
for rule in ZyxelVMGDriver.HTTP_FINGERPRINT
if not rule.negative and rule.pattern != "zyxel" and rule.pattern in page
]
assert matching == []