DataSources: Add datasource fetching + querying interface (#80749)

* first pass

* separate oss + enterprise

* tidy things up

* add ctx

* fix tests

* use standalone svcs

* mv plugin context provide

* fix wire

* fix import
This commit is contained in:
Will Browne
2024-01-19 15:56:52 +01:00
committed by GitHub
parent bb0fa4f99a
commit 3f30cbf91c
21 changed files with 342 additions and 196 deletions
+2 -1
View File
@@ -61,7 +61,8 @@ func framesPassThroughService(t *testing.T, frames data.Frames) (data.Frames, er
PluginList: []pluginstore.Plugin{
{JSONData: plugins.JSONData{ID: "test"}},
}},
&datafakes.FakeDataSourceService{}, nil, pluginFakes.NewFakeLicensingService(), &config.Cfg{}),
&datafakes.FakeCacheService{}, &datafakes.FakeDataSourceService{},
nil, pluginFakes.NewFakeLicensingService(), &config.Cfg{}),
tracer: tracing.InitializeTracerForTest(),
metrics: newMetrics(nil),
}
+2 -2
View File
@@ -42,7 +42,7 @@ func TestService(t *testing.T) {
PluginList: []pluginstore.Plugin{
{JSONData: plugins.JSONData{ID: "test"}},
},
}, &datafakes.FakeDataSourceService{}, nil, fakes.NewFakeLicensingService(), &config.Cfg{})
}, &datafakes.FakeCacheService{}, &datafakes.FakeDataSourceService{}, nil, fakes.NewFakeLicensingService(), &config.Cfg{})
s := Service{
cfg: setting.NewCfg(),
@@ -128,7 +128,7 @@ func TestDSQueryError(t *testing.T) {
PluginList: []pluginstore.Plugin{
{JSONData: plugins.JSONData{ID: "test"}},
},
}, &datafakes.FakeDataSourceService{}, nil, nil, &config.Cfg{})
}, &datafakes.FakeCacheService{}, &datafakes.FakeDataSourceService{}, nil, nil, &config.Cfg{})
s := Service{
cfg: setting.NewCfg(),