tests: implement reboot after a deployment

We don't test server reboot, a lot of things can happen after that.
So now, we deploy, reboot then we run testinfra.

Signed-off-by: Sébastien Han <seb@redhat.com>
pull/1939/head
Sébastien Han 2017-09-21 23:47:36 +02:00
parent deb5d3ba1f
commit e113d94c9a
1 changed files with 12 additions and 0 deletions

12
tox.ini
View File

@ -117,6 +117,7 @@ whitelist_externals =
bash
pip
cp
sleep
passenv=*
sitepackages=True
setenv=
@ -214,6 +215,17 @@ commands=
ansible-playbook -vv -i {changedir}/hosts {toxinidir}/tests/functional/setup.yml
# wait 5 minutes for services to be ready
sleep 300
# test cluster state using ceph-ansible tests
testinfra -n 4 --sudo -v --connection=ansible --ansible-inventory={changedir}/hosts {toxinidir}/tests/functional/tests
# reboot all vms
vagrant reload --no-provision
# wait 5 minutes for services to be ready
sleep 300
# retest to ensure cluster came back up correctly after rebooting
testinfra -n 4 --sudo -v --connection=ansible --ansible-inventory={changedir}/hosts {toxinidir}/tests/functional/tests
purge_cluster: {[purge]commands}