diff --git a/.travis.yml b/.travis.yml index ed8a726..7f9f33a 100644 --- a/.travis.yml +++ b/.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) \ No newline at end of file + | 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) \ No newline at end of file diff --git a/tests/test.yml b/tests/test.yml index 9b74d6b..97b850b 100644 --- a/tests/test.yml +++ b/tests/test.yml @@ -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 \ No newline at end of file