add nxos_snapshot test for missing required param (#37248)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 2501834c42
)
This commit is contained in:
parent
88bd45b354
commit
846bfbf378
2 changed files with 17 additions and 0 deletions
|
@ -359,6 +359,7 @@ def main():
|
|||
("action", "delete", ["snapshot_name"])]
|
||||
|
||||
module = AnsibleModule(argument_spec=argument_spec,
|
||||
required_if=required_if,
|
||||
supports_check_mode=True)
|
||||
|
||||
warnings = list()
|
||||
|
|
|
@ -34,6 +34,22 @@
|
|||
path: '.'
|
||||
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
|
||||
|
||||
always:
|
||||
|
|
Loading…
Reference in a new issue