Skip to content

Disassociate Hosts Coverage [SAT-31029] - #18859

Merged
vsedmik merged 5 commits into
SatelliteQE:masterfrom
LadislavVasina1:disassociateHostsCoverage
Jul 8, 2025
Merged

Disassociate Hosts Coverage [SAT-31029]#18859
vsedmik merged 5 commits into
SatelliteQE:masterfrom
LadislavVasina1:disassociateHostsCoverage

Conversation

@LadislavVasina1

@LadislavVasina1 LadislavVasina1 commented Jul 1, 2025

Copy link
Copy Markdown
Contributor

Problem Statement

There is a new feature that enables users to disassociate multiple hosts via the All Hosts page. (SAT-31029)

Solution

Create a test test_disassociate_multiple_hosts that covers this use case.

It creates a VMware compute resource, imports 2 VMs,
(Thank you @Gauravtalreja1 for the info on how to do that, this part of the test is inspired by test_positive_virt_card)
and disassociates them via the UI.
Checks that the disassociation went well are done via the API, and they are checking values based on this https://github.com/theforeman/foreman/blob/f4246cdaca1d0039d93de65cda9e52862c02f81b/app/models/host/managed.rb#L589

image

Related Issues

Needs:
SatelliteQE/airgun#1909
theforeman/foreman#10560

PRT test Cases example

trigger: test-robottelo
pytest: tests/foreman/ui/test_host.py -k 'test_disassociate_multiple_hosts'
airgun: 1909
theforeman:
    foreman: 10560

@LadislavVasina1 LadislavVasina1 self-assigned this Jul 1, 2025
@LadislavVasina1
LadislavVasina1 requested a review from a team as a code owner July 1, 2025 10:16
@LadislavVasina1 LadislavVasina1 added No-CherryPick PR doesnt need CherryPick to previous branches Stream Introduced in or relating directly to Satellite Stream/Master labels Jul 1, 2025
@Satellite-QE Satellite-QE added the PRT-Failed Indicates that latest PRT run is failed for the PR label Jul 1, 2025
@LadislavVasina1

Copy link
Copy Markdown
Contributor Author
trigger: test-robottelo
pytest: tests/foreman/ui/test_host.py -k 'test_disassociate_multiple_hosts'
airgun: 1909
theforeman:
    foreman: 10560
env:
    ROBOTTELO_ui__record_video: true

@Satellite-QE

Copy link
Copy Markdown
Collaborator

PRT Result

Build Number: 11963
Build Status: SUCCESS
PRT Comment: pytest tests/foreman/ui/test_host.py -k test_disassociate_multiple_hosts --external-logging
Test Result : ========== 1 passed, 81 deselected, 14 warnings in 1513.75s (0:25:13) ==========

@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 Jul 1, 2025
@LadislavVasina1 LadislavVasina1 changed the title disassociate Hosts Coverage [SAT-31029] Disassociate Hosts Coverage [SAT-31029] Jul 1, 2025
Comment thread tests/foreman/ui/test_host.py
Comment thread tests/foreman/ui/test_host.py
Comment thread tests/foreman/ui/test_host.py Outdated
Comment thread tests/foreman/ui/test_host.py Outdated
Comment thread tests/foreman/ui/test_host.py
Comment thread tests/foreman/ui/test_host.py
Comment thread tests/foreman/ui/test_host.py
Comment thread tests/foreman/ui/test_host.py
Comment thread tests/foreman/ui/test_host.py Outdated
Comment thread tests/foreman/ui/test_host.py Outdated
Comment thread tests/foreman/ui/test_host.py
@Satellite-QE Satellite-QE removed the PRT-Passed Indicates that latest PRT run is passed for the PR label Jul 2, 2025
@LadislavVasina1

Copy link
Copy Markdown
Contributor Author
trigger: test-robottelo
pytest: tests/foreman/ui/test_host.py -k 'test_disassociate_multiple_hosts'
airgun: 1909
theforeman:
    foreman: 10560
env:
    ROBOTTELO_ui__record_video: true

@Satellite-QE

Copy link
Copy Markdown
Collaborator

PRT Result

Build Number: 11968
Build Status: UNSTABLE
PRT Comment: pytest tests/foreman/ui/test_host.py -k test_disassociate_multiple_hosts --external-logging
Test Result : ========== 1 failed, 81 deselected, 9 warnings in 1262.79s (0:21:02) ===========

@Satellite-QE Satellite-QE added the PRT-Failed Indicates that latest PRT run is failed for the PR label Jul 2, 2025
@LadislavVasina1

Copy link
Copy Markdown
Contributor Author
trigger: test-robottelo
pytest: tests/foreman/ui/test_host.py -k 'test_disassociate_multiple_hosts'
airgun: 1909
theforeman:
    foreman: 10560
env:
    ROBOTTELO_ui__record_video: true

@Satellite-QE

Copy link
Copy Markdown
Collaborator

PRT Result

Build Number: 11974
Build Status: UNSTABLE
PRT Comment: pytest tests/foreman/ui/test_host.py -k test_disassociate_multiple_hosts --external-logging
Test Result : ========== 1 failed, 81 deselected, 9 warnings in 1273.21s (0:21:13) ===========

@LadislavVasina1

LadislavVasina1 commented Jul 2, 2025

Copy link
Copy Markdown
Contributor Author

It seems that the PRT is failing due to selenium UI session is obfuscated by the breached password warning; for more reference, see 1.7.2025 JPL meeting notes. (PRT managed to pass at least once ath the beginning here #18859 (comment))

@LadislavVasina1 LadislavVasina1 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 Jul 3, 2025
@SatelliteQE SatelliteQE deleted a comment from Satellite-QE Jul 3, 2025
Comment thread tests/foreman/ui/test_host.py Outdated
Comment thread tests/foreman/ui/test_host.py Outdated
Comment thread tests/foreman/ui/test_host.py Outdated
Comment thread tests/foreman/ui/test_host.py Outdated
Comment thread tests/foreman/ui/test_host.py Outdated
Comment thread tests/foreman/ui/test_host.py Outdated
@LadislavVasina1

Copy link
Copy Markdown
Contributor Author

@pnovotny, thank you for the suggestions, I will push the changes in a minute

@Satellite-QE Satellite-QE removed the PRT-Passed Indicates that latest PRT run is passed for the PR label Jul 7, 2025
@LadislavVasina1

Copy link
Copy Markdown
Contributor Author
image

@LadislavVasina1
LadislavVasina1 requested a review from pnovotny July 7, 2025 14:26
@LadislavVasina1 LadislavVasina1 added the PRT-Passed Indicates that latest PRT run is passed for the PR label Jul 7, 2025

@pnovotny pnovotny 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.

LGTM

@vsedmik vsedmik 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.

Looks good to me, great work!

I put only one non-blocking nit bellow.

cv.publish()

# create hostgroup
hostgroup_name = gen_string('alpha')

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.

This is the second definition of hostgroup_name. I would just remove the one from line 3021 and keep this one.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@vsedmik True, thanks for that, I missed this.

@Satellite-QE Satellite-QE removed the PRT-Passed Indicates that latest PRT run is passed for the PR label Jul 8, 2025
@vsedmik
vsedmik enabled auto-merge (squash) July 8, 2025 07:36
@vsedmik
vsedmik merged commit 617f2aa into SatelliteQE:master Jul 8, 2025
9 checks passed
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 Stream Introduced in or relating directly to Satellite Stream/Master

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants