Skip to content

Commit

Permalink
added tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hackeramitkumar committed Jul 4, 2023
1 parent 442c479 commit 66cd9de
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 14 deletions.
18 changes: 4 additions & 14 deletions cli-tests/kyverno-test.yaml
Original file line number Diff line number Diff line change
@@ -1,26 +1,16 @@
name: test-image-verify-signature
policies:
- policies.yaml
- policy.yaml
resources:
- resources.yaml
results:
- policy: check-image
rule: verify-signature
resource: signed
resource: signed-first
kind: Pod
status: pass
- policy: check-image
rule: verify-signature
resource: unsigned
resource: unsigned-first
kind: Pod
status: fail
- policy: check-data-volume-image
rule: verify-signature
resource: signed-registry-image-datavolume
kind: DataVolume
status: pass
- policy: check-data-volume-image
rule: verify-signature
resource: unsigned-registry-image-datavolume
kind: DataVolume
status: fail
status: pass
21 changes: 21 additions & 0 deletions cli-tests/resources.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: v1
kind: Pod
metadata:
name: signed-first
spec:
containers:
- name: signed
image: ghcr.io/kyverno/test-verify-image:signed
- name: unsigned
image: ghcr.io/kyverno/test-verify-image:unsigned
---
apiVersion: v1
kind: Pod
metadata:
name: unsigned-first
spec:
containers:
- name: unsigned
image: ghcr.io/kyverno/test-verify-image:unsigned
- name: signed
image: ghcr.io/kyverno/test-verify-image:signed

0 comments on commit 66cd9de

Please sign in to comment.