Adding idempotency testing to the role func test
While not particularly important for this role, this should establish a reusable pattern for adding such testing to other roles. Change-Id: Ia700cfd11c8f15e81f5f767dd723e5a323159919
This commit is contained in:
parent
67f3cac059
commit
566c3ad207
9
tox.ini
9
tox.ini
|
@ -162,7 +162,14 @@ commands =
|
|||
-e "rolename={toxinidir}" \
|
||||
-e "install_test_packages=True" \
|
||||
{toxinidir}/tests/test.yml -vvvv
|
||||
|
||||
# Idempotency test
|
||||
bash -c 'ansible-playbook -i {toxinidir}/tests/inventory \
|
||||
-e "rolename={toxinidir}" \
|
||||
-e "install_test_packages=True" \
|
||||
{toxinidir}/tests/test.yml \
|
||||
| grep -q "changed=0.*failed=0" \
|
||||
&& (echo "Idempotence test: pass" && exit 0) \
|
||||
|| (echo "Idempotence test: fail" && exit 1)'
|
||||
|
||||
[testenv:linters]
|
||||
deps =
|
||||
|
|
Loading…
Reference in New Issue