From a9048f0f7d78a0752ca8cb3289afcf7659a3ec1d Mon Sep 17 00:00:00 2001 From: Alex Willmer Date: Wed, 28 May 2025 10:22:10 +0100 Subject: [PATCH] CI: Use Ansible finished test (`result.finished` -> `result is finished`) Required by Ansible 12 (ansible-core-2.19). refs #1298 --- tests/ansible/integration/async/multiple_items_loop.yml | 2 +- .../integration/async/result_binary_producing_json.yml | 2 +- tests/ansible/integration/async/runner_new_process.yml | 4 ++-- tests/ansible/integration/async/runner_one_job.yml | 2 +- .../ansible/integration/async/runner_timeout_then_polling.yml | 2 +- .../integration/async/runner_two_simultaneous_jobs.yml | 4 ++-- tests/ansible/integration/runner/crashy_new_style_module.yml | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/ansible/integration/async/multiple_items_loop.yml b/tests/ansible/integration/async/multiple_items_loop.yml index e7cc1bac..54340d2a 100644 --- a/tests/ansible/integration/async/multiple_items_loop.yml +++ b/tests/ansible/integration/async/multiple_items_loop.yml @@ -19,7 +19,7 @@ jid: "{{ item.ansible_job_id }}" become: yes register: out - until: out.finished + until: out is finished retries: 30 with_items: - "{{ jobs.results }}" diff --git a/tests/ansible/integration/async/result_binary_producing_json.yml b/tests/ansible/integration/async/result_binary_producing_json.yml index fc81ba9d..c64a8f89 100644 --- a/tests/ansible/integration/async/result_binary_producing_json.yml +++ b/tests/ansible/integration/async/result_binary_producing_json.yml @@ -34,7 +34,7 @@ async_status: jid: "{{job.ansible_job_id}}" register: result - until: result.finished + until: result is finished retries: 100000 delay: 0 diff --git a/tests/ansible/integration/async/runner_new_process.yml b/tests/ansible/integration/async/runner_new_process.yml index 0ed0798a..1b6ddad6 100644 --- a/tests/ansible/integration/async/runner_new_process.yml +++ b/tests/ansible/integration/async/runner_new_process.yml @@ -30,7 +30,7 @@ async_status: jid: "{{async_proc1.ansible_job_id}}" register: async_result1 - until: async_result1.finished + until: async_result1 is finished retries: 100000 delay: 0 @@ -44,7 +44,7 @@ async_status: jid: "{{async_proc2.ansible_job_id}}" register: async_result2 - until: async_result2.finished + until: async_result2 is finished retries: 100000 delay: 0 diff --git a/tests/ansible/integration/async/runner_one_job.yml b/tests/ansible/integration/async/runner_one_job.yml index 95a32e2b..de7a22e6 100644 --- a/tests/ansible/integration/async/runner_one_job.yml +++ b/tests/ansible/integration/async/runner_one_job.yml @@ -30,7 +30,7 @@ async_status: jid: "{{job1.ansible_job_id}}" register: result1 - until: result1.finished + until: result1 is finished retries: 100000 delay: 0 diff --git a/tests/ansible/integration/async/runner_timeout_then_polling.yml b/tests/ansible/integration/async/runner_timeout_then_polling.yml index 783d30a0..55928b1d 100644 --- a/tests/ansible/integration/async/runner_timeout_then_polling.yml +++ b/tests/ansible/integration/async/runner_timeout_then_polling.yml @@ -19,7 +19,7 @@ async_status: jid: "{{job.ansible_job_id}}" register: result - until: result.finished + until: result is finished retries: 500 delay: 0 ignore_errors: true diff --git a/tests/ansible/integration/async/runner_two_simultaneous_jobs.yml b/tests/ansible/integration/async/runner_two_simultaneous_jobs.yml index 4d236c3e..74a50318 100644 --- a/tests/ansible/integration/async/runner_two_simultaneous_jobs.yml +++ b/tests/ansible/integration/async/runner_two_simultaneous_jobs.yml @@ -40,7 +40,7 @@ async_status: jid: "{{job1.ansible_job_id}}" register: result1 - until: result1.finished + until: result1 is finished retries: 5 delay: 1 @@ -48,7 +48,7 @@ async_status: jid: "{{job2.ansible_job_id}}" register: result2 - until: result2.finished + until: result2 is finished retries: 5 delay: 1 diff --git a/tests/ansible/integration/runner/crashy_new_style_module.yml b/tests/ansible/integration/runner/crashy_new_style_module.yml index 3fb1a722..80833ab8 100644 --- a/tests/ansible/integration/runner/crashy_new_style_module.yml +++ b/tests/ansible/integration/runner/crashy_new_style_module.yml @@ -16,7 +16,7 @@ assert: that: - not out.changed - - out.rc == 1 + - out is failed # https://github.com/ansible/ansible/commit/62d8c8fde6a76d9c567ded381e9b34dad69afcd6 - out.msg is match(msg_pattern) - (out.module_stdout == "" and out.module_stderr is search(tb_pattern))