Alerting: introduce AlertQuery in definitions package (#63825)
* copy AlertQuery from ngmodels to the definition package * replaces usages of ngmodels.AlertQuery in API models * create a converter between models of AlertQuery --------- Co-authored-by: Alex Moreno <alexander.moreno@grafana.com>
This commit is contained in:
co-authored by
Alex Moreno
parent
36e8ca7f13
commit
52a0f59706
@@ -15,7 +15,7 @@ func TestToModel(t *testing.T) {
|
||||
FolderUID: "123",
|
||||
Interval: 10,
|
||||
}
|
||||
tm, err := AlertRuleGroupFromApi(ruleGroup)
|
||||
tm, err := AlertRuleGroupFromApiAlertRuleGroup(ruleGroup)
|
||||
require.NoError(t, err)
|
||||
require.Nil(t, tm.Rules)
|
||||
})
|
||||
@@ -30,7 +30,7 @@ func TestToModel(t *testing.T) {
|
||||
},
|
||||
},
|
||||
}
|
||||
tm, err := AlertRuleGroupFromApi(ruleGroup)
|
||||
tm, err := AlertRuleGroupFromApiAlertRuleGroup(ruleGroup)
|
||||
require.NoError(t, err)
|
||||
require.Len(t, tm.Rules, 1)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user