This commit is contained in:
Stavros kois
2023-01-30 15:05:55 +02:00
parent 31b8556bc7
commit d8c845ddec
5 changed files with 18 additions and 0 deletions
@@ -9,10 +9,12 @@ tests:
enabled: true
primary: true
type: Deployment
podSpec: {}
other-controller-name:
enabled: true
primary: false
type: DaemonSet
podSpec: {}
asserts:
- documentIndex: &deploymentDoc 0
isKind:
@@ -9,10 +9,12 @@ tests:
enabled: true
primary: true
type: Deployment
podSpec: {}
other-controller-name-super-long-name-that-is-longer-than-63-characters:
enabled: true
primary: false
type: Deployment
podSpec: {}
asserts:
- failedTemplate:
errorMessage: Name [release-name-common-test-other-controller-name-super-long-name-that-is-longer-than-63-characters] is not valid. Must start and end with an alphanumeric character. It can contain '-'. And must be at most 63 characters.
@@ -24,10 +26,12 @@ tests:
enabled: true
primary: true
type: Deployment
podSpec: {}
_other-controller-name:
enabled: true
primary: false
type: Deployment
podSpec: {}
asserts:
- failedTemplate:
errorMessage: Name [release-name-common-test-_other-controller-name] is not valid. Must start and end with an alphanumeric character. It can contain '-'. And must be at most 63 characters.
@@ -39,6 +43,7 @@ tests:
enabled: true
primary: true
type: not-valid-type
podSpec: {}
asserts:
- failedTemplate:
errorMessage: Controller - Expected <type> to be one of [Deployment, StatefulSet, DaemonSet, Job, CronJob], but got [not-valid-type]
@@ -50,10 +55,12 @@ tests:
enabled: false
primary: true
type: Deployment
podSpec: {}
other-controller-name:
enabled: true
primary: false
type: Deployment
podSpec: {}
asserts:
- failedTemplate:
errorMessage: Controller - At least one enabled controller must be primary
@@ -65,10 +72,12 @@ tests:
enabled: true
primary: true
type: Deployment
podSpec: {}
other-controller-name:
enabled: true
primary: true
type: Deployment
podSpec: {}
asserts:
- failedTemplate:
errorMessage: Controller - Only one controller can be primary
@@ -81,6 +90,7 @@ tests:
primary: true
type: Deployment
labels: "not a dict"
podSpec: {}
asserts:
- failedTemplate:
errorMessage: Controller - Expected <labels> to be a dictionary, but got [string]
@@ -93,6 +103,7 @@ tests:
primary: true
type: Deployment
annotations: "not a dict"
podSpec: {}
asserts:
- failedTemplate:
errorMessage: Controller - Expected <annotations> to be a dictionary, but got [string]
@@ -28,6 +28,7 @@ tests:
annotations:
annotation1: "{{ .Values.annotation1 }}"
annotation2: annotation2
podSpec: {}
asserts:
- documentIndex: &deploymentDoc 0
isKind:
@@ -9,6 +9,7 @@ tests:
enabled: true
primary: true
type: Deployment
podSpec: {}
asserts:
- documentIndex: &deploymentDoc 0
isKind:
@@ -38,6 +39,7 @@ tests:
rollingUpdate:
maxSurge: 5
maxUnavailable: 5
podSpec: {}
asserts:
- documentIndex: *deploymentDoc
isSubset:
@@ -10,6 +10,7 @@ tests:
primary: true
type: Deployment
strategy: not-a-strategy
podSpec: {}
asserts:
- failedTemplate:
errorMessage: Deployment - Expected <strategy> to be one of [Recreate, RollingUpdate], but got [not-a-strategy]
@@ -23,6 +24,7 @@ tests:
type: Deployment
strategy: RollingUpdate
rollingUpdate: "not a dict"
podSpec: {}
asserts:
- failedTemplate:
errorMessage: Deployment - Expected <rollingUpdate> to be a dictionary, but got [string]