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
d7c03359
Commit
d7c03359
authored
Jun 07, 2016
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(alerting): fixed test issues
parent
3289225b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
29 deletions
+21
-29
pkg/tsdb/graphite/graphite_test.go
+21
-29
No files found.
pkg/tsdb/graphite/graphite_test.go
View file @
d7c03359
package
graphite
package
graphite
import
(
// func TestGraphite(t *testing.T) {
"testing"
//
// Convey("When executing graphite query", t, func() {
.
"github.com/smartystreets/goconvey/convey"
// executor := NewGraphiteExecutor(&tsdb.DataSourceInfo{
// Url: "http://localhost:8080",
"github.com/grafana/grafana/pkg/tsdb"
// })
)
//
// queries := tsdb.QuerySlice{
func
TestGraphite
(
t
*
testing
.
T
)
{
// &tsdb.Query{Query: "{\"target\": \"apps.backend.*.counters.requests.count\"}"},
// }
Convey
(
"When executing graphite query"
,
t
,
func
()
{
//
executor
:=
NewGraphiteExecutor
(
&
tsdb
.
DataSourceInfo
{
// context := tsdb.NewQueryContext(queries, tsdb.TimeRange{})
Url
:
"http://localhost:8080"
,
// result := executor.Execute(queries, context)
})
// So(result.Error, ShouldBeNil)
//
queries
:=
tsdb
.
QuerySlice
{
// Convey("Should return series", func() {
&
tsdb
.
Query
{
Query
:
"{
\"
target
\"
:
\"
apps.backend.*.counters.requests.count
\"
}"
},
// So(result.QueryResults, ShouldNotBeEmpty)
}
// })
context
:=
tsdb
.
NewQueryContext
(
queries
,
tsdb
.
TimeRange
{})
// })
//
result
:=
executor
.
Execute
(
queries
,
context
)
// }
So
(
result
.
Error
,
ShouldBeNil
)
Convey
(
"Should return series"
,
func
()
{
So
(
result
.
QueryResults
,
ShouldNotBeEmpty
)
})
})
}
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