test(alerting): fixes broken unittests

This commit is contained in:
bergquist
2016-06-10 11:37:03 +02:00
parent ef35184a80
commit 0c69c5afb1
3 changed files with 16 additions and 11 deletions

View File

@@ -3,6 +3,7 @@ package sqlstore
import (
"testing"
"github.com/grafana/grafana/pkg/components/simplejson"
m "github.com/grafana/grafana/pkg/models"
. "github.com/smartystreets/goconvey/convey"
)
@@ -20,6 +21,7 @@ func TestAlertingDataAccess(t *testing.T) {
OrgId: testDash.OrgId,
Name: "Alerting title",
Description: "Alerting description",
Expression: simplejson.New(),
},
}
@@ -54,8 +56,7 @@ func TestAlertingDataAccess(t *testing.T) {
Convey("Alerts with same dashboard id and panel id should update", func() {
modifiedItems := items
modifiedItems[0].Name = "New name"
//modifiedItems[0].State = "ALERT"
modifiedItems[0].Name = "Name"
modifiedCmd := m.SaveAlertsCommand{
DashboardId: testDash.Id,
@@ -101,18 +102,21 @@ func TestAlertingDataAccess(t *testing.T) {
PanelId: 1,
Name: "1",
OrgId: 1,
Expression: simplejson.New(),
},
{
DashboardId: testDash.Id,
PanelId: 2,
Name: "2",
OrgId: 1,
Expression: simplejson.New(),
},
{
DashboardId: testDash.Id,
PanelId: 3,
Name: "3",
OrgId: 1,
Expression: simplejson.New(),
},
}