Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion client/python/cli/command/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def options_get(key, f=lambda x: x):
set_properties = Parser.parse_properties(options_get(Arguments.SET_PROPERTY))
remove_properties = options_get(Arguments.REMOVE_PROPERTY)
catalog_client_scopes = options_get(Arguments.CATALOG_CLIENT_SCOPE)
parameters = Parser.parse_properties(options_get(Arguments.PARAMETERS)),
parameters = Parser.parse_properties(options_get(Arguments.PARAMETERS))
Copy link
Contributor

@HonahX HonahX Oct 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am surprised that this is not caught by existing test and regtest. Thanks for adding the test and fix it!

Copy link
Contributor Author

@flyrain flyrain Oct 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

parameters may never be used.


command = None
if options.command == Commands.CATALOGS:
Expand Down
13 changes: 12 additions & 1 deletion client/python/test/test_cli_parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,17 @@ def get(obj, arg_string):
(1, 'client_secret'): 'e469c048cf866dfae469c048cf866df1',
})

def test_policies_attach_parameters_parsed_to_dict(self):
options = Parser.parse([
'policies', 'attach', 'policy-name',
'--catalog', 'cat',
'--attachment-type', 'catalog',
'--parameters', 'key=value',
])
command = Command.from_options(options)
self.assertIsInstance(command.parameters, dict)
self.assertEqual({'key': 'value'}, command.parameters)


if __name__ == '__main__':
unittest.main()
unittest.main()