Skip to content

Fix parametrization order for MCP server test - #20883

Merged
lpramuk merged 1 commit into
SatelliteQE:masterfrom
lpramuk:fix_param_order_for_mcp_server
Feb 26, 2026
Merged

Fix parametrization order for MCP server test#20883
lpramuk merged 1 commit into
SatelliteQE:masterfrom
lpramuk:fix_param_order_for_mcp_server

Conversation

@lpramuk

@lpramuk lpramuk commented Feb 26, 2026

Copy link
Copy Markdown
Contributor

Problem Statement

Incorrect parametrization order for MCP server test:

  • running downstream parameter tests Stage
  • running stage parameter tests Prod

Solution

Fix parametrization order

Related Issues

SAT-42137

Summary by Sourcery

Bug Fixes:

  • Fix mismatched parametrization IDs so that 'stage' and 'downstream' MCP server tests run against the correct environments.

@lpramuk lpramuk self-assigned this Feb 26, 2026
@lpramuk
lpramuk requested a review from a team as a code owner February 26, 2026 08:08
@lpramuk lpramuk added CherryPick PR needs CherryPick to previous branches AutoMerge_Cherry_Picked The cherrypicked PRs of master PR would be automerged if all checks passing 6.18.z Introduced in or relating directly to Satellite 6.18 6.19.z labels Feb 26, 2026
@lpramuk

lpramuk commented Feb 26, 2026

Copy link
Copy Markdown
Contributor Author

trigger: test-robottelo
pytest: -v tests/foreman/sys/test_mcp.py::test_positive_call_mcp_server

@sourcery-ai

sourcery-ai Bot commented Feb 26, 2026

Copy link
Copy Markdown
Contributor
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Adjusts the pytest parameterization IDs for the MCP server test so that the semantic IDs correctly match the order of the parameter values, ensuring stage and downstream are not swapped during test runs.

File-Level Changes

Change Details Files
Correct mapping between pytest param values and their ids in MCP server test parameterization.
  • Reordered the ids list in the pytest parametrize decorator so that the labels align with the order of the MCP module targets (upstream, stage, downstream).
tests/foreman/sys/test_mcp.py

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

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.

Hey - I've left some high level feedback:

  • Since this bug was caused by a mismatch between parametrize values and ids, consider deriving the ids programmatically from the argument list (or a shared mapping) to avoid them drifting out of sync in future refactors.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Since this bug was caused by a mismatch between `parametrize` values and `ids`, consider deriving the `ids` programmatically from the argument list (or a shared mapping) to avoid them drifting out of sync in future refactors.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@Satellite-QE

Copy link
Copy Markdown
Collaborator

PRT Result

Build Number: 14488
Build Status: UNSTABLE
PRT Comment: pytest -v tests/foreman/sys/test_mcp.py::test_positive_call_mcp_server --external-logging
Test Result : ============ 2 failed, 1 passed, 34 warnings in 1236.26s (0:20:36) =============

@Satellite-QE Satellite-QE added the PRT-Failed Indicates that latest PRT run is failed for the PR label Feb 26, 2026
@Satellite-QE

Copy link
Copy Markdown
Collaborator

PRT Result

Build Number: 4
Build Status: UNSTABLE
PRT Comment: pytest -v tests/foreman/sys/test_mcp.py::test_positive_call_mcp_server --external-logging
Test Result : ============ 2 failed, 1 passed, 36 warnings in 1282.31s (0:21:22) =============

@lpramuk
lpramuk merged commit cae1f16 into SatelliteQE:master Feb 26, 2026
13 of 14 checks passed
github-actions Bot pushed a commit that referenced this pull request Feb 26, 2026
github-actions Bot pushed a commit that referenced this pull request Feb 26, 2026
Gauravtalreja1 pushed a commit that referenced this pull request Feb 26, 2026
Gauravtalreja1 pushed a commit that referenced this pull request Feb 26, 2026
Fix parametrization order for MCP server test (#20883)

(cherry picked from commit cae1f16)

Co-authored-by: Lukas Pramuk <lpramuk@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.18.z Introduced in or relating directly to Satellite 6.18 6.19.z AutoMerge_Cherry_Picked The cherrypicked PRs of master PR would be automerged if all checks passing CherryPick PR needs CherryPick to previous branches PRT-Failed Indicates that latest PRT run is failed for the PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants