LZD-PratyushBhatt commented on code in PR #5312:
URL: https://github.com/apache/ozone/pull/5312#discussion_r1332378808
##########
hadoop-ozone/dist/src/main/smoketest/omha/om-roles.robot:
##########
@@ -19,12 +19,37 @@ Resource ../commonlib.robot
Test Timeout 5 minutes
Test Setup Run Keyword if '${SECURITY_ENABLED}' == 'true' Kinit
test user testuser testuser.keytab
+*** Keywords ***
+Parse non json output
+ [Arguments] ${output}
+ Should Match Regexp ${output} [om (:
LEADER|)]
+
+Parse json output
+ [Arguments] ${output}
+ ${leader} = Execute echo
'${output}' | jq '.[] | select(.[] | .serverRole == "LEADER")'
+ Should Not Be Equal ${leader}
${EMPTY}
+
*** Test Cases ***
-List om roles
- ${output} = Execute ozone admin om roles
--service-id=omservice
- Should Match Regexp ${output} [om (: LEADER|)]
+List om roles with OM service ID passed
+ ${output_with_id_passed} = Execute ozone admin om
roles --service-id=omservice
+ Parse non json output
${output_with_id_passed}
+ ${output_with_id_passed} = Execute ozone admin
--set=ozone.om.service.ids=omservice,omservice2 om roles --service-id=omservice
+ Parse non json output
${output_with_id_passed}
+
+List om roles without OM service ID passed
+ ${output_without_id_passed} = Execute ozone admin om
roles
+ Parse non json output
${output_without_id_passed}
+ ${output_without_id_passed} = Execute And Ignore Error ozone admin
--set=ozone.om.service.ids=omservice,omservice2 om roles
+ Should Contain
${output_without_id_passed} Please specify the service ID to be finalized.
Review Comment:
Hi @adoroszlai , included all your suggestions in the new commit, can you
please review.
Thanks!
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]