mirror of https://github.com/ceph/ceph-ansible.git
tests: skip rbdmirror tests on non-secondary daemon
the daemon is not running on the 'primary' daemon. Therefore, these tests are not needed. Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com> (cherry picked from commitpull/7285/heada12f67e138
) (cherry picked from commit022199745e
)
parent
3ca2d7d205
commit
dd16e49517
|
@ -104,6 +104,7 @@ def node(host, request):
|
||||||
docker = ansible_vars.get("docker")
|
docker = ansible_vars.get("docker")
|
||||||
dashboard = ansible_vars.get("dashboard_enabled", True)
|
dashboard = ansible_vars.get("dashboard_enabled", True)
|
||||||
radosgw_num_instances = ansible_vars.get("radosgw_num_instances", 1)
|
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 = {
|
ceph_release_num = {
|
||||||
'jewel': 10,
|
'jewel': 10,
|
||||||
'kraken': 11,
|
'kraken': 11,
|
||||||
|
@ -128,6 +129,9 @@ def node(host, request):
|
||||||
request.function, group_names)
|
request.function, group_names)
|
||||||
pytest.skip(reason)
|
pytest.skip(reason)
|
||||||
|
|
||||||
|
if request.node.get_closest_marker('rbdmirror_secondary') 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']]:
|
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')
|
pytest.skip('Not a valid test for nfs, client or iscsigw nodes')
|
||||||
|
|
||||||
|
|
|
@ -4,10 +4,12 @@ import json
|
||||||
|
|
||||||
class TestRbdMirrors(object):
|
class TestRbdMirrors(object):
|
||||||
|
|
||||||
|
@pytest.mark.rbdmirror_secondary
|
||||||
@pytest.mark.no_docker
|
@pytest.mark.no_docker
|
||||||
def test_rbd_mirror_is_installed(self, node, host):
|
def test_rbd_mirror_is_installed(self, node, host):
|
||||||
assert host.package("rbd-mirror").is_installed
|
assert host.package("rbd-mirror").is_installed
|
||||||
|
|
||||||
|
@pytest.mark.rbdmirror_secondary
|
||||||
def test_rbd_mirror_service_enabled_and_running(self, node, host):
|
def test_rbd_mirror_service_enabled_and_running(self, node, host):
|
||||||
service_name = "ceph-rbd-mirror@rbd-mirror.{hostname}".format(
|
service_name = "ceph-rbd-mirror@rbd-mirror.{hostname}".format(
|
||||||
hostname=node["vars"]["inventory_hostname"]
|
hostname=node["vars"]["inventory_hostname"]
|
||||||
|
@ -16,6 +18,7 @@ class TestRbdMirrors(object):
|
||||||
assert s.is_enabled
|
assert s.is_enabled
|
||||||
assert s.is_running
|
assert s.is_running
|
||||||
|
|
||||||
|
@pytest.mark.rbdmirror_secondary
|
||||||
def test_rbd_mirror_is_up(self, node, host, setup):
|
def test_rbd_mirror_is_up(self, node, host, setup):
|
||||||
hostname = node["vars"]["inventory_hostname"]
|
hostname = node["vars"]["inventory_hostname"]
|
||||||
cluster = setup["cluster_name"]
|
cluster = setup["cluster_name"]
|
||||||
|
|
Loading…
Reference in New Issue