Files
grafana/pkg/services/ngalert/state/historian/testing.go
T
Vadim Stepanov bccc980b90 Alerting: Notifiication history (#107644)
* Add unified_alerting.notification_history to ini files

* Parse notification history settings

* Move Loki client to a separate package

* Loki client: add params for metrics and traces

* add NotificationHistorian

* rm writeDuration

* remove RangeQuery stuff

* wip

* wip

* wip

* wip

* pass notification historian in tests

* unify loki settings

* unify loki settings

* add test

* update grafana/alerting

* make update-workspace

* add feature toggle

* fix configureNotificationHistorian

* Revert "add feature toggle"

This reverts commit de7af8f7

* add feature toggle

* more tests

* RuleUID

* fix metrics test

* met.Info.Set(0)
2025-07-17 14:26:26 +01:00

19 lines
457 B
Go

package historian
import (
"context"
"fmt"
"github.com/grafana/grafana/pkg/services/annotations"
)
type failingAnnotationRepo struct{}
func (f *failingAnnotationRepo) SaveMany(_ context.Context, _ []annotations.Item) error {
return fmt.Errorf("failed to save annotations")
}
func (f *failingAnnotationRepo) Find(_ context.Context, _ *annotations.ItemQuery) ([]*annotations.ItemDTO, error) {
return nil, fmt.Errorf("failed to query annotations")
}