mirror of
https://github.com/geerlingguy/ansible-role-apache
synced 2024-12-22 11:00:18 +01:00
Better Travis idempotence test.
This commit is contained in:
parent
3bb85dbec4
commit
ccfb1fbcb7
1 changed files with 3 additions and 1 deletions
|
@ -51,8 +51,10 @@ script:
|
|||
- 'sudo docker exec --tty "$(cat ${container_id})" env TERM=xterm ansible-playbook /etc/ansible/roles/role_under_test/tests/test.yml'
|
||||
|
||||
# Test role idempotence.
|
||||
- idempotence=$(mktemp)
|
||||
- sudo docker exec "$(cat ${container_id})" ansible-playbook /etc/ansible/roles/role_under_test/tests/test.yml | tee -a ${idempotence}
|
||||
- >
|
||||
sudo docker exec "$(cat ${container_id})" ansible-playbook /etc/ansible/roles/role_under_test/tests/test.yml
|
||||
tail ${idempotence}
|
||||
| grep -q 'changed=0.*failed=0'
|
||||
&& (echo 'Idempotence test: pass' && exit 0)
|
||||
|| (echo 'Idempotence test: fail' && exit 1)
|
||||
|
|
Loading…
Reference in a new issue