Refreshing machines should be better covered by unit tests
The code that triggers refreshing the state of the machines and daemons lacks proper unit tests. Specifically the function getStateFromDaemons()
in backend/server/apps/kea/appkea.go
(or the functions that call this function) should be tested to cover the complexity of what this function is doing. Note that it sends multiple commands to Kea which may alter the state of the app, i.e. modify the daemons (some may be removed), modify the loggers etc. The current unit tests merely check that the initial state can be fetched, without going into the details whether the fetched state is correct.