MCPcopy Create free account
hub / github.com/cloudbase/garm / maybeInitController

Function maybeInitController

database/watcher/watcher_test.go:307–317  ·  view source on GitHub ↗
(db common.Store)

Source from the content-addressed store, hash-verified

305}
306
307func maybeInitController(db common.Store) error {
308 if _, err := db.ControllerInfo(); err == nil {
309 return nil
310 }
311
312 if _, err := db.InitController(); err != nil {
313 return fmt.Errorf("error initializing controller: %w", err)
314 }
315
316 return nil
317}
318
319func (s *WatcherTestSuite) TestWithEntityPoolFilterRepository() {
320 producer, err := watcher.RegisterProducer(s.ctx, "test-producer")

Callers 1

TestWatcherTestSuiteFunction · 0.70

Calls 2

ControllerInfoMethod · 0.65
InitControllerMethod · 0.65

Tested by

no test coverage detected