Skip to content

Change Owner/Org/Loc test coverage - #19030

Merged
vsedmik merged 3 commits into
SatelliteQE:masterfrom
LadislavVasina1:ChangeOwnerOrgLocCoverage
Jul 24, 2025
Merged

Change Owner/Org/Loc test coverage#19030
vsedmik merged 3 commits into
SatelliteQE:masterfrom
LadislavVasina1:ChangeOwnerOrgLocCoverage

Conversation

@LadislavVasina1

@LadislavVasina1 LadislavVasina1 commented Jul 21, 2025

Copy link
Copy Markdown
Contributor

This PR adds 2 new tests:

Additional info

Needs Airgun: SatelliteQE/airgun#1933
Needs upstream foreman: theforeman/foreman#10591

image

PRT example

trigger: test-robottelo
pytest: tests/foreman/ui/test_host.py -k 'test_positive_change_hosts_owner or test_positive_change_hosts_org_loc'
airgun: 1933
theforeman:
    foreman: 10591

@LadislavVasina1 LadislavVasina1 self-assigned this Jul 21, 2025
@LadislavVasina1
LadislavVasina1 requested a review from a team July 21, 2025 09:48
@LadislavVasina1 LadislavVasina1 added No-CherryPick PR doesnt need CherryPick to previous branches Stream Introduced in or relating directly to Satellite Stream/Master labels Jul 21, 2025
@LadislavVasina1

Copy link
Copy Markdown
Contributor Author
trigger: test-robottelo
pytest: tests/foreman/ui/test_host.py -k 'test_positive_change_hosts_owner or test_positive_change_hosts_org_loc'
airgun: 1933
theforeman:
    foreman: 10591

@LadislavVasina1 LadislavVasina1 changed the title Change Owner/Org/Loc coverage Change Owner/Org/Loc test coverage Jul 21, 2025
@Satellite-QE

Copy link
Copy Markdown
Collaborator

PRT Result

Build Number: 12085
Build Status: SUCCESS
PRT Comment: pytest tests/foreman/ui/test_host.py -k test_positive_change_hosts_owner or test_positive_change_hosts_org_loc --external-logging
Test Result : ========== 2 passed, 82 deselected, 49 warnings in 1735.28s (0:28:55) ==========

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

@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, nice work!

session.organization.select(org_name=module_org.name)
session.location.select(loc_name=module_location.name)

# Change the hosts' owner to the new user

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.

Suggested change
# Change the hosts' owner to the new user
# Change the host's owner to the new user

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.

'Owner': True,
}
)
# Change the hosts' owner to the user group

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.

Suggested change
# Change the hosts' owner to the user group
# Change the host's owner to the user group

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.

Comment thread tests/foreman/ui/test_host.py
2. Create/Register multiple content hosts in the first organization/location
3. Navigate to All Hosts page
4. Select multiple hosts
5. Use bulk action to change organization and location

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.

Suggested change
5. Use bulk action to change organization and location
5. Use bulk action to change organization/location

Comment thread tests/foreman/ui/test_host.py Outdated
Comment thread tests/foreman/ui/test_host.py Outdated

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

Talking about test_positive_change_hosts_org_loc, so there is scope of improvement, but I would say we should get atleast one positive scenario in, in later part of this feature we could add more scenarios (option = fail on mismatch)

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
@Satellite-QE Satellite-QE removed the PRT-Passed Indicates that latest PRT run is passed for the PR label Jul 23, 2025
@LadislavVasina1 LadislavVasina1 added the PRT-Passed Indicates that latest PRT run is passed for the PR label Jul 23, 2025
@vsedmik
vsedmik merged commit 001280e into SatelliteQE:master Jul 24, 2025
10 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 PRT-Passed Indicates that latest PRT run is passed 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.

5 participants