22# -*- mode: sh; -*-
33
44# File: test.sh
5- # Time-stamp: <2018-02-23 00:52:02 >
5+ # Time-stamp: <2018-02-26 16:04:24 >
66# Copyright (C) 2018 Sergei Antipov
77# Description:
88
@@ -14,36 +14,36 @@ set -o errexit
1414echo " ansible-playbook -i tests/hosts tests/site.yml -e target=mongo1 -e mongodb_version=${MONGODB_VERSION} -e image_name=${DISTRIBUTION} :${DIST_VERSION} "
1515ansible-playbook -i tests/hosts tests/site.yml -e target=mongo1 -e mongodb_version=${MONGODB_VERSION} -e image_name=${DISTRIBUTION} :${DIST_VERSION}
1616# 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)
2020# Delete all containers
2121docker kill mongo{1,2,3} && docker rm mongo{1,2,3}
2222
2323# Test 2
2424echo " 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'"
2525ansible-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'
2626# 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)
3030# Delete all containers
3131docker kill mongo{1,2,3} && docker rm mongo{1,2,3}
3232
3333# Test 3
3434echo " 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'"
3535ansible-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'
3636# 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)
4040# Delete all containers
4141docker kill mongo{1,2,3} && docker rm mongo{1,2,3}
4242
4343# Test 4
4444echo " 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'"
4545ansible-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'
4646# 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