Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
3f261537
Commit
3f261537
authored
Jan 24, 2018
by
Slava Semushin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
selinux/mustrunas_test.go(TestMustRunAsValidate): rename a member to make its meaning obvious.
parent
2e55ffbb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
mustrunas_test.go
pkg/security/podsecuritypolicy/selinux/mustrunas_test.go
+8
-8
No files found.
pkg/security/podsecuritypolicy/selinux/mustrunas_test.go
View file @
3f261537
...
...
@@ -100,31 +100,31 @@ func TestMustRunAsValidate(t *testing.T) {
seType
.
Type
=
"invalid"
tests
:=
map
[
string
]
struct
{
seLinux
*
api
.
SELinuxOptions
podSeLinux
*
api
.
SELinuxOptions
expectedMsg
string
}{
"invalid role"
:
{
seLinux
:
role
,
podSeLinux
:
role
,
expectedMsg
:
"role: Invalid value"
,
},
"invalid user"
:
{
seLinux
:
user
,
podSeLinux
:
user
,
expectedMsg
:
"user: Invalid value"
,
},
"invalid level"
:
{
seLinux
:
level
,
podSeLinux
:
level
,
expectedMsg
:
"level: Invalid value"
,
},
"invalid type"
:
{
seLinux
:
seType
,
podSeLinux
:
seType
,
expectedMsg
:
"type: Invalid value"
,
},
"valid"
:
{
seLinux
:
newValidOpts
(),
podSeLinux
:
newValidOpts
(),
expectedMsg
:
""
,
},
"valid with different order of categories"
:
{
seLinux
:
newValidOptsWithLevel
(
"s0:c6,c0"
),
podSeLinux
:
newValidOptsWithLevel
(
"s0:c6,c0"
),
expectedMsg
:
""
,
},
}
...
...
@@ -140,7 +140,7 @@ func TestMustRunAsValidate(t *testing.T) {
continue
}
errs
:=
mustRunAs
.
Validate
(
nil
,
nil
,
nil
,
tc
.
s
eLinux
)
errs
:=
mustRunAs
.
Validate
(
nil
,
nil
,
nil
,
tc
.
podS
eLinux
)
//should've passed but didn't
if
len
(
tc
.
expectedMsg
)
==
0
&&
len
(
errs
)
>
0
{
t
.
Errorf
(
"%s expected no errors but received %v"
,
name
,
errs
)
...
...
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