2
2
# -*- mode: sh; -*-
3
3
4
4
# File: test.sh
5
- # Time-stamp: <2018-02-23 00:52:02 >
5
+ # Time-stamp: <2018-02-26 16:04:24 >
6
6
# Copyright (C) 2018 Sergei Antipov
7
7
# Description:
8
8
@@ -14,36 +14,36 @@ set -o errexit
14
14
echo " ansible-playbook -i tests/hosts tests/site.yml -e target=mongo1 -e mongodb_version=${MONGODB_VERSION} -e image_name=${DISTRIBUTION} :${DIST_VERSION} "
15
15
ansible-playbook -i tests/hosts tests/site.yml -e target=mongo1 -e mongodb_version=${MONGODB_VERSION} -e image_name=${DISTRIBUTION} :${DIST_VERSION}
16
16
# Idempotence test
17
- # ansible-playbook -i tests/hosts tests/site.yml -e target=mongo1 -e mongodb_version=${MONGODB_VERSION} -e image_name=${DISTRIBUTION}:${DIST_VERSION} | \
18
- # grep -q 'changed=0.*failed=0' && \
19
- # (echo 'Idempotence test: pass' && exit 0) || (echo 'Idempotence test: fail' && exit 1)
17
+ ansible-playbook -i tests/hosts tests/site.yml -e target=mongo1 -e mongodb_version=${MONGODB_VERSION} -e image_name=${DISTRIBUTION} :${DIST_VERSION} | \
18
+ grep -q ' changed=0.*failed=0' && \
19
+ (echo ' Idempotence test: pass' && exit 0) || (echo ' Idempotence test: fail' && exit 1)
20
20
# Delete all containers
21
21
docker kill mongo{1,2,3} && docker rm mongo{1,2,3}
22
22
23
23
# Test 2
24
24
echo " 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'"
25
25
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'
26
26
# Idempotence test
27
- # 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' \
28
- # | grep -q 'changed=0.*failed=0' \
29
- # && (echo 'Idempotence test: pass' && exit 0) || (echo 'Idempotence test: fail' && exit 1)
27
+ 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' \
28
+ | grep -q ' changed=0.*failed=0' \
29
+ && (echo ' Idempotence test: pass' && exit 0) || (echo ' Idempotence test: fail' && exit 1)
30
30
# Delete all containers
31
31
docker kill mongo{1,2,3} && docker rm mongo{1,2,3}
32
32
33
33
# Test 3
34
34
echo " 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'"
35
35
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'
36
36
# Idempotence test
37
- # 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' \
38
- # | grep -q 'changed=0.*failed=0' \
39
- # && (echo 'Idempotence test: pass' && exit 0) || (echo 'Idempotence test: fail' && exit 1)
37
+ 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' \
38
+ | grep -q ' changed=0.*failed=0' \
39
+ && (echo ' Idempotence test: pass' && exit 0) || (echo ' Idempotence test: fail' && exit 1)
40
40
# Delete all containers
41
41
docker kill mongo{1,2,3} && docker rm mongo{1,2,3}
42
42
43
43
# Test 4
44
44
echo " 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_security_authorization='enabled'"
45
45
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_security_authorization=' enabled'
46
46
# Idempotence test
47
- # 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_security_authorization='enabled' \
48
- # | grep -q 'changed=0.*failed=0' \
49
- # && (echo 'Idempotence test: pass' && exit 0) || (echo 'Idempotence test: fail' && exit 1)
47
+ 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_security_authorization=' enabled' \
48
+ | grep -q ' changed=0.*failed=0' \
49
+ && (echo ' Idempotence test: pass' && exit 0) || (echo ' Idempotence test: fail' && exit 1)
0 commit comments