mirror of
https://github.com/grafana/grafana.git
synced 2025-08-03 02:12:24 +08:00
PluginProxy: Split implementations of token providers (#32820)
* Split implementations of token providers * Fix imports * Fix code racing in unit tests
This commit is contained in:
@ -249,7 +249,10 @@ func TestDataSourceProxy_routeRule(t *testing.T) {
|
||||
json, err := ioutil.ReadFile("./test-data/access-token-1.json")
|
||||
require.NoError(t, err)
|
||||
|
||||
originalClient := client
|
||||
client = newFakeHTTPClient(t, json)
|
||||
defer func() { client = originalClient }()
|
||||
|
||||
proxy, err := NewDataSourceProxy(ds, plugin, ctx, "pathwithtoken1", &setting.Cfg{})
|
||||
require.NoError(t, err)
|
||||
ApplyRoute(proxy.ctx.Req.Context(), req, proxy.proxyPath, plugin.Routes[0], proxy.ds)
|
||||
|
Reference in New Issue
Block a user