alerting: golint fixes for alert notifiers. (#17167)

This commit is contained in:
Carl Bergquist
2019-05-20 15:23:06 +02:00
committed by GitHub
parent a0f5923b95
commit bfa7c3d963
30 changed files with 356 additions and 292 deletions
+4 -4
View File
@@ -178,24 +178,24 @@ func TestShouldSendAlertNotification(t *testing.T) {
func TestBaseNotifier(t *testing.T) {
Convey("default constructor for notifiers", t, func() {
bJson := simplejson.New()
bJSON := simplejson.New()
model := &models.AlertNotification{
Uid: "1",
Name: "name",
Type: "email",
Settings: bJson,
Settings: bJSON,
}
Convey("can parse false value", func() {
bJson.Set("uploadImage", false)
bJSON.Set("uploadImage", false)
base := NewNotifierBase(model)
So(base.UploadImage, ShouldBeFalse)
})
Convey("can parse true value", func() {
bJson.Set("uploadImage", true)
bJSON.Set("uploadImage", true)
base := NewNotifierBase(model)
So(base.UploadImage, ShouldBeTrue)