Plugins: Modify interface for plugin validations to allow taking PDC into account (#96089)
* Request interceptor: Do not block PDC * Apply change after feedback received * Add test * Check if secure socks proxy configured for the instance * Apply suggestions from code review * Add dedicated service for datasource request URL validation (#99179) --------- Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
This commit is contained in:
co-authored by
Will Browne
parent
33a53d170b
commit
d192a44469
@@ -152,18 +152,18 @@ func buildQueryDataService(t *testing.T, cs datasources.CacheService, fpc *fakeP
|
||||
setting.NewCfg(),
|
||||
cs,
|
||||
nil,
|
||||
&fakePluginRequestValidator{},
|
||||
&fakeDataSourceRequestValidator{},
|
||||
fpc,
|
||||
pCtxProvider,
|
||||
)
|
||||
}
|
||||
|
||||
// copied from pkg/api/metrics_test.go
|
||||
type fakePluginRequestValidator struct {
|
||||
type fakeDataSourceRequestValidator struct {
|
||||
err error
|
||||
}
|
||||
|
||||
func (rv *fakePluginRequestValidator) Validate(dsURL string, req *http.Request) error {
|
||||
func (rv *fakeDataSourceRequestValidator) Validate(ds *datasources.DataSource, req *http.Request) error {
|
||||
return rv.err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user