Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Sep 16, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/integration/roles/test_consul_acl/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion test/integration/roles/test_consul_kv/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 9 additions & 8 deletions test/integration/roles/test_consul_session/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

- name: register basic session with consul
consul_session:
name: session1
Expand All @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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:
Expand Down