smjn commented on code in PR #19774: URL: https://github.com/apache/kafka/pull/19774#discussion_r2099527401
########## tests/kafkatest/services/kafka/kafka.py: ########## @@ -1749,6 +1749,27 @@ def list_consumer_groups(self, node=None, command_config=None, state=None, type= if type is not None: cmd += " --type %s" % type return self.run_cli_tool(node, cmd) + + def list_share_groups(self, node=None, command_config=None, state=None): + """ Get list of share groups. + """ + if node is None: + node = self.nodes[0] + share_group_script = self.path.script("kafka-share-groups.sh", node) + + if command_config is None: + command_config = "" + else: + command_config = "--command-config " + command_config + + cmd = fix_opts_for_new_jvm(node) + cmd += "%s --bootstrap-server %s %s --list" % \ + (share_group_script, + self.bootstrap_servers(self.security_protocol), + command_config) + if state is not None: + cmd += " --state %s" % state + return self.run_cli_tool(node, cmd) Review Comment: should we also look at the output and do some assertions? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org