Skip to content

Commit b387a16

Browse files
author
Sergei Antipov
committed
Added new Travis CI tests
1 parent 8089efd commit b387a16

File tree

2 files changed

+46
-2
lines changed

2 files changed

+46
-2
lines changed

.travis.yml

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ before_install:
3737
- sudo ln -s ${PWD} /etc/ansible/roles/greendayonfire.mongodb
3838

3939
script:
40+
# Test 1
4041
- sudo ansible-playbook -i tests/hosts tests/site.yml -e target=mongo1 -e mongodb_version=${MONGODB_VERSION}
4142
# Idempotence test
4243
- >
@@ -47,4 +48,48 @@ script:
4748
4849
# Delete all containers
4950
- sudo docker kill mongo{1,2,3} && docker rm mongo{1,2,3}
50-
51+
52+
# Test 2
53+
- >
54+
sudo ansible-playbook -i tests/hosts tests/site.yml -e target=mongo1
55+
-e mongodb_version=${MONGODB_VERSION} -e mongodb_security_authorization='enabled'
56+
# Idempotence test
57+
- >
58+
sudo ansible-playbook -i tests/hosts tests/site.yml -e target=mongo1
59+
-e mongodb_version=${MONGODB_VERSION} -e mongodb_security_authorization='enabled'
60+
| grep -q 'changed=0.*failed=0'
61+
&& (echo 'Idempotence test: pass' && exit 0)
62+
|| (echo 'Idempotence test: fail' && exit 1)
63+
64+
# Delete all containers
65+
- sudo docker kill mongo{1,2,3} && docker rm mongo{1,2,3}
66+
67+
# Test 3
68+
- >
69+
sudo ansible-playbook -i tests/hosts tests/site.yml -e target=mongo
70+
-e mongodb_version=${MONGODB_VERSION} -e mongodb_replication_replset='testrs'
71+
# Idempotence test
72+
- >
73+
sudo ansible-playbook -i tests/hosts tests/site.yml -e target=mongo
74+
-e mongodb_version=${MONGODB_VERSION} -e mongodb_replication_replset='testrs'
75+
| grep -q 'changed=0.*failed=0'
76+
&& (echo 'Idempotence test: pass' && exit 0)
77+
|| (echo 'Idempotence test: fail' && exit 1)
78+
79+
# Delete all containers
80+
- sudo docker kill mongo{1,2,3} && docker rm mongo{1,2,3}
81+
82+
# Test 4
83+
- >
84+
sudo ansible-playbook -i tests/hosts tests/site.yml -e target=mongo
85+
-e mongodb_version=${MONGODB_VERSION} -e mongodb_replication_replset='testrs'
86+
-e mongodb_security_authorization='enabled'
87+
# Idempotence test
88+
- >
89+
sudo ansible-playbook -i tests/hosts tests/site.yml -e target=mongo
90+
-e mongodb_version=${MONGODB_VERSION} -e mongodb_replication_replset='testrs'
91+
-e mongodb_security_authorization='enabled'
92+
| grep -q 'changed=0.*failed=0'
93+
&& (echo 'Idempotence test: pass' && exit 0)
94+
|| (echo 'Idempotence test: fail' && exit 1)
95+

meta/main.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ galaxy_info:
1515
- name: Debian
1616
versions:
1717
- wheezy
18-
- jessie
1918
categories:
2019
- database
2120
- database:nosql

0 commit comments

Comments
 (0)