diff --git a/backend/datasource/instance_provider.go b/backend/datasource/instance_provider.go index 443a9c4d8..1c34bc4d5 100644 --- a/backend/datasource/instance_provider.go +++ b/backend/datasource/instance_provider.go @@ -4,6 +4,7 @@ import ( "context" "errors" "fmt" + "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" diff --git a/backend/datasource/instance_provider_test.go b/backend/datasource/instance_provider_test.go index 0c7c47f8a..7face28a6 100644 --- a/backend/datasource/instance_provider_test.go +++ b/backend/datasource/instance_provider_test.go @@ -39,11 +39,8 @@ func TestInstanceProvider(t *testing.T) { proxy.PluginSecureSocksProxyClientKeyContents: "This should work", }) key, err := ip.GetKey(context.Background(), backend.PluginContext{ - DataSourceInstanceSettings: &backend.DataSourceInstanceSettings{ - ID: 5, - JSONData: []byte(`{"enableSecureSocksProxy": true}`), - }, - GrafanaConfig: cfg, + DataSourceInstanceSettings: &backend.DataSourceInstanceSettings{ID: 5}, + GrafanaConfig: cfg, }) require.NoError(t, err) require.Equal(t, "5##work", key) @@ -54,11 +51,8 @@ func TestInstanceProvider(t *testing.T) { proxy.PluginSecureSocksProxyClientKeyContents: "", }) key, err := ip.GetKey(context.Background(), backend.PluginContext{ - DataSourceInstanceSettings: &backend.DataSourceInstanceSettings{ - ID: 6, - JSONData: []byte(`{"enableSecureSocksProxy": true}`), - }, - GrafanaConfig: cfg, + DataSourceInstanceSettings: &backend.DataSourceInstanceSettings{ID: 6}, + GrafanaConfig: cfg, }) require.NoError(t, err) require.Equal(t, "6##", key) @@ -69,11 +63,8 @@ func TestInstanceProvider(t *testing.T) { proxy.PluginSecureSocksProxyClientKeyContents: "doh", }) key, err := ip.GetKey(context.Background(), backend.PluginContext{ - DataSourceInstanceSettings: &backend.DataSourceInstanceSettings{ - ID: 7, - JSONData: []byte(`{"enableSecureSocksProxy": true}`), - }, - GrafanaConfig: cfg, + DataSourceInstanceSettings: &backend.DataSourceInstanceSettings{ID: 7}, + GrafanaConfig: cfg, }) require.NoError(t, err) require.Equal(t, "7##doh", key)