tech(alerting): change queryrange to int from str
This commit is contained in:
@@ -33,7 +33,7 @@ func TestAlertRuleChangesDataAccess(t *testing.T) {
|
||||
Interval: "10",
|
||||
Title: "Alerting title",
|
||||
Description: "Alerting description",
|
||||
QueryRange: "5m",
|
||||
QueryRange: 3600,
|
||||
Aggregator: "avg",
|
||||
OrgId: FakeOrgId,
|
||||
},
|
||||
|
||||
@@ -28,7 +28,7 @@ func TestAlertingDataAccess(t *testing.T) {
|
||||
Interval: "10",
|
||||
Title: "Alerting title",
|
||||
Description: "Alerting description",
|
||||
QueryRange: "5m",
|
||||
QueryRange: 3600,
|
||||
Aggregator: "avg",
|
||||
DatasourceId: 42,
|
||||
},
|
||||
@@ -67,7 +67,7 @@ func TestAlertingDataAccess(t *testing.T) {
|
||||
So(alert.QueryRefId, ShouldEqual, "A")
|
||||
So(alert.Title, ShouldEqual, "Alerting title")
|
||||
So(alert.Description, ShouldEqual, "Alerting description")
|
||||
So(alert.QueryRange, ShouldEqual, "5m")
|
||||
So(alert.QueryRange, ShouldEqual, 3600)
|
||||
So(alert.Aggregator, ShouldEqual, "avg")
|
||||
So(alert.State, ShouldEqual, "OK")
|
||||
So(alert.DatasourceId, ShouldEqual, 42)
|
||||
@@ -191,7 +191,7 @@ func TestAlertingDataAccess(t *testing.T) {
|
||||
Interval: "10",
|
||||
Title: "Alerting title",
|
||||
Description: "Alerting description",
|
||||
QueryRange: "5m",
|
||||
QueryRange: 3600,
|
||||
Aggregator: "avg",
|
||||
},
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ func TestAlertingStateAccess(t *testing.T) {
|
||||
Interval: "10",
|
||||
Title: "Alerting title",
|
||||
Description: "Alerting description",
|
||||
QueryRange: "5m",
|
||||
QueryRange: 3600,
|
||||
Aggregator: "avg",
|
||||
},
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ func addAlertMigrations(mg *Migrator) {
|
||||
{Name: "frequency", Type: DB_BigInt, Nullable: false},
|
||||
{Name: "title", Type: DB_NVarchar, Length: 255, Nullable: false},
|
||||
{Name: "description", Type: DB_NVarchar, Length: 255, Nullable: false},
|
||||
{Name: "query_range", Type: DB_NVarchar, Length: 255, Nullable: false},
|
||||
{Name: "query_range", Type: DB_Int, Nullable: false},
|
||||
{Name: "aggregator", Type: DB_NVarchar, Length: 255, Nullable: false},
|
||||
{Name: "state", Type: DB_NVarchar, Length: 255, Nullable: false},
|
||||
{Name: "created", Type: DB_DateTime, Nullable: false},
|
||||
|
||||
Reference in New Issue
Block a user