diff --git a/library/common-test/tests/daemonset/spec_test.yaml b/library/common-test/tests/daemonset/spec_test.yaml index ffd995a718..28aac14cda 100644 --- a/library/common-test/tests/daemonset/spec_test.yaml +++ b/library/common-test/tests/daemonset/spec_test.yaml @@ -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 diff --git a/library/common-test/tests/daemonset/validation_test.yaml b/library/common-test/tests/daemonset/validation_test.yaml index aa80c7e94f..51279882f4 100644 --- a/library/common-test/tests/daemonset/validation_test.yaml +++ b/library/common-test/tests/daemonset/validation_test.yaml @@ -28,3 +28,22 @@ tests: asserts: - failedTemplate: errorMessage: DaemonSet - Expected 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 and both set to 0 diff --git a/library/common-test/tests/deployment/spec_test.yaml b/library/common-test/tests/deployment/spec_test.yaml index aa244674c4..40d5b04ce0 100644 --- a/library/common-test/tests/deployment/spec_test.yaml +++ b/library/common-test/tests/deployment/spec_test.yaml @@ -44,7 +44,7 @@ tests: content: type: RollingUpdate rollingUpdate: - maxSurge: 1 + maxSurge: 0 maxUnavailable: 1 - it: should apply spec correctly diff --git a/library/common-test/tests/deployment/validation_test.yaml b/library/common-test/tests/deployment/validation_test.yaml index 2d08f3cc50..9364238159 100644 --- a/library/common-test/tests/deployment/validation_test.yaml +++ b/library/common-test/tests/deployment/validation_test.yaml @@ -28,3 +28,22 @@ tests: asserts: - failedTemplate: errorMessage: Deployment - Expected 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 and both set to 0