mirror of https://github.com/ceph/ceph-ansible.git
tests: add tests for rgw-nfs
rgw-nfs is part of servicemap so we should use it to make sure the process is up and running. Signed-off-by: Sébastien Han <seb@redhat.com>pull/1939/head
parent
fc29ccd0ad
commit
b4bec52442
|
@ -1,3 +1,4 @@
|
|||
import json
|
||||
import pytest
|
||||
|
||||
class TestNFSs(object):
|
||||
|
@ -22,6 +23,30 @@ class TestNFSs(object):
|
|||
def test_nfs_config_override(self, node, host):
|
||||
assert host.file("/etc/ganesha/ganesha.conf").contains("Entries_HWMark")
|
||||
|
||||
@pytest.mark.no_docker
|
||||
def test_nfs_is_up(self, node, host):
|
||||
hostname = node["vars"]["inventory_hostname"]
|
||||
cluster = node['cluster_name']
|
||||
cmd = "sudo ceph --name client.rgw.{hostname} --keyring /var/lib/ceph/radosgw/{cluster}-rgw.{hostname}/keyring --cluster={cluster} --connect-timeout 5 -f json -s".format(
|
||||
hostname=hostname,
|
||||
cluster=cluster
|
||||
)
|
||||
output = host.check_output(cmd)
|
||||
daemons = [i for i in json.loads(output)["servicemap"]["services"]["rgw-nfs"]["daemons"]]
|
||||
assert hostname in daemons
|
||||
|
||||
@pytest.mark.docker
|
||||
def test_docker_nfs_is_up(self, node, host):
|
||||
hostname = node["vars"]["inventory_hostname"]
|
||||
cluster = node['cluster_name']
|
||||
cmd = "sudo docker exec ceph-nfs-{hostname} ceph --name client.rgw.{hostname} --keyring /var/lib/ceph/radosgw/{cluster}-rgw.{hostname}/keyring --cluster={cluster} --connect-timeout 5 -f json -s".format(
|
||||
hostname=hostname,
|
||||
cluster=cluster
|
||||
)
|
||||
output = host.check_output(cmd)
|
||||
daemons = [i for i in json.loads(output)["servicemap"]["services"]["rgw-nfs"]["daemons"]]
|
||||
assert hostname in daemons
|
||||
|
||||
#NOTE (guits): This check must be fixed. (Permission denied error)
|
||||
# @pytest.mark.no_docker
|
||||
# def test_nfs_rgw_fsal_export(self, node, host):
|
||||
|
|
Loading…
Reference in New Issue