Skip to content

Commit

Permalink
chore: migrate kuttl tests to chainsaw (#821)
Browse files Browse the repository at this point in the history
Signed-off-by: Charles-Edouard Brétéché <[email protected]>
  • Loading branch information
eddycharly authored Dec 4, 2023
1 parent 88d92ec commit eb9c584
Show file tree
Hide file tree
Showing 60 changed files with 261 additions and 273 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: v1.28
version: v1.28.0
tests:
- argo
# - argo
- aws
- best-practices
- castai
Expand Down Expand Up @@ -102,7 +102,7 @@ jobs:
- name: v1.28
version: v1.28.0
tests:
# - argo
- argo
# - aws
# - best-practices
# - castai
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ kind: ClusterPolicy
metadata:
name: application-field-validation
status:
ready: true
ready: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
apiVersion: chainsaw.kyverno.io/v1alpha1
kind: Test
metadata:
creationTimestamp: null
name: application-field-validation
spec:
steps:
- name: step-01
try:
- assert:
file: chainsaw-step-01-assert-1.yaml
- name: step-02
try:
- script:
content: |
sed 's/validationFailureAction: audit/validationFailureAction: Enforce/' ../application-field-validation.yaml | kubectl create -f -
- assert:
file: chainsaw-step-02-assert-1.yaml
- name: step-03
try:
- apply:
file: good-application.yaml
- apply:
expect:
- check:
($error != null): true
file: bad-application.yaml
- name: step-99
try:
- delete:
ref:
apiVersion: kyverno.io/v1
kind: ClusterPolicy
name: application-field-validation
5 changes: 0 additions & 5 deletions argo/application-field-validation/02-enforce.yaml

This file was deleted.

7 changes: 0 additions & 7 deletions argo/application-field-validation/03-applications.yaml

This file was deleted.

6 changes: 0 additions & 6 deletions argo/application-field-validation/99-delete.yaml

This file was deleted.

94 changes: 0 additions & 94 deletions argo/application-field-validation/report.yaml

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ kind: ClusterPolicy
metadata:
name: application-prevent-default-project
status:
ready: true
ready: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
apiVersion: chainsaw.kyverno.io/v1alpha1
kind: Test
metadata:
creationTimestamp: null
name: application-prevent-default-project
spec:
steps:
- name: step-01
try:
- assert:
file: chainsaw-step-01-assert-1.yaml
- name: step-02
try:
- script:
content: |
sed 's/validationFailureAction: audit/validationFailureAction: Enforce/' ../application-prevent-default-project.yaml | kubectl create -f -
- assert:
file: chainsaw-step-02-assert-1.yaml
- name: step-03
try:
- apply:
file: good-application.yaml
- apply:
expect:
- check:
($error != null): true
file: bad-application.yaml
- name: step-99
try:
- delete:
ref:
apiVersion: kyverno.io/v1
kind: ClusterPolicy
name: application-prevent-default-project
5 changes: 0 additions & 5 deletions argo/application-prevent-default-project/02-enforce.yaml

This file was deleted.

7 changes: 0 additions & 7 deletions argo/application-prevent-default-project/03-applications.yaml

This file was deleted.

6 changes: 0 additions & 6 deletions argo/application-prevent-default-project/99-delete.yaml

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ kind: ClusterPolicy
metadata:
name: application-prevent-updates-project
status:
ready: true
ready: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
apiVersion: chainsaw.kyverno.io/v1alpha1
kind: Test
metadata:
creationTimestamp: null
name: application-prevent-updates-project
spec:
steps:
- name: step-01
try:
- assert:
file: chainsaw-step-01-assert-1.yaml
- name: step-02
try:
- script:
content: |
sed 's/validationFailureAction: audit/validationFailureAction: Enforce/' ../application-prevent-updates-project.yaml | kubectl create -f -
- assert:
file: chainsaw-step-02-assert-1.yaml
- name: step-03
try:
- apply:
file: application.yaml
- apply:
file: application-update.yaml
- apply:
expect:
- check:
($error != null): true
file: application-bad-update.yaml
- name: step-99
try:
- delete:
ref:
apiVersion: kyverno.io/v1
kind: ClusterPolicy
name: application-prevent-updates-project
5 changes: 0 additions & 5 deletions argo/application-prevent-updates-project/02-enforce.yaml

This file was deleted.

9 changes: 0 additions & 9 deletions argo/application-prevent-updates-project/03-applications.yaml

This file was deleted.

6 changes: 0 additions & 6 deletions argo/application-prevent-updates-project/99-delete.yaml

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ kind: ClusterPolicy
metadata:
name: applicationset-name-matches-project
status:
ready: true
ready: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
apiVersion: chainsaw.kyverno.io/v1alpha1
kind: Test
metadata:
creationTimestamp: null
name: applicationset-name-matches-project
spec:
steps:
- name: step-01
try:
- assert:
file: chainsaw-step-01-assert-1.yaml
- name: step-02
try:
- script:
content: |
sed 's/validationFailureAction: audit/validationFailureAction: Enforce/' ../applicationset-name-matches-project.yaml | kubectl create -f -
- assert:
file: chainsaw-step-02-assert-1.yaml
- name: step-03
try:
- apply:
file: good-appset.yaml
- apply:
expect:
- check:
($error != null): true
file: bad-appset.yaml
- name: step-99
try:
- delete:
ref:
apiVersion: kyverno.io/v1
kind: ClusterPolicy
name: applicationset-name-matches-project
5 changes: 0 additions & 5 deletions argo/applicationset-name-matches-project/02-enforce.yaml

This file was deleted.

This file was deleted.

6 changes: 0 additions & 6 deletions argo/applicationset-name-matches-project/99-delete.yaml

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ kind: ClusterPolicy
metadata:
name: appproject-clusterresourceblacklist
status:
ready: true
ready: true
Loading

0 comments on commit eb9c584

Please sign in to comment.