10.0.0: CmdRunner: remove deprecated feature (#8928)

* remove deprecated feature

* remove deprecated feature from tests as well

* Adjust the integration test

* add changelog frag
This commit is contained in:
Alexei Znamensky 2024-09-26 21:01:36 +12:00 committed by GitHub
commit 002f137134
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 16 additions and 54 deletions

View file

@ -3,7 +3,7 @@
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
- name: create copy of /bin/echo ({{ item.name }})
- name: Create copy of /bin/echo ({{ item.name }})
ansible.builtin.copy:
src: /bin/echo
dest: "{{ item.copy_to }}/echo"
@ -11,7 +11,7 @@
remote_src: true
when: item.copy_to is defined
- name: test cmd_echo module ({{ item.name }})
- name: Test cmd_echo module ({{ item.name }})
cmd_echo:
cmd: "{{ item.cmd | default(omit) }}"
path_prefix: "{{ item.path_prefix | default(omit) }}"
@ -24,6 +24,10 @@
check_mode: "{{ item.check_mode | default(omit) }}"
ignore_errors: "{{ item.expect_error | default(omit) }}"
- name: check results ({{ item.name }})
- name: Debug test results ({{ item.name }})
ansible.builtin.debug:
var: test_result
- name: Check results ({{ item.name }})
_unsafe_assert:
that: "{{ item.assertions }}"

View file

@ -38,22 +38,12 @@ cmd_echo_tests:
- test_result.out == "-- --answer=43 --bb-here\n"
- test_result.err == ""
- name: implicit aa format
arg_formats:
bb:
func: as_bool
args: [--bb-here]
arg_order: ['aa', 'bb']
arg_values:
bb: true
aa: 1984
assertions:
- test_result.rc == 0
- test_result.out == "-- --aa 1984 --bb-here\n"
- test_result.err == ""
- name: missing bb format
arg_order: ['aa', 'bb']
arg_formats:
aa:
func: as_opt_eq_val
args: [--answer]
arg_values:
bb: true
aa: 1984
@ -69,6 +59,9 @@ cmd_echo_tests:
- name: missing bb value
arg_formats:
aa:
func: as_opt_eq_val
args: [--answer]
bb:
func: as_bool
args: [--bb-here]