[6.18.z] adjusted asserts for mcp user tests - #20867
Merged
Satellite-QE merged 1 commit intoFeb 25, 2026
Merged
Conversation
(cherry picked from commit 7777535)
Collaborator
Author
|
trigger: test-robottelo |
Contributor
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdjusts the MCP user permissions system test to tolerate a transient MCP client connection issue by retrying the allowed-resource API call once on a specific retry error, and strengthens the assertion for the denied-resource path to check the exact access-denied error message. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- Consider extracting the transient
Max retries exceededretry logic into a small helper or fixture so it can be reused and tuned consistently across tests that call the Foreman API. - The new strict equality assertion on
result.data['response']['error']['message'] == 'Access denied'may be brittle if upstream error messages change slightly; if stability becomes an issue, you might prefer a containment or pattern-based check instead.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider extracting the transient `Max retries exceeded` retry logic into a small helper or fixture so it can be reused and tuned consistently across tests that call the Foreman API.
- The new strict equality assertion on `result.data['response']['error']['message'] == 'Access denied'` may be brittle if upstream error messages change slightly; if stability becomes an issue, you might prefer a containment or pattern-based check instead.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Contributor
|
trigger: test-robottelo |
Collaborator
Author
|
PRT Result |
Satellite-QE
deleted the
cherry-pick-6.18.z-7777535ba140615e9c13447e9f61c8b53e1f2f59
branch
February 25, 2026 14:04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cherrypick of PR: #20852
Problem Statement
targeting an issue that isn't reproducible outside of our regular automation runs, therefore a bit mysterious. My hypothesis is that on the first run attempt the mcp client queries the mcp server before the connection with satellite is established using custom credentials.
Solution
Allow for a second try if the aforementioned issue happens
Related Issues
Summary by Sourcery
Adjust mcp user permission system tests to better handle transient API connectivity issues when querying allowed resources.
Tests: