Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
775486c9
Commit
775486c9
authored
Oct 01, 2015
by
James Cammarata
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #12589 from jemmyw/consul-http-checks
Update consul integration test with http checks
parents
fe0e4f27
9f9f476b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
1 deletions
+45
-1
test/integration/roles/test_consul_service/tasks/main.yml
+45
-1
No files found.
test/integration/roles/test_consul_service/tasks/main.yml
View file @
775486c9
...
...
@@ -5,9 +5,18 @@
with_items
:
-
service1
-
service2
-
http_check
-
with_check
-
with_tags
-
name
:
cleanup previous checks
consul
:
check_id
:
'
{{item}}'
state
:
absent
with_items
:
-
node_level
-
node_level_http
-
name
:
register very basic service with consul gets default id
consul
:
service_name
:
service1
...
...
@@ -37,12 +46,28 @@
-
basic2_result.service_id == 'service2'
-
basic2_result.service_name == 'Basic Service'
-
name
:
register a service with an http check
consul
:
service_name
:
http_check
service_id
:
http_check
service_port
:
80
http
:
"
http://localhost/status"
interval
:
60s
register
:
http_result
-
name
:
verify service with an http check
assert
:
that
:
-
http_result.changed
-
http_result.service_port == 80
-
http_result.checks | length == 1
-
name
:
register very basic service with check script
consul
:
service_name
:
with_check
service_port
:
80
script
:
"
sh
-c
true"
interval
:
60
interval
:
60
s
register
:
script_result
-
name
:
verify service with check registration
...
...
@@ -86,6 +111,25 @@
-
nodelevel_result.script == 'sh -c
true
'
-
nodelevel_result.interval == '50m'
-
name
:
create a node level http check
consul
:
check_name
:
Node Level HTTP Check
check_id
:
node_level_http
http
:
'
http://localhost/status'
interval
:
1m
timeout
:
30s
register
:
nodelevel_http_result
-
name
:
verify node level http check
assert
:
that
:
-
nodelevel_http_result.changed
-
nodelevel_http_result.check_name == 'Node Level HTTP Check'
-
nodelevel_http_result.check_id == 'node_level_http'
-
nodelevel_http_result.http == 'http://localhost/status'
-
nodelevel_http_result.interval == '1m'
-
nodelevel_http_result.timeout == '30s'
-
name
:
remove a service
consul
:
service_id
:
'
service1'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment