Skip to content

HDDS-15044. Exercise ozone debug kerberos commands#10085

Open
navinko wants to merge 2 commits intoapache:masterfrom
navinko:HDDS-15044
Open

HDDS-15044. Exercise ozone debug kerberos commands#10085
navinko wants to merge 2 commits intoapache:masterfrom
navinko:HDDS-15044

Conversation

@navinko
Copy link
Copy Markdown
Contributor

@navinko navinko commented Apr 17, 2026

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

Copy link
Copy Markdown
Contributor

@sreejasahithi sreejasahithi left a comment

Choose a reason for hiding this comment

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

Thanks @navinko for working on this.

Comment on lines +56 to +60
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
Copy link
Copy Markdown
Contributor

@sreejasahithi sreejasahithi Apr 20, 2026

Choose a reason for hiding this comment

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

Suggested change
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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

+1, I agree with @sreejasahithi

Copy link
Copy Markdown
Contributor

@Gargi-jais11 Gargi-jais11 left a comment

Choose a reason for hiding this comment

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

Thanks @navinko for adding robot test for the command.
Please find the inline comment.

Comment on lines +54 to +56

*** Keywords ***
Verify Principal Translation
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please move Keywords section before test cases after line 21.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants