HDDS-15044. Exercise ozone debug kerberos commands#10085
HDDS-15044. Exercise ozone debug kerberos commands#10085navinko wants to merge 2 commits intoapache:masterfrom
Conversation
sreejasahithi
left a comment
There was a problem hiding this comment.
Thanks @navinko for working on this.
| Verify Principal Translation | ||
| [Arguments] ${principal} ${expected_short} | ||
| ${output} = Execute ozone debug kerberos translate-principal ${principal} | ||
| Should Contain ${output} ${expected_short} | ||
| Should Contain ${output} PASS : 1 |
There was a problem hiding this comment.
| Verify Principal Translation | |
| [Arguments] ${principal} ${expected_short} | |
| ${output} = Execute ozone debug kerberos translate-principal ${principal} | |
| Should Contain ${output} ${expected_short} | |
| Should Contain ${output} PASS : 1 | |
| Verify Principal Translation | |
| [Arguments] ${principal} ${expected_short} | |
| ${output} = Execute ozone debug kerberos translate-principal ${principal} | |
| Should Contain ${output} Local user = ${expected_short} | |
| Should Contain ${output} PASS : 1 |
Currently assertion on short name is ineffective
Should Contain ${output} ${expected_short}
This check does not verify the translation result. The command always prints the full principal name in the output, so om, scm, and dn will always be found as substrings of the principal name itself regardless of what Local user = actually resolved to.
By changing this as shown above,
it pins the assertion to the actual translation result line (Principal = om/om@EXAMPLE.COM to Local user = om), so it only passes when the mapping produced the correct short name.
Gargi-jais11
left a comment
There was a problem hiding this comment.
Thanks @navinko for adding robot test for the command.
Please find the inline comment.
|
|
||
| *** Keywords *** | ||
| Verify Principal Translation |
There was a problem hiding this comment.
Please move Keywords section before test cases after line 21.
What changes were proposed in this pull request?
Added robot test fro ozone debug kerberos subcommands
Please describe your PR in detail:
Added robot test for :
ozone debug kerberos diagnose
- checked 'should contain' for o/p and considered few probe only .
ozone debug kerberos translate-principal
- checked 'should contain' + return code for invalid principal scenario.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-15044
How was this patch tested?
ran test-debug-tools.sh from ozonesecure-ha using docker-compose
and collected xml generated robot-004.xml
Successful CI: https://github.com/navinko/ozone/actions/runs/24566127745