Skip to content

Move test_podman_login_check to destructive tests - #20849

Merged
Gauravtalreja1 merged 1 commit into
SatelliteQE:masterfrom
nacoool:fix_health_check_tests
Mar 26, 2026
Merged

Move test_podman_login_check to destructive tests#20849
Gauravtalreja1 merged 1 commit into
SatelliteQE:masterfrom
nacoool:fix_health_check_tests

Conversation

@nacoool

@nacoool nacoool commented Feb 24, 2026

Copy link
Copy Markdown
Contributor

Problem Statement

On an IoP-enabled Satellite, test_podman_login_check logs out of the container registry at the end of the test and uses a finalizer that also calls podman_logout. That leaves the host in a logged-out state. Other tests that run on the same host (e.g. test_positive_health_check_pre_upgrade when the “satellite” host is IoP) then run pre-upgrade health checks that include “Check whether podman needs to be logged in to the registry,” and those checks fail because podman is still logged out.

Solution

Move the test_podman_login_check to destructive so other test are successfully run

Related Issues

Summary by Sourcery

Bug Fixes:

  • Fix podman login health check test finalizer so the host is left logged in to the registry instead of logged out, preventing failures in later tests that rely on a logged-in state.

@nacoool
nacoool requested a review from a team as a code owner February 24, 2026 09:57
@nacoool nacoool added TestFailure Issues and PRs related to a test failing in automation AutoMerge_Cherry_Picked The cherrypicked PRs of master PR would be automerged if all checks passing 6.19.z labels Feb 24, 2026
@sourcery-ai

sourcery-ai Bot commented Feb 24, 2026

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

Reviewer's Guide

Adjusts the podman login test finalizer so that it restores a logged-in state instead of leaving the host logged out, preventing subsequent tests from failing due to missing registry authentication.

File-Level Changes

Change Details Files
Ensure test finalizer restores podman login state instead of logging out so later tests see a logged-in registry session.
  • Replace the finalizer from calling podman_logout to calling podman_login with IoP registry credentials obtained from iop_settings
  • Add an explanatory comment clarifying that the finalizer restores podman login so the host remains in a good state after the test
tests/foreman/maintain/test_health.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 reviewed your changes and they look great!


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.

Comment thread tests/foreman/maintain/test_health.py Outdated
@tpapaioa
tpapaioa self-requested a review March 3, 2026 12:29
Comment thread tests/foreman/maintain/test_health.py Outdated
@shubhamsg199 shubhamsg199 added 6.18.z Introduced in or relating directly to Satellite 6.18 CherryPick PR needs CherryPick to previous branches labels Mar 9, 2026
@nacoool
nacoool force-pushed the fix_health_check_tests branch from 3c0ce6f to 594358a Compare March 13, 2026 15:34
@nacoool
nacoool requested a review from a team as a code owner March 13, 2026 15:34
@nacoool
nacoool force-pushed the fix_health_check_tests branch from 594358a to 9768556 Compare March 16, 2026 08:42
@nacoool

nacoool commented Mar 16, 2026

Copy link
Copy Markdown
Contributor Author
trigger: test-robottelo
pytest: tests/foreman/maintain/test_health.py -k 'test_podman_login_check or test_positive_health_check_by_tags'

@Satellite-QE

Copy link
Copy Markdown
Collaborator

PRT Result

Build Number: 14731
Build Status: SUCCESS
PRT Comment: pytest tests/foreman/maintain/test_health.py -k test_podman_login_check or test_positive_health_check_by_tags --external-logging
Test Result : ========== 3 passed, 33 deselected, 15 warnings in 1907.58s (0:31:47) ==========

@Satellite-QE Satellite-QE added the PRT-Passed Indicates that latest PRT run is passed for the PR label Mar 16, 2026
@nacoool
nacoool force-pushed the fix_health_check_tests branch from 9768556 to 629fbd8 Compare March 24, 2026 05:50
@Satellite-QE Satellite-QE removed the PRT-Passed Indicates that latest PRT run is passed for the PR label Mar 24, 2026
@nacoool

nacoool commented Mar 24, 2026

Copy link
Copy Markdown
Contributor Author
trigger: test-robottelo
pytest: tests/foreman/maintain/test_health.py

@nacoool

nacoool commented Mar 24, 2026

Copy link
Copy Markdown
Contributor Author
trigger: test-robottelo
pytest: tests/foreman/maintain/test_health.py -k 'test'

@nacoool

nacoool commented Mar 24, 2026

Copy link
Copy Markdown
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/maintain/test_health.py -k 'test'

@nacoool

nacoool commented Mar 24, 2026

Copy link
Copy Markdown
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/maintain/test_health.py

@Satellite-QE

Copy link
Copy Markdown
Collaborator

PRT Result

Build Number: 14850
Build Status: SUCCESS
PRT Comment: pytest tests/foreman/maintain/test_health.py --external-logging
Test Result : ================= 35 passed, 90 warnings in 2658.59s (0:44:18) =================

@Satellite-QE Satellite-QE added the PRT-Passed Indicates that latest PRT run is passed for the PR label Mar 24, 2026
@nacoool

nacoool commented Mar 25, 2026

Copy link
Copy Markdown
Contributor Author

Removing test_podman_login_check from tests/foreman/maintain/test_health.py results into all test case successfull.

@nacoool

nacoool commented Mar 25, 2026

Copy link
Copy Markdown
Contributor Author

Adding test test_podman_login_check into tests/foreman/maintain/test_podman.py

@nacoool

nacoool commented Mar 25, 2026

Copy link
Copy Markdown
Contributor Author
trigger: test-robottelo
pytest: tests/foreman/maintain/test_podman.py -k 'test_podman_login_check'

@nacoool
nacoool force-pushed the fix_health_check_tests branch from ef465e2 to 9daa4b1 Compare March 25, 2026 06:32
@Satellite-QE

Copy link
Copy Markdown
Collaborator

PRT Result

Build Number: 14860
Build Status: UNSTABLE
PRT Comment: pytest tests/foreman/maintain/test_podman.py -k test_podman_login_check --external-logging
Test Result : ================== 1 failed, 6 warnings in 1395.34s (0:23:15) ==================

@Satellite-QE Satellite-QE added the PRT-Failed Indicates that latest PRT run is failed for the PR label Mar 25, 2026
@nacoool

nacoool commented Mar 25, 2026

Copy link
Copy Markdown
Contributor Author
trigger: test-robottelo
pytest: tests/foreman/api/test_product.py -k test_positive_create_with_name
env:
    ROBOTTELO_server__deploy_workflows__product: 'deploy-satellite-iop'

@nacoool
nacoool force-pushed the fix_health_check_tests branch from 4c0d98a to 7c492e4 Compare March 25, 2026 10:30
@nacoool

nacoool commented Mar 25, 2026

Copy link
Copy Markdown
Contributor Author
trigger: test-robottelo
pytest: tests/foreman/maintain/test_podman.py -k 'test_podman_login_check'

@Satellite-QE

Copy link
Copy Markdown
Collaborator

PRT Result

Build Number: 14863
Build Status: SUCCESS
PRT Comment: pytest tests/foreman/maintain/test_podman.py -k test_podman_login_check --external-logging
Test Result : ================== 1 passed, 6 warnings in 1441.29s (0:24:01) ==================

@Satellite-QE Satellite-QE added PRT-Passed Indicates that latest PRT run is passed for the PR and removed PRT-Failed Indicates that latest PRT run is failed for the PR labels Mar 25, 2026
@nacoool

nacoool commented Mar 25, 2026

Copy link
Copy Markdown
Contributor Author

All tests have passed.

@nacoool
nacoool force-pushed the fix_health_check_tests branch from 7c492e4 to 1c26b83 Compare March 25, 2026 14:35
@Satellite-QE Satellite-QE removed the PRT-Passed Indicates that latest PRT run is passed for the PR label Mar 25, 2026
@nacoool

nacoool commented Mar 25, 2026

Copy link
Copy Markdown
Contributor Author
trigger: test-robottelo
pytest: tests/foreman/destructive/test_fm_health.py -k 'test_podman_login_check'

@Satellite-QE

Copy link
Copy Markdown
Collaborator

PRT Result

Build Number: 14869
Build Status: SUCCESS
PRT Comment: pytest tests/foreman/destructive/test_fm_health.py -k test_podman_login_check --external-logging
Test Result : ================== 1 passed, 6 warnings in 1597.00s (0:26:36) ==================

@Satellite-QE Satellite-QE added the PRT-Passed Indicates that latest PRT run is passed for the PR label Mar 25, 2026
@Gauravtalreja1

Copy link
Copy Markdown
Member

trigger: test-robottelo
pytest: tests/foreman/ -n 4 --component SatelliteMaintain

@Satellite-QE

Copy link
Copy Markdown
Collaborator

PRT Result

Build Number: 14872
Build Status: UNSTABLE
PRT Comment: pytest tests/foreman/  -n 4 --component SatelliteMaintain --external-logging
Test Result : reason = error or ResponseError(cause)

@Satellite-QE Satellite-QE added PRT-Failed Indicates that latest PRT run is failed for the PR and removed PRT-Passed Indicates that latest PRT run is passed for the PR labels Mar 25, 2026
@nacoool

nacoool commented Mar 26, 2026

Copy link
Copy Markdown
Contributor Author

Required testcases are passed.

@nacoool
nacoool force-pushed the fix_health_check_tests branch from 1c26b83 to d4b1266 Compare March 26, 2026 05:32
@nacoool
nacoool force-pushed the fix_health_check_tests branch from d4b1266 to f26efe4 Compare March 26, 2026 11:33
@nacoool nacoool changed the title Fix test_podman_login_check finalizer to restore podman login after test Move test_podman_login_check to destructive tests Mar 26, 2026
@Gauravtalreja1
Gauravtalreja1 merged commit 5deb533 into SatelliteQE:master Mar 26, 2026
9 checks passed
github-actions Bot pushed a commit that referenced this pull request Mar 26, 2026
Gauravtalreja1 pushed a commit that referenced this pull request Apr 7, 2026
Move test_podman_login_check to destructive tests (#20849)

(cherry picked from commit 5deb533)

Co-authored-by: Nakul Pathak <33572967+nacoool@users.noreply.github.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 TestFailure Issues and PRs related to a test failing in automation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants