mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-22 20:13:59 -07:00
Move ping and win_ping closer together (#26028)
So in an effort to verify if Windows modules are feature complete compared to the python equivalent, I stumbled upon these differences. This PR includes: - Add missing 'data' option from documentation - Simplify ping module - Update integration tests to test exception
This commit is contained in:
parent
56d33a2967
commit
5be32aa5af
4 changed files with 117 additions and 56 deletions
|
@ -23,15 +23,31 @@
|
|||
- name: assert the ping worked
|
||||
assert:
|
||||
that:
|
||||
- "result.changed == false"
|
||||
- "result.ping == 'pong'"
|
||||
- not result|failed
|
||||
- not result|changed
|
||||
- result.ping == 'pong'
|
||||
|
||||
- name: ping with data
|
||||
ping: data="testing"
|
||||
ping:
|
||||
data: testing
|
||||
register: result
|
||||
|
||||
- name: assert the ping worked with data
|
||||
assert:
|
||||
that:
|
||||
- "result.changed == false"
|
||||
- "result.ping == 'testing'"
|
||||
- not result|failed
|
||||
- not result|changed
|
||||
- result.ping == 'testing'
|
||||
|
||||
- name: ping with data=crash
|
||||
ping:
|
||||
data: crash
|
||||
register: result
|
||||
ignore_errors: yes
|
||||
|
||||
- name: assert the ping failed with data=boom
|
||||
assert:
|
||||
that:
|
||||
- result|failed
|
||||
- not result|changed
|
||||
- "'Exception: boom' in result.module_stderr"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue