From 48aa035b959de315aef8a82c1860a6d3a62215f2 Mon Sep 17 00:00:00 2001 From: Ruediger Pluem Date: Tue, 21 Jan 2025 15:17:29 +0100 Subject: [PATCH] Fix _assert_no_warnings(run) in test_crud Rename tasks variable to tasks_list as tasks is a reserved name and triggers the warning "Found variable using reserved name: tasks" Signed-off-by: Ruediger Pluem --- tests/test_playbooks/tasks/wait_for_task.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/test_playbooks/tasks/wait_for_task.yml b/tests/test_playbooks/tasks/wait_for_task.yml index 933497ddda..bf6739ac8c 100644 --- a/tests/test_playbooks/tasks/wait_for_task.yml +++ b/tests/test_playbooks/tasks/wait_for_task.yml @@ -7,10 +7,10 @@ validate_certs: "{{ foreman_validate_certs }}" resource: foreman_tasks search: "(label = Actions::Katello::Product::Destroy and action ~ 'Test Product' and state = running)" - register: tasks + register: tasks_list - assert: fail_msg: "Verification that tasks are runing" - that: tasks.resources | length > 0 + that: tasks_list.resources | length > 0 - name: wait for the task to finish wait_for_task: @@ -20,7 +20,7 @@ validate_certs: "{{ foreman_validate_certs }}" task: "{{ item }}" timeout: 900 - loop: "{{ tasks.resources | map(attribute='id') | list }}" + loop: "{{ tasks_list.resources | map(attribute='id') | list }}" - name: "Search for previously created task" resource_info: @@ -30,8 +30,8 @@ validate_certs: "{{ foreman_validate_certs }}" resource: foreman_tasks search: "(label = Actions::Katello::Product::Destroy and action ~ 'Test Product' and state = running)" - register: tasks + register: tasks_list - assert: fail_msg: "Verification that no task is runing anymore" - that: tasks.resources | length == 0 + that: tasks_list.resources | length == 0 ...