Fix scale wait and add tests

Move wait logic out of raw and into common and use that
logic in scale

Fix a few broken wait condition cases highlighted by scaling
up and down

Move scale-related tests into dedicated test task file

Additional service related tests
This commit is contained in:
Will Thames
2020-05-29 22:50:28 +10:00
parent 5aed26690d
commit aa70416ae7
3 changed files with 166 additions and 8 deletions

View File

@@ -119,6 +119,8 @@
namespace: "{{ wait_namespace }}"
label_selectors:
- app=wait-ds
field_selectors:
- status.phase=Running
register: updated_ds_pods
- name: Check that daemonset wait worked
@@ -242,13 +244,17 @@
namespace: "{{ wait_namespace }}"
label_selectors:
- app=wait-deploy
field_selectors:
- status.phase=Running
register: updated_deploy_pods
until: "{{ updated_deploy_pods.resources[0].spec.containers[0].image.endswith(':2') }}"
retries: 6
delay: 5
- name: Check that deployment wait worked
assert:
that:
- deploy.result.status.availableReplicas == deploy.result.status.replicas
- updated_deploy_pods.resources[0].spec.containers[0].image.endswith(":2")
- name: Pause a deployment
k8s: