Plugins: Update plugin fakes package name (#112503)
update plugin fakes package name
This commit is contained in:
@@ -10,14 +10,14 @@ import (
|
||||
"github.com/grafana/grafana-plugin-sdk-go/backend"
|
||||
"github.com/grafana/grafana/pkg/plugins"
|
||||
"github.com/grafana/grafana/pkg/plugins/backendplugin"
|
||||
"github.com/grafana/grafana/pkg/plugins/manager/fakes"
|
||||
"github.com/grafana/grafana/pkg/plugins/manager/pluginfakes"
|
||||
"github.com/grafana/grafana/pkg/util/testutil"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestQueryData(t *testing.T) {
|
||||
t.Run("Empty registry should return not registered error", func(t *testing.T) {
|
||||
registry := fakes.NewFakePluginRegistry()
|
||||
registry := pluginfakes.NewFakePluginRegistry()
|
||||
client := ProvideService(registry)
|
||||
_, err := client.QueryData(context.Background(), &backend.QueryDataRequest{})
|
||||
require.Error(t, err)
|
||||
@@ -64,7 +64,7 @@ func TestQueryData(t *testing.T) {
|
||||
|
||||
for _, tc := range tcs {
|
||||
t.Run(fmt.Sprintf("Plugin client error %q should return expected error", tc.err), func(t *testing.T) {
|
||||
registry := fakes.NewFakePluginRegistry()
|
||||
registry := pluginfakes.NewFakePluginRegistry()
|
||||
p := &plugins.Plugin{
|
||||
JSONData: plugins.JSONData{
|
||||
ID: "grafana",
|
||||
@@ -97,7 +97,7 @@ func TestQueryData(t *testing.T) {
|
||||
|
||||
func TestCheckHealth(t *testing.T) {
|
||||
t.Run("empty plugin registry should return plugin not registered error", func(t *testing.T) {
|
||||
registry := fakes.NewFakePluginRegistry()
|
||||
registry := pluginfakes.NewFakePluginRegistry()
|
||||
client := ProvideService(registry)
|
||||
_, err := client.CheckHealth(context.Background(), &backend.CheckHealthRequest{})
|
||||
require.Error(t, err)
|
||||
@@ -130,7 +130,7 @@ func TestCheckHealth(t *testing.T) {
|
||||
|
||||
for _, tc := range tcs {
|
||||
t.Run(fmt.Sprintf("Plugin client error %q should return expected error", tc.err), func(t *testing.T) {
|
||||
registry := fakes.NewFakePluginRegistry()
|
||||
registry := pluginfakes.NewFakePluginRegistry()
|
||||
p := &plugins.Plugin{
|
||||
JSONData: plugins.JSONData{
|
||||
ID: "grafana",
|
||||
@@ -160,7 +160,7 @@ func TestCheckHealth(t *testing.T) {
|
||||
func TestIntegrationCallResource(t *testing.T) {
|
||||
testutil.SkipIntegrationTestInShortMode(t)
|
||||
|
||||
registry := fakes.NewFakePluginRegistry()
|
||||
registry := pluginfakes.NewFakePluginRegistry()
|
||||
p := &plugins.Plugin{
|
||||
JSONData: plugins.JSONData{
|
||||
ID: "pid",
|
||||
|
||||
Reference in New Issue
Block a user