Fix CI: extract computeState() for testability; make network init non-fatal

network.init() no longer panics when D-Bus is unavailable (logs warning
instead). This allows go test to run in the nix build sandbox.

checkState() now calls computeState() which returns the target state
without triggering page navigation (which requires OpenGL). Tests call
computeState() directly, avoiding the SIGSEGV from gl.GenVertexArrays.

7 regression tests for state machine, all passing.
This commit is contained in:
NeilClack
2026-07-11 14:42:49 -05:00
parent 3f8144a708
commit 363e6f81f6
3 changed files with 165 additions and 73 deletions
+1 -2
View File
@@ -40,8 +40,7 @@ func init() {
var err error
nm, err = gonm.NewNetworkManager()
if err != nil {
logger.Fatal("network: failed to connect to NetworkManager: %v\n", err)
panic(err)
logger.Warning("network: NetworkManager unavailable, network features disabled: %v", err)
}
}