mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 05:10:22 -07:00
add nxos_snapshot test for missing required param (#37248)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
This commit is contained in:
parent
90943a3362
commit
2501834c42
2 changed files with 17 additions and 0 deletions
|
@ -360,6 +360,7 @@ def main():
|
||||||
("action", "delete", ["snapshot_name"])]
|
("action", "delete", ["snapshot_name"])]
|
||||||
|
|
||||||
module = AnsibleModule(argument_spec=argument_spec,
|
module = AnsibleModule(argument_spec=argument_spec,
|
||||||
|
required_if=required_if,
|
||||||
supports_check_mode=True)
|
supports_check_mode=True)
|
||||||
|
|
||||||
warnings = list()
|
warnings = list()
|
||||||
|
|
|
@ -36,6 +36,22 @@
|
||||||
path: '.'
|
path: '.'
|
||||||
provider: "{{ connection }}"
|
provider: "{{ connection }}"
|
||||||
|
|
||||||
|
- name: FAIL compare snapshots
|
||||||
|
nxos_snapshot:
|
||||||
|
action: compare
|
||||||
|
snapshot1: test_snapshot1
|
||||||
|
snapshot2: test_snapshot2
|
||||||
|
compare_option: summary
|
||||||
|
path: '.'
|
||||||
|
provider: "{{ connection }}"
|
||||||
|
register: result
|
||||||
|
ignore_errors: yes
|
||||||
|
|
||||||
|
- assert:
|
||||||
|
that:
|
||||||
|
- 'result.failed == True'
|
||||||
|
- '"action is compare but all of the following are missing: comparison_results_file" in result.msg'
|
||||||
|
|
||||||
when: snapshot_run
|
when: snapshot_run
|
||||||
|
|
||||||
always:
|
always:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue