Chore: use any rather than interface{} (#74066)

This commit is contained in:
Ryan McKinley
2023-08-30 08:46:47 -07:00
committed by GitHub
parent 3e272d2bda
commit 025b2f3011
525 changed files with 2528 additions and 2528 deletions
+4 -4
View File
@@ -371,7 +371,7 @@ func TestIntegrationAlertRuleConflictingTitle(t *testing.T) {
status, body := apiClient.PostRulesGroup(t, "folder1", &rulesWithUID)
assert.Equal(t, http.StatusInternalServerError, status)
var res map[string]interface{}
var res map[string]any
require.NoError(t, json.Unmarshal([]byte(body), &res))
require.Equal(t, "failed to update rule group: failed to add rules: a conflicting alert rule is found: rule title under the same organisation and folder should be unique", res["message"])
})
@@ -383,7 +383,7 @@ func TestIntegrationAlertRuleConflictingTitle(t *testing.T) {
status, body := apiClient.PostRulesGroup(t, "folder1", &rulesWithUID)
assert.Equal(t, http.StatusInternalServerError, status)
var res map[string]interface{}
var res map[string]any
require.NoError(t, json.Unmarshal([]byte(body), &res))
require.Equal(t, "failed to update rule group: failed to update rules: a conflicting alert rule is found: rule title under the same organisation and folder should be unique", res["message"])
})
@@ -736,7 +736,7 @@ func TestIntegrationRulerRulesFilterByDashboard(t *testing.T) {
require.Equal(t, http.StatusBadRequest, resp.StatusCode)
b, err := io.ReadAll(resp.Body)
require.NoError(t, err)
var res map[string]interface{}
var res map[string]any
require.NoError(t, json.Unmarshal(b, &res))
require.Equal(t, `invalid panel_id: strconv.ParseInt: parsing "invalid": invalid syntax`, res["message"])
}
@@ -754,7 +754,7 @@ func TestIntegrationRulerRulesFilterByDashboard(t *testing.T) {
require.Equal(t, http.StatusBadRequest, resp.StatusCode)
b, err := io.ReadAll(resp.Body)
require.NoError(t, err)
var res map[string]interface{}
var res map[string]any
require.NoError(t, json.Unmarshal(b, &res))
require.Equal(t, "panel_id must be set with dashboard_uid", res["message"])
}