mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: Fix various spelling errors in back-end code (#25241)
* Chore: Fix various spelling errors in back-end code Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com> Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>>
This commit is contained in:
@@ -9,9 +9,10 @@ import (
|
||||
|
||||
func TestAlertingModelTest(t *testing.T) {
|
||||
Convey("Testing Alerting model", t, func() {
|
||||
|
||||
json1, _ := simplejson.NewJson([]byte(`{ "field": "value" }`))
|
||||
json2, _ := simplejson.NewJson([]byte(`{ "field": "value" }`))
|
||||
json1, err := simplejson.NewJson([]byte(`{ "field": "value" }`))
|
||||
So(err, ShouldBeNil)
|
||||
json2, err := simplejson.NewJson([]byte(`{ "field": "value" }`))
|
||||
So(err, ShouldBeNil)
|
||||
|
||||
rule1 := &Alert{
|
||||
Settings: json1,
|
||||
@@ -26,18 +27,18 @@ func TestAlertingModelTest(t *testing.T) {
|
||||
}
|
||||
|
||||
Convey("Testing AlertRule equals", func() {
|
||||
|
||||
So(rule1.ContainsUpdates(rule2), ShouldBeFalse)
|
||||
})
|
||||
|
||||
Convey("Changing the expression should contain update", func() {
|
||||
json2, _ := simplejson.NewJson([]byte(`{ "field": "newValue" }`))
|
||||
json2, err := simplejson.NewJson([]byte(`{ "field": "newValue" }`))
|
||||
So(err, ShouldBeNil)
|
||||
rule1.Settings = json2
|
||||
So(rule1.ContainsUpdates(rule2), ShouldBeTrue)
|
||||
})
|
||||
|
||||
Convey("Should parse alertRule tags correctly", func() {
|
||||
json2, _ := simplejson.NewJson([]byte(`{
|
||||
json2, err := simplejson.NewJson([]byte(`{
|
||||
"field": "value",
|
||||
"alertRuleTags": {
|
||||
"foo": "bar",
|
||||
@@ -45,6 +46,7 @@ func TestAlertingModelTest(t *testing.T) {
|
||||
"tagMap": { "mapValue": "value" }
|
||||
}
|
||||
}`))
|
||||
So(err, ShouldBeNil)
|
||||
rule1.Settings = json2
|
||||
expectedTags := []*Tag{
|
||||
{Id: 0, Key: "foo", Value: "bar"},
|
||||
|
||||
Reference in New Issue
Block a user