@@ -16,6 +16,7 @@ import (
16
16
"github.com/grafana/grafana/pkg/plugins"
17
17
"github.com/grafana/grafana/pkg/services/accesscontrol/acimpl"
18
18
"github.com/grafana/grafana/pkg/services/authn"
19
+ "github.com/grafana/grafana/pkg/services/authz/zanzana"
19
20
contextmodel "github.com/grafana/grafana/pkg/services/contexthandler/model"
20
21
"github.com/grafana/grafana/pkg/services/featuremgmt"
21
22
"github.com/grafana/grafana/pkg/services/org"
@@ -265,7 +266,7 @@ func TestPluginProxy(t *testing.T) {
265
266
SecureJSONData : map [string ][]byte {},
266
267
}
267
268
cfg := & setting.Cfg {}
268
- proxy , err := NewPluginProxy (ps , routes , ctx , "" , cfg , secretsService , tracing .InitializeTracerForTest (), & http.Transport {}, acimpl .ProvideAccessControl (featuremgmt .WithFeatures ()), featuremgmt .WithFeatures ())
269
+ proxy , err := NewPluginProxy (ps , routes , ctx , "" , cfg , secretsService , tracing .InitializeTracerForTest (), & http.Transport {}, acimpl .ProvideAccessControl (featuremgmt .WithFeatures (), zanzana . NewNoopClient () ), featuremgmt .WithFeatures ())
269
270
require .NoError (t , err )
270
271
proxy .HandleRequest ()
271
272
@@ -421,7 +422,7 @@ func TestPluginProxyRoutes(t *testing.T) {
421
422
SecureJSONData : map [string ][]byte {},
422
423
}
423
424
cfg := & setting.Cfg {}
424
- proxy , err := NewPluginProxy (ps , testRoutes , ctx , tc .proxyPath , cfg , secretsService , tracing .InitializeTracerForTest (), & http.Transport {}, acimpl .ProvideAccessControl (featuremgmt .WithFeatures ()), featuremgmt .WithFeatures (tc .withFeatures ... ))
425
+ proxy , err := NewPluginProxy (ps , testRoutes , ctx , tc .proxyPath , cfg , secretsService , tracing .InitializeTracerForTest (), & http.Transport {}, acimpl .ProvideAccessControl (featuremgmt .WithFeatures (), zanzana . NewNoopClient () ), featuremgmt .WithFeatures (tc .withFeatures ... ))
425
426
require .NoError (t , err )
426
427
proxy .HandleRequest ()
427
428
@@ -536,7 +537,7 @@ func TestPluginProxyRoutesAccessControl(t *testing.T) {
536
537
SecureJSONData : map [string ][]byte {},
537
538
}
538
539
cfg := & setting.Cfg {}
539
- proxy , err := NewPluginProxy (ps , testRoutes , ctx , tc .proxyPath , cfg , secretsService , tracing .InitializeTracerForTest (), & http.Transport {}, acimpl .ProvideAccessControl (featuremgmt .WithFeatures ()), featuremgmt .WithFeatures (featuremgmt .FlagAccessControlOnCall ))
540
+ proxy , err := NewPluginProxy (ps , testRoutes , ctx , tc .proxyPath , cfg , secretsService , tracing .InitializeTracerForTest (), & http.Transport {}, acimpl .ProvideAccessControl (featuremgmt .WithFeatures (), zanzana . NewNoopClient () ), featuremgmt .WithFeatures (featuremgmt .FlagAccessControlOnCall ))
540
541
require .NoError (t , err )
541
542
proxy .HandleRequest ()
542
543
@@ -567,7 +568,7 @@ func getPluginProxiedRequest(t *testing.T, ps *pluginsettings.DTO, secretsServic
567
568
ReqRole : org .RoleEditor ,
568
569
}
569
570
}
570
- proxy , err := NewPluginProxy (ps , []* plugins.Route {}, ctx , "" , cfg , secretsService , tracing .InitializeTracerForTest (), & http.Transport {}, acimpl .ProvideAccessControl (featuremgmt .WithFeatures ()), featuremgmt .WithFeatures ())
571
+ proxy , err := NewPluginProxy (ps , []* plugins.Route {}, ctx , "" , cfg , secretsService , tracing .InitializeTracerForTest (), & http.Transport {}, acimpl .ProvideAccessControl (featuremgmt .WithFeatures (), zanzana . NewNoopClient () ), featuremgmt .WithFeatures ())
571
572
require .NoError (t , err )
572
573
573
574
req , err := http .NewRequest (http .MethodGet , "/api/plugin-proxy/grafana-simple-app/api/v4/alerts" , nil )
0 commit comments