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
0f9b5924
Commit
0f9b5924
authored
Apr 10, 2018
by
bergquist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
provisioning: fixes broken tests
parent
77e7887e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
pkg/api/dashboard_test.go
+20
-0
No files found.
pkg/api/dashboard_test.go
View file @
0f9b5924
...
...
@@ -42,6 +42,11 @@ func TestDashboardApiEndpoint(t *testing.T) {
return
nil
})
bus
.
AddHandler
(
"test"
,
func
(
query
*
m
.
GetProvisionedDashboardByDashboardId
)
error
{
query
.
Result
=
nil
return
nil
})
viewerRole
:=
m
.
ROLE_VIEWER
editorRole
:=
m
.
ROLE_EDITOR
...
...
@@ -192,6 +197,11 @@ func TestDashboardApiEndpoint(t *testing.T) {
fakeDash
.
HasAcl
=
true
setting
.
ViewersCanEdit
=
false
bus
.
AddHandler
(
"test"
,
func
(
query
*
m
.
GetProvisionedDashboardByDashboardId
)
error
{
query
.
Result
=
nil
return
nil
})
bus
.
AddHandler
(
"test"
,
func
(
query
*
m
.
GetDashboardsBySlugQuery
)
error
{
dashboards
:=
[]
*
m
.
Dashboard
{
fakeDash
}
query
.
Result
=
dashboards
...
...
@@ -625,6 +635,11 @@ func TestDashboardApiEndpoint(t *testing.T) {
dashTwo
.
FolderId
=
3
dashTwo
.
HasAcl
=
false
bus
.
AddHandler
(
"test"
,
func
(
query
*
m
.
GetProvisionedDashboardByDashboardId
)
error
{
query
.
Result
=
nil
return
nil
})
bus
.
AddHandler
(
"test"
,
func
(
query
*
m
.
GetDashboardsBySlugQuery
)
error
{
dashboards
:=
[]
*
m
.
Dashboard
{
dashOne
,
dashTwo
}
query
.
Result
=
dashboards
...
...
@@ -751,6 +766,11 @@ func TestDashboardApiEndpoint(t *testing.T) {
return
nil
})
bus
.
AddHandler
(
"test"
,
func
(
query
*
m
.
GetProvisionedDashboardByDashboardId
)
error
{
query
.
Result
=
nil
return
nil
})
bus
.
AddHandler
(
"test"
,
func
(
query
*
m
.
GetDashboardVersionQuery
)
error
{
query
.
Result
=
&
m
.
DashboardVersion
{
Data
:
simplejson
.
NewFromAny
(
map
[
string
]
interface
{}{
...
...
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