consul_session: ensure scheme parameter is used (#58692)
* Ensure an error occurs when unknown scheme is used * consul_session: don't ignore 'scheme' parameter
This commit is contained in:
parent
7346b699ee
commit
ef1cf2d2e8
3 changed files with 16 additions and 1 deletions
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- "consul_session: don't ignore ``scheme`` parameter"
|
|
@ -232,7 +232,8 @@ def remove_session(module):
|
|||
|
||||
def get_consul_api(module):
|
||||
return consul.Consul(host=module.params.get('host'),
|
||||
port=module.params.get('port'))
|
||||
port=module.params.get('port'),
|
||||
scheme=module.params.get('scheme'))
|
||||
|
||||
|
||||
def test_dependencies(module):
|
||||
|
|
|
@ -70,6 +70,18 @@
|
|||
that:
|
||||
- result is failed
|
||||
|
||||
- name: ensure unknown scheme fails
|
||||
consul_session:
|
||||
state: info
|
||||
id: '{{ session_id }}'
|
||||
scheme: non_existent
|
||||
register: result
|
||||
ignore_errors: True
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- result is failed
|
||||
|
||||
- name: delete a session
|
||||
consul_session:
|
||||
state: absent
|
||||
|
|
Loading…
Reference in a new issue