Skip to content

Commit

Permalink
molecule gc.yml - fix sporadic fail (#144)
Browse files Browse the repository at this point in the history
* update

* Update gc.yml
  • Loading branch information
abikouo authored Jun 24, 2021
1 parent 8280bb7 commit 35af8a4
Showing 1 changed file with 33 additions and 15 deletions.
48 changes: 33 additions & 15 deletions molecule/default/tasks/gc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,25 @@
k8s:
definition: "{{ job_definition }}"

- name: Test that job's pod is running
- name: Wait Job's pod
k8s_info:
kind: Pod
namespace: "{{ gc_namespace }}"
label_selectors:
- "job=gc"
wait: yes
wait_timeout: 100
register: job
until: job.resources[0].status.phase == "Running"
register: wait_job
until: wait_job.resources
retries: 5
delay: 10

- name: Wait job's pod running
k8s_info:
kind: Pod
namespace: "{{ gc_namespace }}"
name: "{{ wait_job.resources[0].metadata.name }}"
wait: yes
register: job

- name: Assert job's pod is running
assert:
that: job.resources[0].status.phase == "Running"
Expand Down Expand Up @@ -81,19 +87,25 @@
k8s:
definition: "{{ job_definition }}"

- name: Test that job's pod is running
- name: Wait Job's pod
k8s_info:
kind: Pod
namespace: "{{ gc_namespace }}"
label_selectors:
- "job=gc"
wait: yes
wait_timeout: 100
register: job
until: job.resources[0].status.phase == "Running"
register: wait_job
until: wait_job.resources
retries: 5
delay: 10

- name: Wait job's pod running
k8s_info:
kind: Pod
namespace: "{{ gc_namespace }}"
name: "{{ wait_job.resources[0].metadata.name }}"
wait: yes
register: job

- name: Assert job's pod is running
assert:
that: job.resources[0].status.phase == "Running"
Expand Down Expand Up @@ -126,19 +138,25 @@
k8s:
definition: "{{ job_definition }}"

- name: Test that job's pod is running
- name: Wait Job's pod
k8s_info:
kind: Pod
namespace: "{{ gc_namespace }}"
label_selectors:
- "job=gc"
wait: yes
wait_timeout: 100
register: job
until: job.resources[0].status.phase == "Running"
register: wait_job
until: wait_job.resources
retries: 5
delay: 10

- name: Wait job's pod running
k8s_info:
kind: Pod
namespace: "{{ gc_namespace }}"
name: "{{ wait_job.resources[0].metadata.name }}"
wait: yes
register: job

- name: Assert job's pod is running
assert:
that: job.resources[0].status.phase == "Running"
Expand Down

0 comments on commit 35af8a4

Please sign in to comment.