Created
February 22, 2021 12:14
-
-
Save wshihadeh/bde90e8237917dfa8568e4087232384e to your computer and use it in GitHub Desktop.
Deployment Unit Tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
suite: Deployment configuration | |
templates: | |
- deployment.yaml | |
tests: | |
- it: should have 1 replica by default | |
asserts: | |
- equal: | |
path: spec.replicas | |
value: 1 | |
- it: should have the specified amount of replicas when specified via values | |
set: | |
deployment: | |
replicas: 3 | |
asserts: | |
- equal: | |
path: spec.replicas | |
value: 3 | |
- it: should have a rollingUpdate strategy with default values | |
asserts: | |
- equal: | |
path: spec.strategy.type | |
value: RollingUpdate | |
- equal: | |
path: spec.strategy.rollingUpdate.maxUnavailable | |
value: 1 | |
- equal: | |
path: spec.strategy.rollingUpdate.maxSurge | |
value: 1 | |
- it: should have a custom merged rollingUpdate strategy with specified values | |
set: | |
rollingUpdate: | |
maxUnavailable: 4 | |
vegetaForce: 9000 | |
asserts: | |
- equal: | |
path: spec.strategy.type | |
value: RollingUpdate | |
- equal: | |
path: spec.strategy.rollingUpdate.maxUnavailable | |
value: 4 | |
- equal: | |
path: spec.strategy.rollingUpdate.maxSurge | |
value: 1 | |
- equal: | |
path: spec.strategy.rollingUpdate.vegetaForce | |
value: 9000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment