Plugins: Migrate PluginStore mock to pre-existing fakes package (#71664)

* migrate to existing fakes package

* fix imports
This commit is contained in:
Will Browne
2023-07-17 10:21:44 +00:00
committed by GitHub
parent d707377700
commit a8577c21ba
22 changed files with 93 additions and 86 deletions
+3 -3
View File
@@ -15,7 +15,7 @@ import (
"github.com/grafana/grafana/pkg/api/routing"
"github.com/grafana/grafana/pkg/components/simplejson"
"github.com/grafana/grafana/pkg/infra/db/dbtest"
"github.com/grafana/grafana/pkg/plugins"
"github.com/grafana/grafana/pkg/plugins/manager/fakes"
ac "github.com/grafana/grafana/pkg/services/accesscontrol"
"github.com/grafana/grafana/pkg/services/accesscontrol/acimpl"
"github.com/grafana/grafana/pkg/services/accesscontrol/actest"
@@ -48,7 +48,7 @@ func TestDataSourcesProxy_userLoggedIn(t *testing.T) {
// handler func being tested
hs := &HTTPServer{
Cfg: setting.NewCfg(),
pluginStore: &plugins.FakePluginStore{},
pluginStore: &fakes.FakePluginStore{},
DataSourcesService: &dataSourcesServiceMock{
expectedDatasources: ds,
},
@@ -72,7 +72,7 @@ func TestDataSourcesProxy_userLoggedIn(t *testing.T) {
// handler func being tested
hs := &HTTPServer{
Cfg: setting.NewCfg(),
pluginStore: &plugins.FakePluginStore{},
pluginStore: &fakes.FakePluginStore{},
}
sc.handlerFunc = hs.DeleteDataSourceByName
sc.fakeReqWithParams("DELETE", sc.url, map[string]string{}).exec()