Skip to content

Commit

Permalink
tests: use nfs/mds instead of nfs/rgw
Browse files Browse the repository at this point in the history
needed for the update job in stable-6.0 branch.
the upgrade from either nautilus or octopus to pacific isnt supported
when nfs/rgw is deployed.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
  • Loading branch information
guits committed Jun 16, 2021
1 parent 1eb42b1 commit 950296d
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 3 deletions.
10 changes: 10 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ def node(host, request):
group_names = ansible_vars["group_names"]
docker = ansible_vars.get("docker")
dashboard = ansible_vars.get("dashboard_enabled", True)
nfs_file_gw = ansible_vars.get("nfs_file_gw")
nfs_obj_gw = ansible_vars.get("nfs_obj_gw")
radosgw_num_instances = ansible_vars.get("radosgw_num_instances", 1)
ceph_release_num = {
'jewel': 10,
Expand Down Expand Up @@ -146,13 +148,21 @@ def node(host, request):
if request.node.get_closest_marker("dashboard") and group_names == ['clients']:
pytest.skip('Not a valid test for client node')

if request.node.get_closest_marker("no_nfs_file_gw") and nfs_file_gw:
pytest.skip('Not a valid test for nfs+cephfs node')

if request.node.get_closest_marker("no_nfs_obj_gw") and nfs_obj_gw:
pytest.skip('Not a valid test for nfs+rgw node')

data = dict(
vars=ansible_vars,
docker=docker,
ceph_stable_release=ceph_stable_release,
ceph_release_num=ceph_release_num,
rolling_update=rolling_update,
radosgw_num_instances=radosgw_num_instances,
nfs_file_gw=nfs_file_gw,
nfs_obj_gw=nfs_obj_gw,
)
return data

Expand Down
4 changes: 4 additions & 0 deletions tests/functional/all_daemons/container/group_vars/nfss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
copy_admin_key: true
nfs_file_gw: true
nfs_obj_gw: false
4 changes: 2 additions & 2 deletions tests/functional/all_daemons/group_vars/nfss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
copy_admin_key: true
nfs_file_gw: false
nfs_obj_gw: true
nfs_file_gw: true
nfs_obj_gw: false
ganesha_conf_overrides: |
CACHEINODE {
Entries_HWMark = 100000;
Expand Down
13 changes: 12 additions & 1 deletion tests/functional/tests/nfs/test_nfs_ganesha.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,21 @@
class TestNFSs(object):

@pytest.mark.no_docker
@pytest.mark.no_nfs_file_gw
@pytest.mark.parametrize('pkg', [
'nfs-ganesha',
'nfs-ganesha-rgw'
])
def test_nfs_ganesha_package_is_installed(self, node, host, pkg):
def test_nfs_ganesha_rgw_package_is_installed(self, node, host, pkg):
assert host.package(pkg).is_installed

@pytest.mark.no_docker
@pytest.mark.no_nfs_obj_gw
@pytest.mark.parametrize('pkg', [
'nfs-ganesha-ceph',
'nfs-ganesha-rados-grace'
])
def test_nfs_ganesha_fs_package_is_installed(self, node, host, pkg):
assert host.package(pkg).is_installed

@pytest.mark.no_docker
Expand All @@ -23,6 +33,7 @@ def test_nfs_config_override(self, node, host):
assert host.file(
"/etc/ganesha/ganesha.conf").contains("Entries_HWMark")

@pytest.mark.no_nfs_file_gw
def test_nfs_is_up(self, node, host, setup):
hostname = node["vars"]["inventory_hostname"]
cluster = setup['cluster_name']
Expand Down

0 comments on commit 950296d

Please sign in to comment.