]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
tests: skip rbdmirror tests on non-secondary daemon
authorGuillaume Abrioux <gabrioux@redhat.com>
Mon, 1 Aug 2022 21:12:13 +0000 (23:12 +0200)
committerGuillaume Abrioux <gabrioux@redhat.com>
Mon, 1 Aug 2022 21:12:13 +0000 (23:12 +0200)
the daemon is not running on the 'primary' daemon.
Therefore, these tests are not needed.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
tests/conftest.py

index 415f1031dfb0743283588d2cc2c7a68bb6932c2b..f3f8dd083e0215e4b0213dda2ae2dc23f7a7c2c6 100644 (file)
@@ -104,6 +104,7 @@ def node(host, request):
     docker = ansible_vars.get("docker")
     dashboard = ansible_vars.get("dashboard_enabled", True)
     radosgw_num_instances = ansible_vars.get("radosgw_num_instances", 1)
+    ceph_rbd_mirror_remote_user = ansible_vars.get('ceph_rbd_mirror_remote_user', '')
     ceph_release_num = {
         'jewel': 10,
         'kraken': 11,
@@ -129,6 +130,9 @@ def node(host, request):
             request.function, group_names)
         pytest.skip(reason)
 
+    if request.node.get_closest_marker('rbdmirror_secondary') and group_names == ['rbdmirrors'] and not ceph_rbd_mirror_remote_user:  # noqa E501
+        pytest.skip('Not a valid test for a non-secondary rbd-mirror node')
+
     if request.node.get_closest_marker('ceph_crash') and group_names in [['nfss'], ['iscsigws'], ['clients'], ['monitoring']]:
         pytest.skip('Not a valid test for nfs, client or iscsigw nodes')