Skip to content

Commit

Permalink
Fix _assert_no_warnings(run) in test_crud
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
rpluem-vf authored and evgeni committed Jan 21, 2025
1 parent 5f5ba20 commit 48aa035
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/test_playbooks/tasks/wait_for_task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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
...

0 comments on commit 48aa035

Please sign in to comment.