Skip to content

Commit

Permalink
src/pybind/mgr/nfs/tests: pass cluster_id to from_export_block()
Browse files Browse the repository at this point in the history
As from_export_block() requires cluster id.

Signed-off-by: Varsha Rao <[email protected]>
  • Loading branch information
varshar16 committed Aug 5, 2021
1 parent ab80ab4 commit 13c0525
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/pybind/mgr/nfs/tests/test_nfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ def _validate_export_1(self, export: Export):
# 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
Expand All @@ -311,7 +311,7 @@ def test_export_parser_1(self) -> None:
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):
Expand All @@ -328,13 +328,13 @@ def _validate_export_2(self, export: Export):
# 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:
Expand Down

0 comments on commit 13c0525

Please sign in to comment.