mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 21:32:49 +00:00
apt_repository: check attribute repo for None value (#36944)
This commit is contained in:
@@ -199,6 +199,28 @@
|
||||
- name: 'ensure ppa key is absent (expect: pass)'
|
||||
apt_key: id='{{test_ppa_key}}' state=absent
|
||||
|
||||
- name: Test apt_repository with a null value for repo
|
||||
apt_repository:
|
||||
repo:
|
||||
register: result
|
||||
ignore_errors: yes
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- result is failed
|
||||
- result.msg == 'Please set argument \'repo\' to a non-empty value'
|
||||
|
||||
- name: Test apt_repository with an empty value for repo
|
||||
apt_repository:
|
||||
repo: ""
|
||||
register: result
|
||||
ignore_errors: yes
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- result is failed
|
||||
- result.msg == 'Please set argument \'repo\' to a non-empty value'
|
||||
|
||||
#
|
||||
# TEARDOWN
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user