mirror of
https://github.com/grafana/grafana.git
synced 2025-09-25 20:54:10 +08:00
Chore: Enable whitespace linter (#25903)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
@ -59,7 +59,6 @@ func TestMacroEngine(t *testing.T) {
|
||||
})
|
||||
|
||||
Convey("interpolate __timeGroup function pre 5.3 compatibility", func() {
|
||||
|
||||
sql, err := engine.Interpolate(query, timeRange, "SELECT $__timeGroup(time_column,'5m'), value")
|
||||
So(err, ShouldBeNil)
|
||||
|
||||
@ -72,7 +71,6 @@ func TestMacroEngine(t *testing.T) {
|
||||
})
|
||||
|
||||
Convey("interpolate __timeGroup function", func() {
|
||||
|
||||
sql, err := engine.Interpolate(query, timeRange, "SELECT $__timeGroup(time_column,'5m')")
|
||||
So(err, ShouldBeNil)
|
||||
sql2, err := engine.Interpolate(query, timeRange, "SELECT $__timeGroupAlias(time_column,'5m')")
|
||||
@ -83,7 +81,6 @@ func TestMacroEngine(t *testing.T) {
|
||||
})
|
||||
|
||||
Convey("interpolate __timeGroup function with spaces between args", func() {
|
||||
|
||||
sql, err := engine.Interpolate(query, timeRange, "$__timeGroup(time_column , '5m')")
|
||||
So(err, ShouldBeNil)
|
||||
sql2, err := engine.Interpolate(query, timeRange, "$__timeGroupAlias(time_column , '5m')")
|
||||
@ -94,7 +91,6 @@ func TestMacroEngine(t *testing.T) {
|
||||
})
|
||||
|
||||
Convey("interpolate __timeGroup function with TimescaleDB enabled", func() {
|
||||
|
||||
sql, err := engineTS.Interpolate(query, timeRange, "GROUP BY $__timeGroup(time_column,'5m')")
|
||||
So(err, ShouldBeNil)
|
||||
|
||||
@ -102,7 +98,6 @@ func TestMacroEngine(t *testing.T) {
|
||||
})
|
||||
|
||||
Convey("interpolate __timeGroup function with spaces between args and TimescaleDB enabled", func() {
|
||||
|
||||
sql, err := engineTS.Interpolate(query, timeRange, "GROUP BY $__timeGroup(time_column , '5m')")
|
||||
So(err, ShouldBeNil)
|
||||
|
||||
@ -136,7 +131,6 @@ func TestMacroEngine(t *testing.T) {
|
||||
})
|
||||
|
||||
Convey("interpolate __unixEpochGroup function", func() {
|
||||
|
||||
sql, err := engine.Interpolate(query, timeRange, "SELECT $__unixEpochGroup(time_column,'5m')")
|
||||
So(err, ShouldBeNil)
|
||||
sql2, err := engine.Interpolate(query, timeRange, "SELECT $__unixEpochGroupAlias(time_column,'5m')")
|
||||
@ -145,7 +139,6 @@ func TestMacroEngine(t *testing.T) {
|
||||
So(sql, ShouldEqual, "SELECT floor(time_column/300)*300")
|
||||
So(sql2, ShouldEqual, sql+" AS \"time\"")
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
Convey("Given a time range between 1960-02-01 07:00 and 1965-02-03 08:00", func() {
|
||||
@ -213,8 +206,6 @@ func TestMacroEngine(t *testing.T) {
|
||||
|
||||
So(sql, ShouldEqual, fmt.Sprintf("WHERE time_column BETWEEN '%s' AND '%s'", from.Format(time.RFC3339Nano), to.Format(time.RFC3339Nano)))
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user