Stackdriver: Add extra alignment period options (#18909)

* Add more alignment period options

* Remove unnecessary alignment period limit
This commit is contained in:
Erik Sundell
2019-09-13 10:45:59 +02:00
committed by Daniel Lee
parent b6c501bc8a
commit 4c8f417f18
3 changed files with 4 additions and 17 deletions
-11
View File
@@ -147,17 +147,6 @@ func TestStackdriver(t *testing.T) {
})
Convey("and alignmentPeriod is set in frontend", func() {
Convey("and alignment period is too big", func() {
tsdbQuery.Queries[0].IntervalMs = 1000
tsdbQuery.Queries[0].Model = simplejson.NewFromAny(map[string]interface{}{
"alignmentPeriod": "+360000s",
})
queries, err := executor.buildQueries(tsdbQuery)
So(err, ShouldBeNil)
So(queries[0].Params["aggregation.alignmentPeriod"][0], ShouldEqual, `+3600s`)
})
Convey("and alignment period is within accepted range", func() {
tsdbQuery.Queries[0].IntervalMs = 1000
tsdbQuery.Queries[0].Model = simplejson.NewFromAny(map[string]interface{}{