mirror of
https://github.com/grafana/grafana.git
synced 2025-08-03 00:42:03 +08:00
Plugins: Migrate PluginStore mock to pre-existing fakes package (#71664)
* migrate to existing fakes package * fix imports
This commit is contained in:
@ -17,6 +17,7 @@ import (
|
||||
"github.com/grafana/grafana/pkg/login/social"
|
||||
"github.com/grafana/grafana/pkg/plugins"
|
||||
"github.com/grafana/grafana/pkg/plugins/config"
|
||||
"github.com/grafana/grafana/pkg/plugins/manager/fakes"
|
||||
"github.com/grafana/grafana/pkg/plugins/pluginscdn"
|
||||
accesscontrolmock "github.com/grafana/grafana/pkg/services/accesscontrol/mock"
|
||||
"github.com/grafana/grafana/pkg/services/featuremgmt"
|
||||
@ -47,7 +48,7 @@ func setupTestEnvironment(t *testing.T, cfg *setting.Cfg, features *featuremgmt.
|
||||
|
||||
var pluginStore = pstore
|
||||
if pluginStore == nil {
|
||||
pluginStore = &plugins.FakePluginStore{}
|
||||
pluginStore = &fakes.FakePluginStore{}
|
||||
}
|
||||
|
||||
var pluginsSettings = psettings
|
||||
@ -218,7 +219,7 @@ func TestHTTPServer_GetFrontendSettings_apps(t *testing.T) {
|
||||
{
|
||||
desc: "disabled app with preload",
|
||||
pluginStore: func() plugins.Store {
|
||||
return &plugins.FakePluginStore{
|
||||
return &fakes.FakePluginStore{
|
||||
PluginList: []plugins.PluginDTO{
|
||||
{
|
||||
Module: fmt.Sprintf("/%s/module.js", "test-app"),
|
||||
@ -251,7 +252,7 @@ func TestHTTPServer_GetFrontendSettings_apps(t *testing.T) {
|
||||
{
|
||||
desc: "enabled app with preload",
|
||||
pluginStore: func() plugins.Store {
|
||||
return &plugins.FakePluginStore{
|
||||
return &fakes.FakePluginStore{
|
||||
PluginList: []plugins.PluginDTO{
|
||||
{
|
||||
Module: fmt.Sprintf("/%s/module.js", "test-app"),
|
||||
@ -284,7 +285,7 @@ func TestHTTPServer_GetFrontendSettings_apps(t *testing.T) {
|
||||
{
|
||||
desc: "angular app plugin",
|
||||
pluginStore: func() plugins.Store {
|
||||
return &plugins.FakePluginStore{
|
||||
return &fakes.FakePluginStore{
|
||||
PluginList: []plugins.PluginDTO{
|
||||
{
|
||||
Module: fmt.Sprintf("/%s/module.js", "test-app"),
|
||||
|
Reference in New Issue
Block a user