mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-11 16:44:22 -07:00
apk: fix empty/whitespace-only package name check (#10532)
* Fix empty/whitespace-only package name check. * Adjust test.
This commit is contained in:
parent
ac4aca2004
commit
abfe1e6180
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