From: Varsha Rao Date: Thu, 5 Aug 2021 11:41:00 +0000 (+0530) Subject: src/pybind/mgr/nfs/tests: pass cluster_id to from_export_block() X-Git-Tag: v16.2.7~116^2~7 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=da3af7943d5494e0a99137b3a8cfd4689a605edc;p=ceph.git src/pybind/mgr/nfs/tests: pass cluster_id to from_export_block() As from_export_block() requires cluster id. Signed-off-by: Varsha Rao (cherry picked from commit 13c0525619ab928d664e6896489029aa7548e159) --- diff --git a/src/pybind/mgr/nfs/tests/test_nfs.py b/src/pybind/mgr/nfs/tests/test_nfs.py index b353509e5c53..04394fedf7bb 100644 --- a/src/pybind/mgr/nfs/tests/test_nfs.py +++ b/src/pybind/mgr/nfs/tests/test_nfs.py @@ -302,7 +302,7 @@ NFS_CORE_PARAM { # assert export.clients[1].squash == "all_squash" # probably correct value assert export.clients[1].squash == "All" assert export.clients[1].access_type == "RO" - assert export.cluster_id in ('_default_', 'foo') + assert export.cluster_id == 'foo' assert export.attr_expiration_time == 0 # assert export.security_label == False # probably correct value assert export.security_label == True @@ -311,7 +311,7 @@ NFS_CORE_PARAM { blocks = GaneshaConfParser(self.export_1).parse() assert isinstance(blocks, list) assert len(blocks) == 1 - export = Export.from_export_block(blocks[0], '_default_') + export = Export.from_export_block(blocks[0], self.cluster_id) self._validate_export_1(export) def _validate_export_2(self, export: Export): @@ -328,13 +328,13 @@ NFS_CORE_PARAM { # assert export.fsal.access_key == "access_key" # probably correct value # assert export.fsal.secret_key == "secret_key" # probably correct value assert len(export.clients) == 0 - assert export.cluster_id in ('_default_', 'foo') + assert export.cluster_id == 'foo' def test_export_parser_2(self) -> None: blocks = GaneshaConfParser(self.export_2).parse() assert isinstance(blocks, list) assert len(blocks) == 1 - export = Export.from_export_block(blocks[0], '_default_') + export = Export.from_export_block(blocks[0], self.cluster_id) self._validate_export_2(export) def test_daemon_conf_parser(self) -> None: