Skip to content

Commit

Permalink
Test to make sure ruby does not exist then exists afterwards
Browse files Browse the repository at this point in the history
  • Loading branch information
nickjj committed Jun 23, 2014
1 parent 0a01b2a commit de871f3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 27 deletions.
25 changes: 8 additions & 17 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ language: "python"
python: "2.7"

env:
- SITE_SYSTEM_AND_INVENTORY="tests/test_system.yml -i tests/inventory"
- SITE_HOME_AND_INVENTORY="tests/test_home.yml -i tests/inventory"
- SITE_AND_INVENTORY="tests/test.yml -i tests/inventory"

before_install:
- "__rvm_unload ; rm -rf ~/.rvm"
Expand All @@ -14,28 +13,20 @@ install:
- "printf '[defaults]\nroles_path = ../' > ansible.cfg"

script:
- "ansible-playbook $SITE_SYSTEM_AND_INVENTORY --syntax-check"
- "ansible-playbook $SITE_SYSTEM_AND_INVENTORY --connection=local -vvvv"
- >
ansible-playbook $SITE_SYSTEM_AND_INVENTORY --connection=local
| grep -q 'changed=2.*failed=0'
&& (echo 'Idempotence test: pass' && exit 0)
|| (echo 'Idempotence test: fail' && exit 1)
- >
ruby -v
| grep -q 'ruby'
&& (echo 'Version test: pass' && exit 0)
|| (echo 'Version test: fail' && exit 1)
- "__rvm_unload ; sudo rm -rf /usr/local/rvm ; sudo rm /etc/profile.d/rvm.sh"
- "ansible-playbook $SITE_HOME_AND_INVENTORY --syntax-check"
- "ansible-playbook $SITE_HOME_AND_INVENTORY --connection=local -vvvv"
&& (echo 'No ruby test: pass' && exit 1)
|| (echo 'No ruby test: fail' && exit 0)
- "ansible-playbook $SITE_AND_INVENTORY --syntax-check"
- "ansible-playbook $SITE_AND_INVENTORY --connection=local -vvvv"
- >
ansible-playbook $SITE_HOME_AND_INVENTORY --connection=local
ansible-playbook $SITE_AND_INVENTORY --connection=local
| grep -q 'changed=2.*failed=0'
&& (echo 'Idempotence test: pass' && exit 0)
|| (echo 'Idempotence test: fail' && exit 1)
- >
ruby -v
| grep -q 'ruby'
&& (echo 'Version test: pass' && exit 0)
|| (echo 'Version test: fail' && exit 1)
&& (echo 'Yes ruby test: pass' && exit 0)
|| (echo 'Yes ruby test: fail' && exit 1)
File renamed without changes.
10 changes: 0 additions & 10 deletions tests/test_home.yml

This file was deleted.

0 comments on commit de871f3

Please sign in to comment.