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

pull/16294/merge
Steve Gargan 8 years ago committed by Matt Clay
parent bb9ed50441
commit a06da86d52

@ -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:

@ -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

@ -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:

Loading…
Cancel
Save