mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-09-19 13:38:10 -07:00
[PR #10532/abfe1e61 backport][stable-10] apk: fix empty/whitespace-only package name check (#10555)
apk: fix empty/whitespace-only package name check (#10532)
* Fix empty/whitespace-only package name check.
* Adjust test.
(cherry picked from commit abfe1e6180
)
Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
ddbfbcb47e
commit
24789f86fa
3 changed files with 8 additions and 5 deletions
|
@ -183,16 +183,17 @@
|
|||
- result_spaces is failed
|
||||
- "'Package name(s) cannot be empty or whitespace-only' == result_spaces.msg"
|
||||
|
||||
- name: Accept list with valid and empty string
|
||||
- name: Do not accept list with valid and empty string
|
||||
community.general.apk:
|
||||
name: ["busybox", ""]
|
||||
register: result_valid_mixed
|
||||
register: result_invalid_mixed
|
||||
ignore_errors: true
|
||||
|
||||
- name: Assert success with mixed package list
|
||||
- name: Assert failure with mixed package list
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- result_valid_mixed is not failed
|
||||
- result_invalid_mixed is failed
|
||||
- "'Package name(s) cannot be empty or whitespace-only' == result_invalid_mixed.msg"
|
||||
|
||||
- name: Reject package name list with multiple empty/whitespace-only strings
|
||||
community.general.apk:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue