Plugins: Update plugin fakes package name (#112503)

update plugin fakes package name
This commit is contained in:
Will Browne
2025-10-16 15:14:05 +01:00
committed by GitHub
parent 1fb7953a95
commit 2223338e34
24 changed files with 219 additions and 219 deletions
@@ -6,7 +6,7 @@ import (
"testing"
"github.com/grafana/grafana/pkg/plugins"
"github.com/grafana/grafana/pkg/plugins/manager/fakes"
"github.com/grafana/grafana/pkg/plugins/manager/pluginfakes"
"github.com/grafana/grafana/pkg/plugins/manager/registry"
"github.com/grafana/grafana/pkg/plugins/repo"
"github.com/grafana/grafana/pkg/services/featuremgmt"
@@ -26,10 +26,10 @@ func TestService_IsDisabled(t *testing.T) {
&setting.Cfg{
PreinstallPluginsAsync: []setting.InstallPlugin{{ID: "myplugin"}},
},
pluginstore.New(registry.NewInMemory(), &fakes.FakeLoader{}, &fakes.FakeSourceRegistry{}),
&fakes.FakePluginInstaller{},
pluginstore.New(registry.NewInMemory(), &pluginfakes.FakeLoader{}, &pluginfakes.FakeSourceRegistry{}),
&pluginfakes.FakePluginInstaller{},
prometheus.NewRegistry(),
&fakes.FakePluginRepo{},
&pluginfakes.FakePluginRepo{},
featuremgmt.WithFeatures(),
&pluginchecker.FakePluginUpdateChecker{},
)
@@ -160,7 +160,7 @@ func TestService_Run(t *testing.T) {
}
installed := 0
installedFromURL := 0
store, err := pluginstore.NewPluginStoreForTest(preg, &fakes.FakeLoader{}, &fakes.FakeSourceRegistry{})
store, err := pluginstore.NewPluginStoreForTest(preg, &pluginfakes.FakeLoader{}, &pluginfakes.FakeSourceRegistry{})
require.NoError(t, err)
s, err := ProvideService(
&setting.Cfg{
@@ -168,7 +168,7 @@ func TestService_Run(t *testing.T) {
PreinstallPluginsSync: tt.pluginsToInstallSync,
},
store,
&fakes.FakePluginInstaller{
&pluginfakes.FakePluginInstaller{
AddFunc: func(ctx context.Context, pluginID string, version string, opts plugins.AddOpts) error {
for _, plugin := range tt.pluginsToFail {
if plugin == pluginID {
@@ -193,7 +193,7 @@ func TestService_Run(t *testing.T) {
},
},
prometheus.NewRegistry(),
&fakes.FakePluginRepo{
&pluginfakes.FakePluginRepo{
GetPluginArchiveInfoFunc: func(_ context.Context, pluginID, version string, _ repo.CompatOpts) (*repo.PluginArchiveInfo, error) {
return tt.latestPlugin, nil
},