Add more tests

This commit is contained in:
Nick Janetakis
2014-07-01 16:29:48 -04:00
parent 8a6e337886
commit aea1b5a4fc
2 changed files with 33 additions and 4 deletions

View File

@@ -27,6 +27,26 @@ script:
|| (echo 'Idempotence test: fail' && exit 1) || (echo 'Idempotence test: fail' && exit 1)
- > - >
ruby -v ruby -v
| grep -q 'ruby' | grep -q '2.1.2'
&& (echo 'Yes ruby test: pass' && exit 0) && (echo 'Default ruby test: pass' && exit 0)
|| (echo 'Yes ruby test: fail' && exit 1) || (echo 'Default ruby test: fail' && exit 1)
- >
ls ~/.rvm/rubies
| grep -q 'ruby-2.1.0'
&& (echo 'Multiple rubies test: pass' && exit 0)
|| (echo 'Multiple rubies test: fail' && exit 1)
- >
ls ~/.rvm
| grep -q 'travis foo'
&& (echo 'Ownership test: pass' && exit 0)
|| (echo 'Ownership test: fail' && exit 1)
- >
ansible-playbook $SITE_AND_INVENTORY --connection=local --extra-vars='rvm1_delete_ruby=2.1.0'
| grep -q 'changed=1.*failed=0'
&& (echo 'Delete ruby test: pass' && exit 0)
|| (echo 'Delete ruby test: fail' && exit 1)
- >
ls ~/.rvm/rubies
| grep -q 'ruby-2.1.0'
&& (echo 'Really deleted ruby test: pass' && exit 1)
|| (echo 'Really deleted ruby test: fail' && exit 0)

View File

@@ -1,7 +1,16 @@
--- ---
- hosts: localhost - hosts: localhost
remote_user: travis remote_user: travis
sudo: true sudo: false
vars:
rvm1_rubies:
- 'ruby-2.1.0'
- 'ruby-2.1.2'
rvm1_user: 'travis'
rvm1_group: 'foo'
rvm1_temp_download_path: '/tmp'
rvm1_install_path: '~/.rvm'
roles: roles:
- ansible-ruby - ansible-ruby