Ensure tests run with expected docker image

This has been working so far since the tests have only cared about
Ubuntu as a target. Now that RedHat is an option, the default needs to
be overriden.
This commit is contained in:
Daniel White 2016-05-08 04:03:07 +10:00
parent 0ea31ad349
commit 52b1f395ea
1 changed files with 8 additions and 8 deletions

View File

@ -50,10 +50,10 @@ before_install:
script: script:
# Test 1 # Test 1
- sudo ansible-playbook -i tests/hosts tests/site.yml -e target=mongo1 -e mongodb_version=${MONGODB_VERSION} - sudo ansible-playbook -i tests/hosts tests/site.yml -e target=mongo1 -e mongodb_version=${MONGODB_VERSION} -e image_name=${DISTRIBUTION}:${DIST_VERSION}
# Idempotence test # Idempotence test
- > - >
sudo ansible-playbook -i tests/hosts tests/site.yml -e target=mongo1 -e mongodb_version=${MONGODB_VERSION} sudo ansible-playbook -i tests/hosts tests/site.yml -e target=mongo1 -e mongodb_version=${MONGODB_VERSION} -e image_name=${DISTRIBUTION}:${DIST_VERSION}
| grep -q 'changed=0.*failed=0' | grep -q 'changed=0.*failed=0'
&& (echo 'Idempotence test: pass' && exit 0) && (echo 'Idempotence test: pass' && exit 0)
|| (echo 'Idempotence test: fail' && exit 1) || (echo 'Idempotence test: fail' && exit 1)
@ -63,11 +63,11 @@ script:
# Test 2 # Test 2
- > - >
sudo ansible-playbook -i tests/hosts tests/site.yml -e target=mongo1 sudo ansible-playbook -i tests/hosts tests/site.yml -e target=mongo1 -e image_name=${DISTRIBUTION}:${DIST_VERSION}
-e mongodb_version=${MONGODB_VERSION} -e mongodb_security_authorization='enabled' -e mongodb_version=${MONGODB_VERSION} -e mongodb_security_authorization='enabled'
# Idempotence test # Idempotence test
- > - >
sudo ansible-playbook -i tests/hosts tests/site.yml -e target=mongo1 sudo ansible-playbook -i tests/hosts tests/site.yml -e target=mongo1 -e image_name=${DISTRIBUTION}:${DIST_VERSION}
-e mongodb_version=${MONGODB_VERSION} -e mongodb_security_authorization='enabled' -e mongodb_version=${MONGODB_VERSION} -e mongodb_security_authorization='enabled'
| grep -q 'changed=0.*failed=0' | grep -q 'changed=0.*failed=0'
&& (echo 'Idempotence test: pass' && exit 0) && (echo 'Idempotence test: pass' && exit 0)
@ -78,11 +78,11 @@ script:
# Test 3 # Test 3
- > - >
sudo ansible-playbook -i tests/hosts tests/site.yml -e target=mongo sudo ansible-playbook -i tests/hosts tests/site.yml -e target=mongo -e image_name=${DISTRIBUTION}:${DIST_VERSION}
-e mongodb_version=${MONGODB_VERSION} -e mongodb_replication_replset='testrs' -e mongodb_version=${MONGODB_VERSION} -e mongodb_replication_replset='testrs'
# Idempotence test # Idempotence test
- > - >
sudo ansible-playbook -i tests/hosts tests/site.yml -e target=mongo sudo ansible-playbook -i tests/hosts tests/site.yml -e target=mongo -e image_name=${DISTRIBUTION}:${DIST_VERSION}
-e mongodb_version=${MONGODB_VERSION} -e mongodb_replication_replset='testrs' -e mongodb_version=${MONGODB_VERSION} -e mongodb_replication_replset='testrs'
| grep -q 'changed=0.*failed=0' | grep -q 'changed=0.*failed=0'
&& (echo 'Idempotence test: pass' && exit 0) && (echo 'Idempotence test: pass' && exit 0)
@ -93,12 +93,12 @@ script:
# Test 4 # Test 4
- > - >
sudo ansible-playbook -i tests/hosts tests/site.yml -e target=mongo sudo ansible-playbook -i tests/hosts tests/site.yml -e target=mongo -e image_name=${DISTRIBUTION}:${DIST_VERSION}
-e mongodb_version=${MONGODB_VERSION} -e mongodb_replication_replset='testrs' -e mongodb_version=${MONGODB_VERSION} -e mongodb_replication_replset='testrs'
-e mongodb_security_authorization='enabled' -e mongodb_security_authorization='enabled'
# Idempotence test # Idempotence test
- > - >
sudo ansible-playbook -i tests/hosts tests/site.yml -e target=mongo sudo ansible-playbook -i tests/hosts tests/site.yml -e target=mongo -e image_name=${DISTRIBUTION}:${DIST_VERSION}
-e mongodb_version=${MONGODB_VERSION} -e mongodb_replication_replset='testrs' -e mongodb_version=${MONGODB_VERSION} -e mongodb_replication_replset='testrs'
-e mongodb_security_authorization='enabled' -e mongodb_security_authorization='enabled'
| grep -q 'changed=0.*failed=0' | grep -q 'changed=0.*failed=0'