mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-23 12:33:59 -07:00
win_msg: Added integration tests, parameter fixes (#26126)
This commit is contained in:
parent
3ba4fc2d54
commit
bb7ebc6a55
4 changed files with 54 additions and 22 deletions
1
test/integration/targets/win_msg/aliases
Normal file
1
test/integration/targets/win_msg/aliases
Normal file
|
@ -0,0 +1 @@
|
|||
windows/ci/group2
|
27
test/integration/targets/win_msg/tasks/main.yml
Normal file
27
test/integration/targets/win_msg/tasks/main.yml
Normal file
|
@ -0,0 +1,27 @@
|
|||
- name: Warn user
|
||||
win_msg:
|
||||
display_seconds: 10
|
||||
msg: Keep calm and carry on.
|
||||
register: msg_result
|
||||
|
||||
- name: Test msg_result
|
||||
assert:
|
||||
that:
|
||||
- not msg_result|failed
|
||||
- msg_result|changed
|
||||
- msg_result.runtime_seconds < 10
|
||||
|
||||
- name: Warn user and wait for it
|
||||
win_msg:
|
||||
display_seconds: 5
|
||||
msg: Keep calm and carry on.
|
||||
#to: '{{ ansible_user }}'
|
||||
wait: yes
|
||||
register: msg_wait_result
|
||||
|
||||
- name: Test msg_wait_result
|
||||
assert:
|
||||
that:
|
||||
- not msg_wait_result|failed
|
||||
- msg_wait_result|changed
|
||||
- msg_wait_result.runtime_seconds > 5
|
Loading…
Add table
Add a link
Reference in a new issue