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:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user