Skip to content

Testing: do not review - #22312

Open
shubhamsg199 wants to merge 1 commit into
SatelliteQE:masterfrom
shubhamsg199:test_upstream_pr
Open

Testing: do not review#22312
shubhamsg199 wants to merge 1 commit into
SatelliteQE:masterfrom
shubhamsg199:test_upstream_pr

Conversation

@shubhamsg199

@shubhamsg199 shubhamsg199 commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary by Sourcery

Update foremanctl capsule bundle tests to validate the new auth-bundle behavior and expectations.

New Features:

  • Add verification that foremanctl auth bundles include OAuth consumer key and secret for capsules.

Enhancements:

  • Rename the capsule bundle test scenario and helper to use the new auth-bundle terminology instead of certificate-bundle.
  • Adjust pytest markers to remove the foremanctl marker from the upgraded Satellite test.

@shubhamsg199 shubhamsg199 self-assigned this Jul 30, 2026
@shubhamsg199
shubhamsg199 requested a review from a team as a code owner July 30, 2026 07:08
@shubhamsg199 shubhamsg199 added No-CherryPick PR doesnt need CherryPick to previous branches Stream Introduced in or relating directly to Satellite Stream/Master labels Jul 30, 2026
@sourcery-ai

sourcery-ai Bot commented Jul 30, 2026

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

Reviewer's Guide

Update foremanctl capsule bundle test to validate the new auth-bundle behavior and content, and narrow the test marker scope.

File-Level Changes

Change Details Files
Align the capsule bundle helper and test case with the foremanctl auth-bundle command and its expected contents.
  • Remove the foremanctl-specific pytest marker, leaving only the upgrade marker on the module tests.
  • Rename the helper docstring and related messaging from "certificate bundle" to "auth bundle" to match the new command semantics.
  • Extend bundle content assertions to check for OAuth consumer key and secret files in addition to capsule server and client certificates.
  • Rename the main test function and its narrative steps/expected results from certificate-bundle to auth-bundle, including renewal behavior.
  • Update the foremanctl CLI invocations and associated assertion messages from certificate-bundle to auth-bundle, including the --certificate-renew path.
tests/foreman/foremanctl/test_install_foremanctl.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:

  • The helper foremanctl_capsule_cert_paths now validates OAuth files but still only returns certificate paths; consider either returning the OAuth file paths as well or renaming the helper to better reflect its behavior.
  • Now that the test focuses on the broader auth bundle behavior (certs + OAuth), you may want to expand the assertions beyond presence in the tar listing to validate basic properties of the OAuth key/secret (e.g., non-empty content) to catch more subtle regressions.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The helper `foremanctl_capsule_cert_paths` now validates OAuth files but still only returns certificate paths; consider either returning the OAuth file paths as well or renaming the helper to better reflect its behavior.
- Now that the test focuses on the broader auth bundle behavior (certs + OAuth), you may want to expand the assertions beyond presence in the tar listing to validate basic properties of the OAuth key/secret (e.g., non-empty content) to catch more subtle regressions.

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.

@shubhamsg199

Copy link
Copy Markdown
Contributor Author
trigger: test-robottelo
pytest: tests/foreman/foremanctl/test_install_foremanctl.py -k test_positive_foremanctl_auth_bundle
theforeman:
  foremanctl: 698

@Satellite-QE

Copy link
Copy Markdown
Collaborator

PRT Result

Build Number: 16293
Build Status: SUCCESS
PRT Comment: pytest tests/foreman/foremanctl/test_install_foremanctl.py -k test_positive_foremanctl_auth_bundle --external-logging
Test Result : ========== 1 passed, 20 deselected, 11 warnings in 2451.90s (0:40:51) ==========

@Satellite-QE Satellite-QE added the PRT-Passed Indicates that latest PRT run is passed for the PR label Jul 30, 2026
@Satellite-QE Satellite-QE removed the PRT-Passed Indicates that latest PRT run is passed for the PR label Jul 30, 2026
@shubhamsg199

Copy link
Copy Markdown
Contributor Author
trigger: test-robottelo
pytest: tests/foreman/foremanctl/test_install_foremanctl.py -k test_positive_foremanctl_auth_bundle
theforeman:
  foremanctl: 698

@Satellite-QE

Copy link
Copy Markdown
Collaborator

PRT Result

Build Number: 16295
Build Status: SUCCESS
PRT Comment: pytest tests/foreman/foremanctl/test_install_foremanctl.py -k test_positive_foremanctl_auth_bundle --external-logging
Test Result : ========== 1 passed, 20 deselected, 11 warnings in 2457.46s (0:40:57) ==========

@Satellite-QE Satellite-QE added the PRT-Passed Indicates that latest PRT run is passed for the PR label Jul 30, 2026
Signed-off-by: Shubham Ganar <shubhamsg123m@gmail.com>
@Satellite-QE Satellite-QE removed the PRT-Passed Indicates that latest PRT run is passed for the PR label Jul 30, 2026
@shubhamsg199

Copy link
Copy Markdown
Contributor Author
trigger: test-robottelo
pytest: tests/foreman/foremanctl/test_install_foremanctl.py -k test_positive_foremanctl_auth_bundle
deployment_type: container
theforeman:
  foremanctl: 698

@Satellite-QE

Copy link
Copy Markdown
Collaborator

PRT Result

Build Number: 16296
Build Status: UNSTABLE
PRT Comment: pytest tests/foreman/foremanctl/test_install_foremanctl.py -k test_positive_foremanctl_auth_bundle --external-logging
Test Result : ========== 20 deselected, 12 warnings, 1 error in 4710.76s (1:18:30) ===========

@Satellite-QE Satellite-QE added the PRT-Failed Indicates that latest PRT run is failed for the PR label Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

No-CherryPick PR doesnt need CherryPick to previous branches PRT-Failed Indicates that latest PRT run is failed for the PR Stream Introduced in or relating directly to Satellite Stream/Master

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants