diff --git a/.travis.yml b/.travis.yml index 2b35749..3bf2358 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,6 +37,7 @@ before_install: - sudo ln -s ${PWD} /etc/ansible/roles/greendayonfire.mongodb script: + # Test 1 - sudo ansible-playbook -i tests/hosts tests/site.yml -e target=mongo1 -e mongodb_version=${MONGODB_VERSION} # Idempotence test - > @@ -47,4 +48,48 @@ script: # Delete all containers - sudo docker kill mongo{1,2,3} && docker rm mongo{1,2,3} - + + # Test 2 + - > + sudo ansible-playbook -i tests/hosts tests/site.yml -e target=mongo1 + -e mongodb_version=${MONGODB_VERSION} -e mongodb_security_authorization='enabled' + # Idempotence test + - > + sudo ansible-playbook -i tests/hosts tests/site.yml -e target=mongo1 + -e mongodb_version=${MONGODB_VERSION} -e mongodb_security_authorization='enabled' + | grep -q 'changed=0.*failed=0' + && (echo 'Idempotence test: pass' && exit 0) + || (echo 'Idempotence test: fail' && exit 1) + + # Delete all containers + - sudo docker kill mongo{1,2,3} && docker rm mongo{1,2,3} + + # Test 3 + - > + sudo ansible-playbook -i tests/hosts tests/site.yml -e target=mongo + -e mongodb_version=${MONGODB_VERSION} -e mongodb_replication_replset='testrs' + # Idempotence test + - > + sudo ansible-playbook -i tests/hosts tests/site.yml -e target=mongo + -e mongodb_version=${MONGODB_VERSION} -e mongodb_replication_replset='testrs' + | grep -q 'changed=0.*failed=0' + && (echo 'Idempotence test: pass' && exit 0) + || (echo 'Idempotence test: fail' && exit 1) + + # Delete all containers + - sudo docker kill mongo{1,2,3} && docker rm mongo{1,2,3} + + # Test 4 + - > + sudo ansible-playbook -i tests/hosts tests/site.yml -e target=mongo + -e mongodb_version=${MONGODB_VERSION} -e mongodb_replication_replset='testrs' + -e mongodb_security_authorization='enabled' + # Idempotence test + - > + sudo ansible-playbook -i tests/hosts tests/site.yml -e target=mongo + -e mongodb_version=${MONGODB_VERSION} -e mongodb_replication_replset='testrs' + -e mongodb_security_authorization='enabled' + | grep -q 'changed=0.*failed=0' + && (echo 'Idempotence test: pass' && exit 0) + || (echo 'Idempotence test: fail' && exit 1) + diff --git a/meta/main.yml b/meta/main.yml index b2ea55b..95fefc2 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -15,7 +15,6 @@ galaxy_info: - name: Debian versions: - wheezy - - jessie categories: - database - database:nosql