Skip to content

Commit 52b1f39

Browse files
committed
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.
1 parent 0ea31ad commit 52b1f39

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

.travis.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ before_install:
5050

5151
script:
5252
# Test 1
53-
- sudo ansible-playbook -i tests/hosts tests/site.yml -e target=mongo1 -e mongodb_version=${MONGODB_VERSION}
53+
- sudo ansible-playbook -i tests/hosts tests/site.yml -e target=mongo1 -e mongodb_version=${MONGODB_VERSION} -e image_name=${DISTRIBUTION}:${DIST_VERSION}
5454
# Idempotence test
5555
- >
56-
sudo ansible-playbook -i tests/hosts tests/site.yml -e target=mongo1 -e mongodb_version=${MONGODB_VERSION}
56+
sudo ansible-playbook -i tests/hosts tests/site.yml -e target=mongo1 -e mongodb_version=${MONGODB_VERSION} -e image_name=${DISTRIBUTION}:${DIST_VERSION}
5757
| grep -q 'changed=0.*failed=0'
5858
&& (echo 'Idempotence test: pass' && exit 0)
5959
|| (echo 'Idempotence test: fail' && exit 1)
@@ -63,11 +63,11 @@ script:
6363

6464
# Test 2
6565
- >
66-
sudo ansible-playbook -i tests/hosts tests/site.yml -e target=mongo1
66+
sudo ansible-playbook -i tests/hosts tests/site.yml -e target=mongo1 -e image_name=${DISTRIBUTION}:${DIST_VERSION}
6767
-e mongodb_version=${MONGODB_VERSION} -e mongodb_security_authorization='enabled'
6868
# Idempotence test
6969
- >
70-
sudo ansible-playbook -i tests/hosts tests/site.yml -e target=mongo1
70+
sudo ansible-playbook -i tests/hosts tests/site.yml -e target=mongo1 -e image_name=${DISTRIBUTION}:${DIST_VERSION}
7171
-e mongodb_version=${MONGODB_VERSION} -e mongodb_security_authorization='enabled'
7272
| grep -q 'changed=0.*failed=0'
7373
&& (echo 'Idempotence test: pass' && exit 0)
@@ -78,11 +78,11 @@ script:
7878

7979
# Test 3
8080
- >
81-
sudo ansible-playbook -i tests/hosts tests/site.yml -e target=mongo
81+
sudo ansible-playbook -i tests/hosts tests/site.yml -e target=mongo -e image_name=${DISTRIBUTION}:${DIST_VERSION}
8282
-e mongodb_version=${MONGODB_VERSION} -e mongodb_replication_replset='testrs'
8383
# Idempotence test
8484
- >
85-
sudo ansible-playbook -i tests/hosts tests/site.yml -e target=mongo
85+
sudo ansible-playbook -i tests/hosts tests/site.yml -e target=mongo -e image_name=${DISTRIBUTION}:${DIST_VERSION}
8686
-e mongodb_version=${MONGODB_VERSION} -e mongodb_replication_replset='testrs'
8787
| grep -q 'changed=0.*failed=0'
8888
&& (echo 'Idempotence test: pass' && exit 0)
@@ -93,12 +93,12 @@ script:
9393

9494
# Test 4
9595
- >
96-
sudo ansible-playbook -i tests/hosts tests/site.yml -e target=mongo
96+
sudo ansible-playbook -i tests/hosts tests/site.yml -e target=mongo -e image_name=${DISTRIBUTION}:${DIST_VERSION}
9797
-e mongodb_version=${MONGODB_VERSION} -e mongodb_replication_replset='testrs'
9898
-e mongodb_security_authorization='enabled'
9999
# Idempotence test
100100
- >
101-
sudo ansible-playbook -i tests/hosts tests/site.yml -e target=mongo
101+
sudo ansible-playbook -i tests/hosts tests/site.yml -e target=mongo -e image_name=${DISTRIBUTION}:${DIST_VERSION}
102102
-e mongodb_version=${MONGODB_VERSION} -e mongodb_replication_replset='testrs'
103103
-e mongodb_security_authorization='enabled'
104104
| grep -q 'changed=0.*failed=0'

0 commit comments

Comments
 (0)