]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
tests: add missing test for rbd 2149/head
authorGuillaume Abrioux <gabrioux@redhat.com>
Mon, 30 Oct 2017 18:44:56 +0000 (19:44 +0100)
committerGuillaume Abrioux <gabrioux@redhat.com>
Wed, 8 Nov 2017 17:15:28 +0000 (18:15 +0100)
Add a missing test `test_rbd_mirror_service_is_running_from_luminous()`.
Also using bash -c "<cmd>" to make testinfra aware that later in
the upgrade process we are now running `luminous` ceph release so we
must skip the rbd tests related to `jewel` ceph release.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit c28882c1cdfa0420f3dd51542b577f2ab917e5d3)

tests/functional/tests/rbd-mirror/test_rbd_mirror.py
tox.ini

index 69a9924eed8b857b02b8b3d465f8cf9023f70f89..e195f41e8a2a3aa8eeca5b83472c9fd10726b29c 100644 (file)
@@ -30,6 +30,13 @@ class TestRbdMirrors(object):
         )
         assert host.service(service_name).is_running
 
+    @pytest.mark.from_luminous
+    def test_rbd_mirror_service_is_running_from_luminous(self, node, host):
+        service_name = "ceph-rbd-mirror@rbd-mirror.{hostname}".format(
+            hostname=node["vars"]["inventory_hostname"]
+        )
+        assert host.service(service_name).is_running
+
     @pytest.mark.no_docker
     @pytest.mark.before_luminous
     def test_rbd_mirror_service_is_enabled_before_luminous(self, node, host):
diff --git a/tox.ini b/tox.ini
index 3a1580f0b9fcb35206d2092f83178f918d927585..c3880892307b7ba3f47dd7aa1bcbe19d66e19889 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -79,7 +79,7 @@ commands=
       ceph_dev_sha1={env:UPDATE_CEPH_DEV_SHA1:latest} \
   "
 
-  testinfra -n 4 --sudo -v --connection=ansible --ansible-inventory={changedir}/hosts {toxinidir}/tests/functional/tests
+  bash -c "CEPH_STABLE_RELEASE={env:UPDATE_CEPH_STABLE_RELEASE:luminous} testinfra -n 4 --sudo -v --connection=ansible --ansible-inventory={changedir}/hosts {toxinidir}/tests/functional/tests"
 
 [shrink-mon]
 commands=