mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
azuremonitor: fix auto interval calculation on backend
Not needed for alerting (as the query intervalms will always be 0) but needed later when being called from the frontend)
This commit is contained in:
@@ -51,11 +51,11 @@ func TestInterval(t *testing.T) {
|
||||
})
|
||||
|
||||
Convey("Format value", func() {
|
||||
So(formatDuration(time.Second*61), ShouldEqual, "1m")
|
||||
So(formatDuration(time.Millisecond*30), ShouldEqual, "30ms")
|
||||
So(formatDuration(time.Hour*23), ShouldEqual, "23h")
|
||||
So(formatDuration(time.Hour*24), ShouldEqual, "1d")
|
||||
So(formatDuration(time.Hour*24*367), ShouldEqual, "1y")
|
||||
So(FormatDuration(time.Second*61), ShouldEqual, "1m")
|
||||
So(FormatDuration(time.Millisecond*30), ShouldEqual, "30ms")
|
||||
So(FormatDuration(time.Hour*23), ShouldEqual, "23h")
|
||||
So(FormatDuration(time.Hour*24), ShouldEqual, "1d")
|
||||
So(FormatDuration(time.Hour*24*367), ShouldEqual, "1y")
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user