From e113d94c9a72fac486ae3be88a8644390e58c319 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=A9bastien=20Han?= Date: Thu, 21 Sep 2017 23:47:36 +0200 Subject: [PATCH] tests: implement reboot after a deployment MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- tox.ini | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tox.ini b/tox.ini index 2143b2a8c..8f8416776 100644 --- a/tox.ini +++ b/tox.ini @@ -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} -- 2.39.5