garm/database/watcher/test_export.go
Gabriel Adrian Samfira b51683f1ae Add some tests
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2024-06-17 19:42:50 +00:00

17 lines
390 B
Go

//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
}
// GetWatcher returns the current watcher.
func GetWatcher() common.Watcher {
return databaseWatcher
}