fix(tests): stub is_alive so no test opens a socket #18

Merged
christianmanivong merged 1 commits from fix/bugs-2026-11-02c into main 2026-11-02 09:57:11 +00:00
1 Commits
Author SHA1 Message Date
Christian Manivong 745946387f fix(tests): stub is_alive so no test opens a socket
driver / standard (pull_request) Successful in 18s
driver / lint (pull_request) Successful in 15s
driver / types (pull_request) Successful in 1m9s
driver / test (3.12) (pull_request) Successful in 1m9s
driver / test (3.13) (pull_request) Successful in 1m0s
driver / lowest (pull_request) Successful in 34s
driver / build (pull_request) Successful in 33s
driver / security (pull_request) Successful in 1m14s
CI / driver (pull_request) Successful in 2m56s
driver / publish (pull_request) Skipped
NAPALM's __del__ calls is_alive(), and this driver's is_alive() opens a
TCP connection to the gateway whether or not the driver was opened or
closed, so every driver a test built connected to 192.168.1.1:80 when
it was collected. The tests now build their drivers with an is_alive()
that opens nothing (the is_alive tests call the class's method), and a
session-wide guard in conftest refuses every connection and fails the
run if anything tried one.

Closes #17
2026-11-02 10:41:58 +01:00