fix some tests

This commit is contained in:
Stavros kois
2023-02-13 20:32:09 +02:00
parent 47b907291c
commit f5689dc400
4 changed files with 41 additions and 3 deletions

View File

@@ -25,8 +25,8 @@ tests:
updateStrategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 0
maxUnavailable: 1
maxSurge: 1
- it: should apply defaults to rollingUpdate
set:
@@ -46,7 +46,7 @@ tests:
content:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxSurge: 0
maxUnavailable: 1
- it: should apply spec correctly

View File

@@ -28,3 +28,22 @@ tests:
asserts:
- failedTemplate:
errorMessage: DaemonSet - Expected <rollingUpdate> to be a dictionary, but got [string]
- it: should fail with both maxSurge and maxUnavailable set to 0
set:
fallbackDefaults:
maxSurge: 0
maxUnavailable: 0
workload:
workload-name:
enabled: true
primary: true
type: DaemonSet
strategy: RollingUpdate
rollingUpdate:
maxSurge: 0
maxUnavailable: 0
podSpec: {}
asserts:
- failedTemplate:
errorMessage: DaemonSet - Cannot have <maxSurge> and <maxUnavailable> both set to 0

View File

@@ -44,7 +44,7 @@ tests:
content:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxSurge: 0
maxUnavailable: 1
- it: should apply spec correctly

View File

@@ -28,3 +28,22 @@ tests:
asserts:
- failedTemplate:
errorMessage: Deployment - Expected <rollingUpdate> to be a dictionary, but got [string]
- it: should fail with both maxSurge and maxUnavailable set to 0
set:
fallbackDefaults:
maxSurge: 0
maxUnavailable: 0
workload:
workload-name:
enabled: true
primary: true
type: Deployment
strategy: RollingUpdate
rollingUpdate:
maxSurge: 0
maxUnavailable: 0
podSpec: {}
asserts:
- failedTemplate:
errorMessage: Deployment - Cannot have <maxSurge> and <maxUnavailable> both set to 0