test(facts): check get_facts against the gateway's recorded answers (#24)
driver / standard (pull_request) Successful in 18s
driver / lint (pull_request) Successful in 16s
driver / types (pull_request) Successful in 1m5s
driver / test (3.13) (pull_request) Successful in 1m10s
driver / test (3.12) (pull_request) Successful in 1m12s
driver / lowest (pull_request) Successful in 29s
driver / build (pull_request) Successful in 31s
driver / security (pull_request) Successful in 1m5s
CI / driver (pull_request) Successful in 2m35s
driver / publish (pull_request) Skipped

get_facts read SerialNumber, HostName, SystemUpTime and MacAddress
from getBasicInformation, which a VMG4005-B50A (V5.17(ABQA.3.1)C0)
answers with model, firmware and language settings only. The code
was fixed by #26 (host name and domain from the System page) and #28
(serial number and uptime from cardpage_status); the tests still fed
it an invented getBasicInformation (MOCK_BASIC_INFO) that carried
those fields, with an invented serial number and firmware.

MOCK_BASIC_INFO is now the recorded answer, and a new test reads the
facts from the recorded, sealed status page and the System page: it
fails against the driver before #26 with the symptoms of this issue
(serial "", uptime 0, host name the connection address). The README
names the sources get_facts reads.

Closes #24
This commit is contained in:
Christian Manivong committed 2026-11-12 19:06:53 +01:00
1 parent 3213dfaaaa
commit b6668eddbd
4 files changed
+42 -23

No files matched your search

+3 -3
View File
@@ -41,9 +41,9 @@ All notable changes to this driver. The format follows
from `getBasicInformation`, which a VMG4005-B50A does not send them in, and reported
`""` and `0`. They now come from `DeviceInfo` in the DAL's `cardpage_status`, the
answer the interfaces are read from; `get_facts()` reads that answer once for both.
- `get_facts()` reports the gateway's host name and domain: `hostname` is the name on
the gateway's System page (`GET /cgi-bin/System?oid=snmp`), `fqdn` that name with its
domain (`VMG4005-B50A.home`). Both were read from `getBasicInformation`, which a
- `get_facts()` reports the gateway's host name and domain (#24): `hostname` is the
name on the gateway's System page (`GET /cgi-bin/System?oid=snmp`), `fqdn` that name
with its domain (`VMG4005-B50A.home`). Both were read from `getBasicInformation`, which a
VMG4005-B50A does not send them in, so they fell back to the address the driver
connects to and netOrk kept the device named `192.168.1.1`. A gateway with no name
set reports `""`; `get_facts()` raises when the System page cannot be read.