SaveExternalService (OAuth) on plugin load (#69764)
This commit is contained in:
@@ -12,6 +12,7 @@ import (
|
||||
"github.com/grafana/grafana/pkg/plugins"
|
||||
"github.com/grafana/grafana/pkg/plugins/backendplugin"
|
||||
"github.com/grafana/grafana/pkg/plugins/log"
|
||||
"github.com/grafana/grafana/pkg/plugins/oauth"
|
||||
"github.com/grafana/grafana/pkg/plugins/repo"
|
||||
"github.com/grafana/grafana/pkg/plugins/storage"
|
||||
)
|
||||
@@ -422,3 +423,11 @@ func (f *FakePluginFileStore) File(ctx context.Context, pluginID, filename strin
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
type FakeOauthService struct {
|
||||
Result *oauth.ExternalService
|
||||
}
|
||||
|
||||
func (f *FakeOauthService) RegisterExternalService(ctx context.Context, name string, svc *oauth.ExternalServiceRegistration) (*oauth.ExternalService, error) {
|
||||
return f.Result, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user