mirror of
https://github.com/henrygd/beszel.git
synced 2026-08-19 08:47:46 +02:00
fix(tests): stop system updaters on app termination
This commit is contained in:
@@ -117,6 +117,11 @@ func (sm *SystemManager) RemoveAllSystems() {
|
||||
sm.smartFetchMap.StopCleaner()
|
||||
}
|
||||
|
||||
// ResetContextForTesting replaces the manager context for a new synctest bubble.
|
||||
func (sm *SystemManager) ResetContextForTesting() {
|
||||
sm.ctx, sm.cancel = context.WithCancel(context.Background())
|
||||
}
|
||||
|
||||
func (s *System) StopUpdater() {
|
||||
s.cancel()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user