Skip to content

Commit 9bbcd0b

Browse files
committed
test: run handlers after each role invocation to ensure role works
This will also help with cleanup - removing files used by kdump before the handlers are run causes test errors. Signed-off-by: Rich Megginson <[email protected]>
1 parent d67bfb9 commit 9bbcd0b

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

tests/tests_default_reboot.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@
8181
include_role:
8282
name: linux-system-roles.kdump
8383

84+
- name: Notify and run handlers again
85+
meta: flush_handlers
86+
8487
- name: Check for crashkernel, grubby settings again
8588
when: is_el9 or is_el7_or_el8
8689
block:

tests/tests_ssh.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@
9494
ansible_failed_result.msg
9595
- kdump_reboot_required | bool
9696
97+
- name: Notify and run handlers
98+
meta: flush_handlers
99+
97100
- name: Cleanup kdump_path
98101
file:
99102
path: "{{ kdump_path }}"

tests/tests_ssh_reboot.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,9 @@
140140
include_role:
141141
name: linux-system-roles.kdump
142142

143+
- name: Notify and run handlers again
144+
meta: flush_handlers
145+
143146
- name: Get the authorized_keys contents after
144147
slurp:
145148
src: "{{ __authorized_keys_file.stat.path }}"

0 commit comments

Comments
 (0)