]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
tests: implement reboot after a deployment
authorSébastien Han <seb@redhat.com>
Thu, 21 Sep 2017 21:47:36 +0000 (23:47 +0200)
committerSébastien Han <seb@redhat.com>
Fri, 29 Sep 2017 00:38:24 +0000 (02:38 +0200)
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>
tox.ini

diff --git a/tox.ini b/tox.ini
index 2143b2a8c98a627adb57e7b77012945b2667b43b..8f8416776385b3a5559fd880ad9a18af6bacf854 100644 (file)
--- 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}