1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

update consul tests to reflect fixes to the core and session modules (#17451)

This commit is contained in:
Steve Gargan 2016-09-16 23:58:17 +02:00 committed by Matt Clay
parent bb9ed50441
commit a06da86d52
3 changed files with 11 additions and 10 deletions

View file

@ -29,7 +29,7 @@
- with_rules.token | length == 36
- with_rules.name == 'With rule'
- with_rules.rules | match('.*"foo".*')
- with_rules.rules | match('.*"private/foo".*')
- with_rules.rules | search(pattern='private/foo')
- name: clear up
consul_acl:

View file

@ -5,7 +5,7 @@
name: 'ACL rule for testing'
rules:
- key: 'somekey'
policy: all
policy: write
register: test_acl
- name: cleanup from previous failed runs

View file

@ -1,3 +1,4 @@
- name: register basic session with consul
consul_session:
name: session1
@ -13,8 +14,10 @@
- name: add checks for session health check
consul:
check_name: session_check
script: /usr/bin/true
interval: 15
script: /bin/true
interval: 1
- pause: seconds=2
- name: register a session with check
consul_session:
@ -43,7 +46,7 @@
- with_delay.changed
- with_delay.session_id | length == 36
- with_delay.name == 'session_with_delay'
- with_delay.delay == 20
- with_delay.delay == "20"
- name: retrieve session by id
@ -65,11 +68,9 @@
- 3 <= retrieved_by_list.sessions[0]
- name: remove sessions
consul_session: id={{item}} state=absent
with_items:
- basic_result.session_id
- with_check.session_id
- with_delay.session_id
consul_session: id='{{basic_result.session_id}}' state=absent
- consul_session: id='{{with_check.session_id}}' state=absent
- consul_session: id='{{with_delay.session_id}}' state=absent
- name: remove check
consul: