mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-03-22 05:09:12 +00:00
Handle case when version given is an empty string in uv_python module
This commit is contained in:
parent
722c9441c5
commit
a21646d398
2 changed files with 18 additions and 4 deletions
|
|
@ -257,10 +257,25 @@
|
|||
- name: No specified version
|
||||
uv_python:
|
||||
state: latest
|
||||
version: ""
|
||||
ignore_errors: true
|
||||
register: no_version
|
||||
|
||||
- name: Verify failure when no version is specified
|
||||
assert:
|
||||
that:
|
||||
- no_version.failed is true
|
||||
- no_version.failed is true
|
||||
- '"Unsupported version format" in no_version.msg'
|
||||
|
||||
- name: Unsupported version format given
|
||||
uv_python:
|
||||
state: latest
|
||||
version: "3.8.post2"
|
||||
ignore_errors: true
|
||||
register: wrong_version
|
||||
|
||||
- name: Verify failure when unsupported version format is specified
|
||||
assert:
|
||||
that:
|
||||
- wrong_version.failed is true
|
||||
- '"Unsupported version format" in wrong_version.msg'
|
||||
Loading…
Add table
Add a link
Reference in a new issue