prepareInMemoryAlertStore builds and returns an in-memory alert store.
()
| 2262 | |
| 2263 | // prepareInMemoryAlertStore builds and returns an in-memory alert store. |
| 2264 | func prepareInMemoryAlertStore() (alertstore.AlertStore, error) { |
| 2265 | usersScannerConfig := users.UsersScannerConfig{Strategy: users.UserScanStrategyList} |
| 2266 | reg := prometheus.NewPedanticRegistry() |
| 2267 | bucket := objstore.NewInMemBucket() |
| 2268 | mBucketClient := &alertstore.MockBucket{Bucket: bucket} |
| 2269 | return bucketclient.NewBucketAlertStore(mBucketClient, usersScannerConfig, nil, log.NewNopLogger(), reg) |
| 2270 | } |
| 2271 | |
| 2272 | func prepareUserDir(t *testing.T, storeDir string, user string) (userDir string, templateDir string) { |
| 2273 | userDir = filepath.Join(storeDir, user) |
no test coverage detected