Files
grafana/apps/dashboard/pkg/migration/testutil/mocks.go
T
Ivan Ortega Alba 59c2f15433 Dashboard V0->V1 Migration: Schema migration v36 (#100757)
---------

Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
Co-authored-by: Haris Rozajac <haris.rozajac12@gmail.com>
Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>
2025-06-16 15:53:41 +02:00

32 lines
736 B
Go

package testutil
import "github.com/grafana/grafana/apps/dashboard/pkg/migration/schemaversion"
type TestDataSourceProvider struct{}
func (m *TestDataSourceProvider) GetDataSourceInfo() []schemaversion.DataSourceInfo {
return []schemaversion.DataSourceInfo{
{
Default: true,
UID: "default-ds",
Type: "prometheus",
APIVersion: "v1",
Name: "Default",
ID: 1,
},
{
Default: false,
UID: "other-ds",
Type: "elasticsearch",
APIVersion: "v2",
Name: "Elasticsearch",
ID: 2,
},
}
}
// GetTestProvider returns a singleton instance of the test provider
func GetTestProvider() *TestDataSourceProvider {
return &TestDataSourceProvider{}
}