Add more tests
This commit is contained in:
26
.travis.yml
26
.travis.yml
@@ -27,6 +27,26 @@ script:
|
||||
|| (echo 'Idempotence test: fail' && exit 1)
|
||||
- >
|
||||
ruby -v
|
||||
| grep -q 'ruby'
|
||||
&& (echo 'Yes ruby test: pass' && exit 0)
|
||||
|| (echo 'Yes ruby test: fail' && exit 1)
|
||||
| grep -q '2.1.2'
|
||||
&& (echo 'Default ruby test: pass' && exit 0)
|
||||
|| (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)
|
||||
@@ -1,7 +1,16 @@
|
||||
---
|
||||
- hosts: localhost
|
||||
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:
|
||||
- ansible-ruby
|
||||
Reference in New Issue
Block a user