mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-10-12 01:58:46 +02:00
The genuine-failure cases fed a fabricated error straight to logIfaceLookupFailure, so they exercised only its own branching. A restoration failure never reaches that helper, and no test reached the enumeration classification in netInterface at all: discarding the enumeration error, or downgrading an actual restoration failure to debug, both kept the suite green. The host boundaries of the reset path are now variables, in the style the package already uses: the interface enumeration, the interface lookup, the DNS setters and the NetworkManager restore. The tests stub them, so a run changes no host DNS or NetworkManager state, and drive the real netInterface and resetDNSForRunningIface to assert that a failed enumeration keeps its cause and is not reported as a missing interface, and that a failure to restore the saved static config or to reset to DHCP on an interface that does exist stays at error level. Both surviving mutations, and three more, now fail.