Commit 9e2fffc2 by e0d

adding basic testing/validation of the role

parent 0a021ca8
...@@ -41,3 +41,4 @@ ...@@ -41,3 +41,4 @@
only_if: "'${ansible_distribution}' == 'Ubuntu'" only_if: "'${ansible_distribution}' == 'Ubuntu'"
- include: deploy.yml - include: deploy.yml
- include: test.yml
\ No newline at end of file
---
- name: forum | test that the required service are listening
shell: 'test -n "$(netstat -plnt | grep :{{ item.port }})"'
with_items: "{{ forum_services }}"
tags:
- forum
- test
\ No newline at end of file
...@@ -4,5 +4,20 @@ forum_user: "forum" ...@@ -4,5 +4,20 @@ forum_user: "forum"
forum_home: "/opt/forum" forum_home: "/opt/forum"
forum_ruby_version: "1.9.3-p448" forum_ruby_version: "1.9.3-p448"
forum_code_dir: "{{ forum_home }}/cs_comments_service" forum_code_dir: "{{ forum_home }}/cs_comments_service"
forum_source_repo: https://github.com/edx/cs_comments_service.git forum_source_repo: "https://github.com/edx/cs_comments_service.git"
forum_version: 'HEAD' forum_version: "HEAD"
\ No newline at end of file
#
# test config
#
#
# The following services should be listening on the associated
# ports when the role has been successfully created.
#
forum_services:
- {service: "sinatra", port: "4567"}
- {service: "mongo", port: "27017"}
- {service: "mongo", port: "28017"}
- {service: "elasticsearch", port: "9200"}
- {service: "elasticsearch", port: "9300"}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment