mirror of
https://github.com/grafana/grafana.git
synced 2025-07-31 09:12:11 +08:00
Plugins: Add context to StaticRouteResolver and ErrorResolver interfaces (#73121)
* add ctx * fix tests
This commit is contained in:
@ -247,7 +247,7 @@ func verifyBundledPlugins(t *testing.T, ctx context.Context, ps *store.Service)
|
||||
require.NotNil(t, dsPlugins["input"])
|
||||
|
||||
pluginRoutes := make(map[string]*plugins.StaticRoute)
|
||||
for _, r := range ps.Routes() {
|
||||
for _, r := range ps.Routes(ctx) {
|
||||
pluginRoutes[r.PluginID] = r
|
||||
}
|
||||
|
||||
@ -259,7 +259,7 @@ func verifyBundledPlugins(t *testing.T, ctx context.Context, ps *store.Service)
|
||||
|
||||
func verifyPluginStaticRoutes(t *testing.T, ctx context.Context, rr plugins.StaticRouteResolver, reg registry.Service) {
|
||||
routes := make(map[string]*plugins.StaticRoute)
|
||||
for _, route := range rr.Routes() {
|
||||
for _, route := range rr.Routes(ctx) {
|
||||
routes[route.PluginID] = route
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user