diff --git a/tests/testcases/015_check-nodes-ready.yml b/tests/testcases/015_check-nodes-ready.yml index ee8567e79..33b3416b6 100644 --- a/tests/testcases/015_check-nodes-ready.yml +++ b/tests/testcases/015_check-nodes-ready.yml @@ -5,14 +5,12 @@ - name: Check kubectl output command: "{{ bin_dir }}/kubectl get nodes" changed_when: false - register: get_nodes - name: Check that all nodes are running and ready - command: "{{ bin_dir }}/kubectl get nodes --no-headers -o yaml" + command: > + {{ bin_dir }}/kubectl get nodes -o jsonpath-as-json='{.items[*].status.conditions[?(@.type == "Ready")]}' changed_when: false - register: get_nodes_yaml - until: - # Check that all nodes are Status=Ready - - '(get_nodes_yaml.stdout | from_yaml)["items"] | map(attribute = "status.conditions") | map("items2dict", key_name="type", value_name="status") | map(attribute="Ready") | list | min' + register: nodes_ready_conditions + until: nodes_ready_conditions.stdout | from_json | selectattr('status', '!=', "True") == [] retries: 30 delay: 10