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:
Arve Knudsen
2020-06-01 17:11:25 +02:00
committed by GitHub
co-authored by Sofia Papagiannaki Josh Soref
parent 13787294c6
commit 07582a8e85
60 changed files with 174 additions and 168 deletions
+8 -6
View File
@@ -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"},
+1 -1
View File
@@ -34,7 +34,7 @@ var (
ErrDashboardCannotSaveProvisionedDashboard = errors.New("Cannot save provisioned dashboard")
ErrDashboardRefreshIntervalTooShort = errors.New("Dashboard refresh interval is too low")
ErrDashboardCannotDeleteProvisionedDashboard = errors.New("provisioned dashboard cannot be deleted")
ErrDashboardIdentifierNotSet = errors.New("Unique identfier needed to be able to get a dashboard")
ErrDashboardIdentifierNotSet = errors.New("Unique identifier needed to be able to get a dashboard")
RootFolderName = "General"
)
+1 -1
View File
@@ -214,7 +214,7 @@ func TestDataSourceProxyCache(t *testing.T) {
}))
defer backend.Close()
// 2. Get HTTP transport from datasoruce which uses the test server as backend
// 2. Get HTTP transport from datasource which uses the test server as backend
ds.Url = backend.URL
transport, err := ds.GetHttpTransport()
if err != nil {
+1 -1
View File
@@ -20,7 +20,7 @@ type SendEmailCommand struct {
Data map[string]interface{}
Info string
ReplyTo []string
EmbededFiles []string
EmbeddedFiles []string
AttachedFiles []*SendEmailAttachFile
}