Glue: Return correlation config in GET /correlations (#55801)

* Fix getting and creating correlations config

* Fix tests
This commit is contained in:
Piotr Jamróz authored and GitHub committed 2022-09-28 12:17:43 +01:00
1 parent 43dc92d12c
commit a8f43b97a2
7 files changed
+22 -16

No files matched your search

@@ -272,6 +272,7 @@ func TestIntegrationCreateCorrelation(t *testing.T) {
require.Equal(t, description, response.Result.Description)
require.Equal(t, label, response.Result.Label)
require.Equal(t, "fieldName", response.Result.Config.Field)
require.Equal(t, map[string]interface{}{"expr": "foo"}, response.Result.Config.Target)
require.NoError(t, res.Body.Close())
})
@@ -77,7 +77,7 @@ func TestIntegrationReadCorrelation(t *testing.T) {
OrgId: dsWithCorrelations.OrgId,
Config: correlations.CorrelationConfig{
Field: "foo",
Target: struct{}{},
Target: map[string]interface{}{},
},
})