Skip to content

Commit

Permalink
Added some tests cases
Browse files Browse the repository at this point in the history
  • Loading branch information
jdesouza committed Nov 12, 2024
1 parent 091e65d commit c8afd2b
Show file tree
Hide file tree
Showing 6 changed files with 88 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/checks/hostPathSet/failure.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: Pod
metadata:
name: nginx
labels:
app.kubernetes.io/name: nginx
spec:
containers:
- name: nginx
image: nginx
volumes:
- name: log-volume
hostPath:
path: /var/log
12 changes: 12 additions & 0 deletions test/checks/hostPathSet/success.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: nginx
labels:
app.kubernetes.io/name: nginx
spec:
containers:
- name: nginx
image: nginx
volumes:
- name: log-volume
16 changes: 16 additions & 0 deletions test/checks/hostProcess/failure.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: v1
kind: Pod
metadata:
name: nginx
labels:
app.kubernetes.io/name: nginx
spec:
containers:
- name: nginx
image: nginx
ports:
- containerPort: 80
hostPort: 8080
securityContext:
windowsOptions:
hostProcess: true
16 changes: 16 additions & 0 deletions test/checks/hostProcess/success.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: v1
kind: Pod
metadata:
name: nginx
labels:
app.kubernetes.io/name: nginx
spec:
containers:
- name: nginx
image: nginx
ports:
- containerPort: 80
hostPort: 8080
securityContext:
windowsOptions:
hostProcess: false
15 changes: 15 additions & 0 deletions test/checks/procMount/failure.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: v1
kind: Pod
metadata:
name: nginx
labels:
app.kubernetes.io/name: nginx
spec:
containers:
- name: nginx
image: nginx
ports:
- containerPort: 80
hostPort: 8080
securityContext:
procMount: Other
15 changes: 15 additions & 0 deletions test/checks/procMount/success.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: v1
kind: Pod
metadata:
name: nginx
labels:
app.kubernetes.io/name: nginx
spec:
containers:
- name: nginx
image: nginx
ports:
- containerPort: 80
hostPort: 8080
securityContext:
procMount: Default

0 comments on commit c8afd2b

Please sign in to comment.