kostacie commented on code in PR #8632:
URL: https://github.com/apache/ozone/pull/8632#discussion_r2152924335
##########
hadoop-ozone/dist/src/main/smoketest/commonlib.robot:
##########
@@ -31,6 +31,16 @@ Get test user principal
${instance} = Execute hostname | sed
's/scm[0-9].org/scm/;s/scm[0-9]/scm/;s/om[0-9]/om/'
[return] ${user}/${instance}@EXAMPLE.COM
+Get Security Enabled From Config
+ ${conf_dir} = Get Environment Variable OZONE_CONF_DIR
+ ${file} = Set Variable ${conf_dir}/ozone-site.xml
+ ${value} = Execute sed -n
"/<name>ozone.security.enabled<\\/name>/,/<\\/property>/s|.*<value>\\(.*\\)</value>.*|\\1|p"
${file} | head -n1 | xargs
+ IF '${value}' != 'true' and '${value}' != 'false'
Review Comment:
Thank you for the review.
I've just had a look at the Robot Framework documentation.
[Here](https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#using-variables-1)
is a section about using variables with normal `${value}` and special `$value`
syntax. It says, the special syntax `$value` is a recommended and correct way
for cases like this when we use IF statement because it allows to get a value
of the variable.
I guess it should be replaced with special syntax if the current option is
not suitable.
--
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]