Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
2088363b
Commit
2088363b
authored
Nov 02, 2016
by
utkarshcmu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added tests for graphite alerting
parent
1e8beb89
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
0 deletions
+46
-0
pkg/tsdb/graphite/graphite_test.go
+46
-0
No files found.
pkg/tsdb/graphite/graphite_test.go
View file @
2088363b
package
graphite
package
graphite
import
(
.
"github.com/smartystreets/goconvey/convey"
"testing"
)
func
TestGraphiteFunctions
(
t
*
testing
.
T
)
{
Convey
(
"Testing Graphite Executor"
,
t
,
func
()
{
Convey
(
"formatting time range for now"
,
func
()
{
timeRange
:=
formatTimeRange
(
"now"
)
So
(
timeRange
,
ShouldEqual
,
"now"
)
})
Convey
(
"formatting time range for now-1m"
,
func
()
{
timeRange
:=
formatTimeRange
(
"now-1m"
)
So
(
timeRange
,
ShouldEqual
,
"now-1min"
)
})
Convey
(
"formatting time range for now-1M"
,
func
()
{
timeRange
:=
formatTimeRange
(
"now-1M"
)
So
(
timeRange
,
ShouldEqual
,
"now-1mon"
)
})
Convey
(
"fix interval format in query for 1m"
,
func
()
{
timeRange
:=
formatTimeRange
(
"aliasByNode(hitcount(averageSeries(app.grafana.*.dashboards.views.count), '1m'), 4)"
)
So
(
timeRange
,
ShouldEqual
,
"aliasByNode(hitcount(averageSeries(app.grafana.*.dashboards.views.count), '1min'), 4)"
)
})
Convey
(
"fix interval format in query for 1M"
,
func
()
{
timeRange
:=
formatTimeRange
(
"aliasByNode(hitcount(averageSeries(app.grafana.*.dashboards.views.count), '1M'), 4)"
)
So
(
timeRange
,
ShouldEqual
,
"aliasByNode(hitcount(averageSeries(app.grafana.*.dashboards.views.count), '1mon'), 4)"
)
})
})
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment