Skip to content

Commit

Permalink
fix unit tests
Browse files Browse the repository at this point in the history
(cherry picked from commit 2ab4bd6)
  • Loading branch information
yocalebo authored and bugclerk committed Oct 28, 2024
1 parent 21aabd3 commit 4f58101
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ixdiagnose/plugins/zfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ def resource_output(client: MiddlewareClient, resource_type: str) -> str:
if cp.returncode:
return f'Failed to retrieve {resource_type!r} resources: {cp.stderr}'

base = 'zpool get all' if resource_type == 'zpool' else 'zfs get all'
prop_list = {'acltype', 'mounted', 'mountpoint'}
resource_context = resource_name = None
output = ''
Expand All @@ -50,7 +51,7 @@ def resource_output(client: MiddlewareClient, resource_type: str) -> str:
output += zfs_getacl(resource_context, prop_dict)

prop_dict = {}
header_str = f'{resource_type} get all {resource_name}'
header_str = f'{base} {resource_name}'
next_line = '\n\n' if index != 0 else ''
output += f'{next_line}{"=" * (len(header_str) + 5)}\n {header_str}\n{"=" * (len(header_str) + 5)}\n\n'
output += f'{props_header}\n'
Expand Down

0 comments on commit 4f58101

Please sign in to comment.