2024-04-03 14:46:32 +00:00
|
|
|
//go:build testing
|
|
|
|
|
// +build testing
|
|
|
|
|
|
|
|
|
|
package watcher
|
|
|
|
|
|
|
|
|
|
import "github.com/cloudbase/garm/database/common"
|
|
|
|
|
|
|
|
|
|
// SetWatcher sets the watcher to be used by the database package.
|
|
|
|
|
// This function is intended for use in tests only.
|
|
|
|
|
func SetWatcher(w common.Watcher) {
|
|
|
|
|
databaseWatcher = w
|
|
|
|
|
}
|
2024-06-17 19:42:50 +00:00
|
|
|
|
|
|
|
|
// GetWatcher returns the current watcher.
|
|
|
|
|
func GetWatcher() common.Watcher {
|
|
|
|
|
return databaseWatcher
|
|
|
|
|
}
|