diff options
author | Fabian von Feilitzsch <fabian@fabianism.us> | 2019-03-06 13:41:17 +0100 |
---|---|---|
committer | John R Barker <john@johnrbarker.com> | 2019-03-06 13:41:17 +0100 |
commit | 65424dd61425a3340476b4078bbc6513f03b03bc (patch) | |
tree | be12b439fb2ec6e9fd9a68b7f09cb1df96fca0ff /test | |
parent | Add launch type to ecs task (#49081) (diff) | |
download | ansible-65424dd61425a3340476b4078bbc6513f03b03bc.tar.xz ansible-65424dd61425a3340476b4078bbc6513f03b03bc.zip |
Allow user to specify a custom condition when waiting (#52185)
Diffstat (limited to 'test')
-rw-r--r-- | test/integration/targets/k8s/playbooks/roles/k8s/tasks/waiter.yml | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/integration/targets/k8s/playbooks/roles/k8s/tasks/waiter.yml b/test/integration/targets/k8s/playbooks/roles/k8s/tasks/waiter.yml index cbb6f82542..2da7cfb443 100644 --- a/test/integration/targets/k8s/playbooks/roles/k8s/tasks/waiter.yml +++ b/test/integration/targets/k8s/playbooks/roles/k8s/tasks/waiter.yml @@ -242,6 +242,31 @@ - deploy.result.status.availableReplicas == deploy.result.status.replicas - updated_deploy_pods.resources[0].spec.containers[0].image.endswith(":2") + - name: pause a deployment + k8s: + definition: + apiVersion: extensions/v1beta1 + kind: Deployment + metadata: + name: wait-deploy + namespace: "{{ wait_namespace }}" + spec: + paused: True + wait: yes + wait_condition: + type: Progressing + status: Unknown + reason: DeploymentPaused + register: pause_deploy + + - name: check that paused deployment wait worked + assert: + that: + - condition.reason == "DeploymentPaused" + - condition.status == "Unknown" + vars: + condition: '{{ pause_deploy.result.status.conditions | selectattr("type", "Progressing")).0 }}' + - name: add a service based on the deployment k8s: definition: |