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
5e08bf51
Commit
5e08bf51
authored
Jul 02, 2018
by
Leonard Gram
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test: fixed usage of wrap in tests.
parent
4245f0ce
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
12 additions
and
12 deletions
+12
-12
pkg/api/alerting_test.go
+1
-1
pkg/api/annotations_test.go
+3
-3
pkg/api/common_test.go
+2
-2
pkg/api/dashboard_permission_test.go
+1
-1
pkg/api/dashboard_test.go
+2
-2
pkg/api/folder_permission_test.go
+1
-1
pkg/api/folder_test.go
+2
-2
No files found.
pkg/api/alerting_test.go
View file @
5e08bf51
...
...
@@ -135,7 +135,7 @@ func postAlertScenario(desc string, url string, routePattern string, role m.Role
defer
bus
.
ClearBusHandlers
()
sc
:=
setupScenarioContext
(
url
)
sc
.
defaultHandler
=
w
rap
(
func
(
c
*
m
.
ReqContext
)
Response
{
sc
.
defaultHandler
=
W
rap
(
func
(
c
*
m
.
ReqContext
)
Response
{
sc
.
context
=
c
sc
.
context
.
UserId
=
TestUserID
sc
.
context
.
OrgId
=
TestOrgID
...
...
pkg/api/annotations_test.go
View file @
5e08bf51
...
...
@@ -223,7 +223,7 @@ func postAnnotationScenario(desc string, url string, routePattern string, role m
defer
bus
.
ClearBusHandlers
()
sc
:=
setupScenarioContext
(
url
)
sc
.
defaultHandler
=
w
rap
(
func
(
c
*
m
.
ReqContext
)
Response
{
sc
.
defaultHandler
=
W
rap
(
func
(
c
*
m
.
ReqContext
)
Response
{
sc
.
context
=
c
sc
.
context
.
UserId
=
TestUserID
sc
.
context
.
OrgId
=
TestOrgID
...
...
@@ -246,7 +246,7 @@ func putAnnotationScenario(desc string, url string, routePattern string, role m.
defer
bus
.
ClearBusHandlers
()
sc
:=
setupScenarioContext
(
url
)
sc
.
defaultHandler
=
w
rap
(
func
(
c
*
m
.
ReqContext
)
Response
{
sc
.
defaultHandler
=
W
rap
(
func
(
c
*
m
.
ReqContext
)
Response
{
sc
.
context
=
c
sc
.
context
.
UserId
=
TestUserID
sc
.
context
.
OrgId
=
TestOrgID
...
...
@@ -269,7 +269,7 @@ func deleteAnnotationsScenario(desc string, url string, routePattern string, rol
defer
bus
.
ClearBusHandlers
()
sc
:=
setupScenarioContext
(
url
)
sc
.
defaultHandler
=
w
rap
(
func
(
c
*
m
.
ReqContext
)
Response
{
sc
.
defaultHandler
=
W
rap
(
func
(
c
*
m
.
ReqContext
)
Response
{
sc
.
context
=
c
sc
.
context
.
UserId
=
TestUserID
sc
.
context
.
OrgId
=
TestOrgID
...
...
pkg/api/common_test.go
View file @
5e08bf51
...
...
@@ -23,7 +23,7 @@ func loggedInUserScenarioWithRole(desc string, method string, url string, routeP
defer
bus
.
ClearBusHandlers
()
sc
:=
setupScenarioContext
(
url
)
sc
.
defaultHandler
=
w
rap
(
func
(
c
*
m
.
ReqContext
)
Response
{
sc
.
defaultHandler
=
W
rap
(
func
(
c
*
m
.
ReqContext
)
Response
{
sc
.
context
=
c
sc
.
context
.
UserId
=
TestUserID
sc
.
context
.
OrgId
=
TestOrgID
...
...
@@ -51,7 +51,7 @@ func anonymousUserScenario(desc string, method string, url string, routePattern
defer
bus
.
ClearBusHandlers
()
sc
:=
setupScenarioContext
(
url
)
sc
.
defaultHandler
=
w
rap
(
func
(
c
*
m
.
ReqContext
)
Response
{
sc
.
defaultHandler
=
W
rap
(
func
(
c
*
m
.
ReqContext
)
Response
{
sc
.
context
=
c
if
sc
.
handlerFunc
!=
nil
{
return
sc
.
handlerFunc
(
sc
.
context
)
...
...
pkg/api/dashboard_permission_test.go
View file @
5e08bf51
...
...
@@ -194,7 +194,7 @@ func updateDashboardPermissionScenario(desc string, url string, routePattern str
sc
:=
setupScenarioContext
(
url
)
sc
.
defaultHandler
=
w
rap
(
func
(
c
*
m
.
ReqContext
)
Response
{
sc
.
defaultHandler
=
W
rap
(
func
(
c
*
m
.
ReqContext
)
Response
{
sc
.
context
=
c
sc
.
context
.
OrgId
=
TestOrgID
sc
.
context
.
UserId
=
TestUserID
...
...
pkg/api/dashboard_test.go
View file @
5e08bf51
...
...
@@ -882,7 +882,7 @@ func postDashboardScenario(desc string, url string, routePattern string, mock *d
defer
bus
.
ClearBusHandlers
()
sc
:=
setupScenarioContext
(
url
)
sc
.
defaultHandler
=
w
rap
(
func
(
c
*
m
.
ReqContext
)
Response
{
sc
.
defaultHandler
=
W
rap
(
func
(
c
*
m
.
ReqContext
)
Response
{
sc
.
context
=
c
sc
.
context
.
SignedInUser
=
&
m
.
SignedInUser
{
OrgId
:
cmd
.
OrgId
,
UserId
:
cmd
.
UserId
}
...
...
@@ -907,7 +907,7 @@ func postDiffScenario(desc string, url string, routePattern string, cmd dtos.Cal
defer
bus
.
ClearBusHandlers
()
sc
:=
setupScenarioContext
(
url
)
sc
.
defaultHandler
=
w
rap
(
func
(
c
*
m
.
ReqContext
)
Response
{
sc
.
defaultHandler
=
W
rap
(
func
(
c
*
m
.
ReqContext
)
Response
{
sc
.
context
=
c
sc
.
context
.
SignedInUser
=
&
m
.
SignedInUser
{
OrgId
:
TestOrgID
,
...
...
pkg/api/folder_permission_test.go
View file @
5e08bf51
...
...
@@ -226,7 +226,7 @@ func updateFolderPermissionScenario(desc string, url string, routePattern string
sc
:=
setupScenarioContext
(
url
)
sc
.
defaultHandler
=
w
rap
(
func
(
c
*
m
.
ReqContext
)
Response
{
sc
.
defaultHandler
=
W
rap
(
func
(
c
*
m
.
ReqContext
)
Response
{
sc
.
context
=
c
sc
.
context
.
OrgId
=
TestOrgID
sc
.
context
.
UserId
=
TestUserID
...
...
pkg/api/folder_test.go
View file @
5e08bf51
...
...
@@ -152,7 +152,7 @@ func createFolderScenario(desc string, url string, routePattern string, mock *fa
defer
bus
.
ClearBusHandlers
()
sc
:=
setupScenarioContext
(
url
)
sc
.
defaultHandler
=
w
rap
(
func
(
c
*
m
.
ReqContext
)
Response
{
sc
.
defaultHandler
=
W
rap
(
func
(
c
*
m
.
ReqContext
)
Response
{
sc
.
context
=
c
sc
.
context
.
SignedInUser
=
&
m
.
SignedInUser
{
OrgId
:
TestOrgID
,
UserId
:
TestUserID
}
...
...
@@ -181,7 +181,7 @@ func updateFolderScenario(desc string, url string, routePattern string, mock *fa
defer
bus
.
ClearBusHandlers
()
sc
:=
setupScenarioContext
(
url
)
sc
.
defaultHandler
=
w
rap
(
func
(
c
*
m
.
ReqContext
)
Response
{
sc
.
defaultHandler
=
W
rap
(
func
(
c
*
m
.
ReqContext
)
Response
{
sc
.
context
=
c
sc
.
context
.
SignedInUser
=
&
m
.
SignedInUser
{
OrgId
:
TestOrgID
,
UserId
:
TestUserID
}
...
...
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