Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
kube-bench
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GitHub Mirror
aquasecurity
kube-bench
Commits
e8579ade
Commit
e8579ade
authored
7 years ago
by
Liz Rice
Browse files
Options
Downloads
Patches
Plain Diff
Add tests for #50
parent
a6d4f2fb
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
check/data
+42
-0
42 additions, 0 deletions
check/data
check/test_test.go
+16
-0
16 additions, 0 deletions
check/test_test.go
with
58 additions
and
0 deletions
check/data
+
42
−
0
View file @
e8579ade
...
...
@@ -116,3 +116,45 @@ groups:
op: eq
value: "600"
set: true
- id: 10
text: "flag value includes some value in a comma-separated list, value is last in list"
tests:
test_items:
- flag: "--admission-control"
compare:
op: has
value: RBAC
set: true
- id: 11
text: "flag value includes some value in a comma-separated list, value is first in list"
tests:
test_items:
- flag: "--admission-control"
compare:
op: has
value: WebHook
set: true
- id: 12
text: "flag value includes some value in a comma-separated list, value middle of list"
tests:
test_items:
- flag: "--admission-control"
compare:
op: has
value: Something
set: true
- id: 13
text: "flag value includes some value in a comma-separated list, value only one in list"
tests:
test_items:
- flag: "--admission-control"
compare:
op: has
value: Something
set: true
This diff is collapsed.
Click to expand it.
check/test_test.go
+
16
−
0
View file @
e8579ade
...
...
@@ -94,6 +94,22 @@ func TestTestExecute(t *testing.T) {
controls
.
Groups
[
0
]
.
Checks
[
9
],
"600"
,
},
{
controls
.
Groups
[
0
]
.
Checks
[
10
],
"2:45 ../kubernetes/kube-apiserver --option --admission-control=WebHook,RBAC ---audit-log-maxage=40"
,
},
{
controls
.
Groups
[
0
]
.
Checks
[
11
],
"2:45 ../kubernetes/kube-apiserver --option --admission-control=WebHook,RBAC ---audit-log-maxage=40"
,
},
{
controls
.
Groups
[
0
]
.
Checks
[
12
],
"2:45 ../kubernetes/kube-apiserver --option --admission-control=WebHook,Something,RBAC ---audit-log-maxage=40"
,
},
{
controls
.
Groups
[
0
]
.
Checks
[
13
],
"2:45 ../kubernetes/kube-apiserver --option --admission-control=Something ---audit-log-maxage=40"
,
},
}
for
_
,
c
:=
range
cases
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment