Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
1dcae464
Commit
1dcae464
authored
Aug 12, 2016
by
bergquist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore(notifications): remove commented test
parent
16e75a30
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
79 deletions
+0
-79
pkg/services/notifications/notifications_test.go
+0
-79
No files found.
pkg/services/notifications/notifications_test.go
View file @
1dcae464
...
...
@@ -40,84 +40,5 @@ func TestNotifications(t *testing.T) {
So
(
sentMsg
.
Subject
,
ShouldEqual
,
"Reset your Grafana password - asd@asd.com"
)
So
(
sentMsg
.
Body
,
ShouldNotContainSubstring
,
"Subject"
)
})
Convey
(
"Alert notifications"
,
func
()
{
// Convey("When sending reset email password", func() {
// cmd := &m.SendEmailCommand{
// Data: map[string]interface{}{
// "Name": "Name",
// "State": "Critical",
// "Description": "Description",
// "DashboardLink": "http://localhost:3000/dashboard/db/alerting",
// "AlertPageUrl": "http://localhost:3000/alerting",
// "DashboardImage": "http://localhost:3000/render/dashboard-solo/db/alerting?from=1466169458375&to=1466171258375&panelId=1&width=1000&height=500",
// "TriggeredAlerts": []testTriggeredAlert{
// {Name: "desktop", State: "Critical", ActualValue: 13},
// {Name: "mobile", State: "Warn", ActualValue: 5},
// },
// },
// To: []string{"asd@asd.com "},
// Template: "alert_notification.html",
// }
//
// err := sendEmailCommandHandler(cmd)
// So(err, ShouldBeNil)
//
// So(sentMsg.Body, ShouldContainSubstring, "Alertstate: Critical")
// So(sentMsg.Body, ShouldContainSubstring, "http://localhost:3000/dashboard/db/alerting")
// So(sentMsg.Body, ShouldContainSubstring, "Critical")
// So(sentMsg.Body, ShouldContainSubstring, "Warn")
// So(sentMsg.Body, ShouldContainSubstring, "mobile")
// So(sentMsg.Body, ShouldContainSubstring, "desktop")
// So(sentMsg.Subject, ShouldContainSubstring, "Grafana Alert: [ Critical ] ")
// })
//
// Convey("given critical", func() {
// cmd := &m.SendEmailCommand{
// Data: map[string]interface{}{
// "Name": "Name",
// "State": "Warn",
// "Description": "Description",
// "DashboardLink": "http://localhost:3000/dashboard/db/alerting",
// "DashboardImage": "http://localhost:3000/render/dashboard-solo/db/alerting?from=1466169458375&to=1466171258375&panelId=1&width=1000&height=500",
// "AlertPageUrl": "http://localhost:3000/alerting",
// "TriggeredAlerts": []testTriggeredAlert{
// {Name: "desktop", State: "Critical", ActualValue: 13},
// {Name: "mobile", State: "Warn", ActualValue: 5},
// },
// },
// To: []string{"asd@asd.com "},
// Template: "alert_notification.html",
// }
//
// err := sendEmailCommandHandler(cmd)
// So(err, ShouldBeNil)
// So(sentMsg.Body, ShouldContainSubstring, "Alertstate: Warn")
// So(sentMsg.Body, ShouldContainSubstring, "http://localhost:3000/dashboard/db/alerting")
// So(sentMsg.Body, ShouldContainSubstring, "Critical")
// So(sentMsg.Body, ShouldContainSubstring, "Warn")
// So(sentMsg.Body, ShouldContainSubstring, "mobile")
// So(sentMsg.Body, ShouldContainSubstring, "desktop")
// So(sentMsg.Subject, ShouldContainSubstring, "Grafana Alert: [ Warn ]")
// })
//
// Convey("given ok", func() {
// cmd := &m.SendEmailCommand{
// Data: map[string]interface{}{
// "Name": "Name",
// "State": "Ok",
// "Description": "Description",
// "DashboardLink": "http://localhost:3000/dashboard/db/alerting",
// "AlertPageUrl": "http://localhost:3000/alerting",
// },
// To: []string{"asd@asd.com "},
// Template: "alert_notification.html",
// }
//
// err := sendEmailCommandHandler(cmd)
// So(err, ShouldBeNil)
// So(sentMsg.Subject, ShouldContainSubstring, "Grafana Alert: [ Ok ]")
// })
})
})
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment