Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[6.16.z] Fix for teardown failures #16212

Merged

Conversation

Satellite-QE
Copy link
Collaborator

Cherrypick of PR: #16211

Problem Statement

#15931 broke teardown of tests which use contenthosts registered through a Capsule because the registration target (where the host is registered to, Capsule in this case) was assigned to the host's self.satellite here, and in teardown we try to search and delete the host here, which fails since Capsule has no API

"error during teardown:\n'Capsule' object has no attribute 'api'"

Solution

As per @ogajduse++ proposal, provide the Satellite instance in host's self.satellite instead of the registration target (Capsule) so that it can be searched and destroyed at the Sat side.

PRT test Cases example

trigger: test-robottelo
pytest: tests/foreman/cli/test_host.py -k test_host_registration_with_capsule_using_content_coherence

(cherry picked from commit 36f2ecc)
@Satellite-QE Satellite-QE requested a review from a team as a code owner September 4, 2024 14:01
@Satellite-QE Satellite-QE added 6.16.z Introduced in or relating directly to Satellite 6.16 Auto_Cherry_Picked Automatically cherrypicked PR using GHA No-CherryPick PR doesnt need CherryPick to previous branches labels Sep 4, 2024
@Satellite-QE
Copy link
Collaborator Author

trigger: test-robottelo
pytest: tests/foreman/cli/test_remoteexecution.py -k test_positive_run_job_on_host_registered_to_async_ssh_provider[rhel9-ipv4]

@vsedmik vsedmik added the AutoMerge_Cherry_Picked The cherrypicked PRs of master PR would be automerged if all checks passing label Sep 4, 2024
Copy link
Contributor

@vsedmik vsedmik left a comment

Choose a reason for hiding this comment

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

CPed properly

@Satellite-QE
Copy link
Collaborator Author

PRT Result

Build Number: 8472
Build Status: SUCCESS
PRT Comment: pytest tests/foreman/cli/test_remoteexecution.py -k test_positive_run_job_on_host_registered_to_async_ssh_provider[rhel9-ipv4] --external-logging
Test Result : ========== 1 passed, 59 deselected, 76 warnings in 1700.44s (0:28:20) ==========

@Satellite-QE Satellite-QE added the PRT-Passed Indicates that latest PRT run is passed for the PR label Sep 4, 2024
@ogajduse ogajduse merged commit 7486394 into 6.16.z Sep 4, 2024
16 of 18 checks passed
@ogajduse ogajduse deleted the cherry-pick-6.16.z-36f2ecc665509e9d1a873693654fd00f2f7a0a16 branch September 4, 2024 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.16.z Introduced in or relating directly to Satellite 6.16 Auto_Cherry_Picked Automatically cherrypicked PR using GHA AutoMerge_Cherry_Picked The cherrypicked PRs of master PR would be automerged if all checks passing No-CherryPick PR doesnt need CherryPick to previous branches PRT-Passed Indicates that latest PRT run is passed for the PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants