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
5377ad4e
Unverified
Commit
5377ad4e
authored
Jun 19, 2018
by
Marcus Efraimsson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove unused argument in default scenario of guardian test
parent
24d0b43e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
pkg/services/guardian/guardian_test.go
+9
-3
No files found.
pkg/services/guardian/guardian_test.go
View file @
5377ad4e
...
...
@@ -28,7 +28,7 @@ func TestGuardianAdmin(t *testing.T) {
Convey
(
"Guardian admin org role tests"
,
t
,
func
()
{
orgRoleScenario
(
"Given user has admin org role"
,
t
,
m
.
ROLE_ADMIN
,
func
(
sc
*
scenarioContext
)
{
// dashboard has default permissions
sc
.
defaultPermissionScenario
(
USER
,
m
.
PERMISSION_ADMIN
,
FULL_ACCESS
)
sc
.
defaultPermissionScenario
(
USER
,
FULL_ACCESS
)
// dashboard has user with permission
sc
.
dashboardPermissionScenario
(
USER
,
m
.
PERMISSION_ADMIN
,
FULL_ACCESS
)
...
...
@@ -76,6 +76,9 @@ func TestGuardianAdmin(t *testing.T) {
func
TestGuardianEditor
(
t
*
testing
.
T
)
{
Convey
(
"Guardian editor org role tests"
,
t
,
func
()
{
orgRoleScenario
(
"Given user has editor org role"
,
t
,
m
.
ROLE_EDITOR
,
func
(
sc
*
scenarioContext
)
{
// dashboard has default permissions
sc
.
defaultPermissionScenario
(
USER
,
EDITOR_ACCESS
)
// dashboard has user with permission
sc
.
dashboardPermissionScenario
(
USER
,
m
.
PERMISSION_ADMIN
,
FULL_ACCESS
)
sc
.
dashboardPermissionScenario
(
USER
,
m
.
PERMISSION_EDIT
,
EDITOR_ACCESS
)
...
...
@@ -122,6 +125,9 @@ func TestGuardianEditor(t *testing.T) {
func
TestGuardianViewer
(
t
*
testing
.
T
)
{
Convey
(
"Guardian viewer org role tests"
,
t
,
func
()
{
orgRoleScenario
(
"Given user has viewer org role"
,
t
,
m
.
ROLE_VIEWER
,
func
(
sc
*
scenarioContext
)
{
// dashboard has default permissions
sc
.
defaultPermissionScenario
(
USER
,
VIEWER_ACCESS
)
// dashboard has user with permission
sc
.
dashboardPermissionScenario
(
USER
,
m
.
PERMISSION_ADMIN
,
FULL_ACCESS
)
sc
.
dashboardPermissionScenario
(
USER
,
m
.
PERMISSION_EDIT
,
EDITOR_ACCESS
)
...
...
@@ -165,12 +171,12 @@ func TestGuardianViewer(t *testing.T) {
apiKeyScenario
(
"Given api key with viewer role"
,
t
,
m
.
ROLE_VIEWER
,
func
(
sc
*
scenarioContext
)
{
// dashboard has default permissions
sc
.
defaultPermissionScenario
(
VIEWER
,
m
.
PERMISSION_EDIT
,
VIEWER_ACCESS
)
sc
.
defaultPermissionScenario
(
VIEWER
,
VIEWER_ACCESS
)
})
})
}
func
(
sc
*
scenarioContext
)
defaultPermissionScenario
(
pt
permissionType
,
permission
m
.
PermissionType
,
flag
permissionFlags
)
{
func
(
sc
*
scenarioContext
)
defaultPermissionScenario
(
pt
permissionType
,
flag
permissionFlags
)
{
_
,
callerFile
,
callerLine
,
_
:=
runtime
.
Caller
(
1
)
sc
.
callerFile
=
callerFile
sc
.
callerLine
=
callerLine
...
...
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