The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
grafana/pkg/services/ssosettings/ssosettingstests/fallback_strategy_fake.go

23 lines
527 B

package ssosettingstests
import context "context"
type FakeFallbackStrategy struct {
ExpectedIsMatch bool
ExpectedConfigs map[string]map[string]any
ExpectedError error
}
func NewFakeFallbackStrategy() *FakeFallbackStrategy {
return &FakeFallbackStrategy{}
}
func (f *FakeFallbackStrategy) IsMatch(provider string) bool {
return f.ExpectedIsMatch
}
func (f *FakeFallbackStrategy) GetProviderConfig(ctx context.Context, provider string) (map[string]any, error) {
return f.ExpectedConfigs[provider], f.ExpectedError
}