mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-25 14:20:22 -07:00
cmd_runner: added flag check_mode_skip to context (#4736)
* cmd_runner: added flag skip_if_check_mode to context * added changelog fragment * adjusted param name and added new one
This commit is contained in:
parent
2eadedef6d
commit
be69f95f63
5 changed files with 59 additions and 35 deletions
|
@ -82,3 +82,41 @@ cmd_echo_tests:
|
|||
- >-
|
||||
"MissingArgumentValue: Cannot find value for parameter bb"
|
||||
in test_result.module_stderr
|
||||
|
||||
- name: set aa and bb value with check_mode on
|
||||
arg_formats:
|
||||
aa:
|
||||
func: as_opt_eq_val
|
||||
args: [--answer]
|
||||
bb:
|
||||
func: as_bool
|
||||
args: [--bb-here]
|
||||
arg_order: 'aa bb'
|
||||
arg_values:
|
||||
bb: true
|
||||
aa: 11
|
||||
check_mode: true
|
||||
assertions:
|
||||
- test_result.rc == 0
|
||||
- test_result.out == "-- --answer=11 --bb-here\n"
|
||||
- test_result.err == ""
|
||||
|
||||
- name: set aa and bb value with check_mode and check_mode_skip on
|
||||
arg_formats:
|
||||
aa:
|
||||
func: as_opt_eq_val
|
||||
args: [--answer]
|
||||
bb:
|
||||
func: as_bool
|
||||
args: [--bb-here]
|
||||
arg_order: 'aa bb'
|
||||
arg_values:
|
||||
bb: true
|
||||
check_mode_skip: true
|
||||
aa: 11
|
||||
check_mode: true
|
||||
expect_error: true # because if result contains rc != 0, ansible assumes error
|
||||
assertions:
|
||||
- test_result.rc == None
|
||||
- test_result.out == None
|
||||
- test_result.err == None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue