Skip to content

Commit

Permalink
Fix test scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
Aloysius Lim committed May 21, 2015
1 parent 020de4c commit 3cdd81e
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
env:
- PLATFORM=centos-6
- PLATFORM=centos-7
- PLATFORM=debian-jessie
- PLATFORM=debian-wheezy
- PLATFORM=debian-jessie
- PLATFORM=ubuntu-precise
- PLATFORM=ubuntu-precise
- PLATFORM=ubuntu-trusty

sudo: true

Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ Ansible role to install Elasticsearch on Debian (Ubuntu) and Enterprise Linux (R

## Status

Operating System | Release | Status |
---------------- | ------- | ------ |
centos | 6 | ![Vagrant passed](https://img.shields.io/badge/Vagrant-passed-brightgreen.svg?style=flat-square) | |
centos | 7 | ![Vagrant passed](https://img.shields.io/badge/Vagrant-passed-brightgreen.svg?style=flat-square) |
debian | wheezy | ![Vagrant passed](https://img.shields.io/badge/Vagrant-passed-brightgreen.svg?style=flat-square) |
debian | jessie | |
ubuntu | precise | ![Vagrant passed](https://img.shields.io/badge/Vagrant-passed-brightgreen.svg?style=flat-square) |
ubuntu | trusty | ![Vagrant passed](https://img.shields.io/badge/Vagrant-passed-brightgreen.svg?style=flat-square) |
Operating System | Release | Status |
---------------- | ------- | ------ |
centos | 6 | ![Vagrant passed](https://img.shields.io/badge/vagrant-passed-brightgreen.svg?style=flat-square) ![Docker passed](https://img.shields.io/badge/docker-passed-brightgreen.svg?style=flat-square) |
centos | 7 | ![Vagrant passed](https://img.shields.io/badge/vagrant-passed-brightgreen.svg?style=flat-square) ![Docker failed](https://img.shields.io/badge/docker-failed-brightred.svg?style=flat-square) |
debian | wheezy | ![Vagrant passed](https://img.shields.io/badge/vagrant-passed-brightgreen.svg?style=flat-square) ![Docker failed](https://img.shields.io/badge/docker-fauked-brightred.svg?style=flat-square) |
debian | jessie | ![Vagrant failed](https://img.shields.io/badge/vagrant-failed-brightred.svg?style=flat-square) ![Docker passed](https://img.shields.io/badge/docker-passed-brightgreen.svg?style=flat-square) |
ubuntu | precise | ![Vagrant passed](https://img.shields.io/badge/vagrant-passed-brightgreen.svg?style=flat-square) ![Docker passed](https://img.shields.io/badge/docker-passed-brightgreen.svg?style=flat-square) |
ubuntu | trusty | ![Vagrant passed](https://img.shields.io/badge/vagrant-passed-brightgreen.svg?style=flat-square) ![Docker passed](https://img.shields.io/badge/docker-passed-brightgreen.svg?style=flat-square) |

## Requirements
Java 7 or higher, as specified in the [Elasticsearch manual](https://www.elastic.co/guide/en/elasticsearch/reference/current/setup.html#jvm-version). This role does not install Java; you may use your preferred role to install a suitable Java JRE on all Elasticsearch hosts.
Expand Down
1 change: 1 addition & 0 deletions tests/centos-6.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ FROM williamyeh/ansible:centos6-onbuild

MAINTAINER Aloysius Lim

RUN yum install -y which
EXPOSE 9200
CMD ["tests/test.sh"]
2 changes: 2 additions & 0 deletions tests/inventory
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[local]
localhost
6 changes: 3 additions & 3 deletions tests/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ DIR=$( dirname $0 )
set -ev

# Check syntax
ansible-playbook --connection=local --syntax-check -vv $DIR/test.yml
ansible-playbook -i $DIR/inventory -c local --syntax-check -vv $DIR/test.yml
# Check role
ansible-playbook --connection=local --become -vv $DIR/test.yml
ansible-playbook -i $DIR/inventory -c local --become -vv $DIR/test.yml
# Check indempotence
ansible-playbook --connection=local --become -vv $DIR/test.yml \
ansible-playbook -i $DIR/inventory -c local --become -vv $DIR/test.yml \
| grep -q 'changed=0.*failed=0' \
&& (echo 'Idempotence test: pass' && exit 0) \
|| (echo 'Idempotence test: fail' && exit 1)

0 comments on commit 3cdd81e

Please sign in to comment.