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

Remove nailgun.entities imports in pytest_fixtures #15084

Merged

Conversation

tpapaioa
Copy link
Contributor

@tpapaioa tpapaioa commented May 16, 2024

Problem Statement

SAT-22530

Uses of nailgun.entities.${ENTITY} should be replaced with ${SATELLITE_INSTANCE}.api.${ENTITY}.

Solution

All fixtures under pytest_fixtures/ now use nailgun through the satellite instance's api attribute, and imports of nailgun.entities have been removed.

Test results are the same before and after these changes.

with PR changes:

PRT job #6979:

18:53:58  =========================== short test summary info ============================
18:53:58  FAILED tests/foreman/api/test_host.py::test_positive_create_and_update_with_user [...]
18:53:58  FAILED tests/foreman/ui/test_ldap_authentication.py::test_verify_group_permissions [...]
18:53:58  ERROR tests/foreman/api/test_oscappolicy.py::TestOscapPolicy::test_positive_crud_scap_policy [...]
18:53:58  = 2 failed, 13 passed, 1 skipped, 617 warnings, 1 error in 3674.62s (1:01:14) ==

master:

PRT job #6996:

16:30:58  =========================== short test summary info ============================
16:30:58  FAILED tests/foreman/api/test_host.py::test_positive_create_and_update_with_user [...]
16:30:58  FAILED tests/foreman/ui/test_ldap_authentication.py::test_verify_group_permissions [...]
16:30:58  ERROR tests/foreman/api/test_oscappolicy.py::TestOscapPolicy::test_positive_crud_scap_policy [...]
16:30:58  = 2 failed, 13 passed, 1 skipped, 610 warnings, 1 error in 3667.19s (1:01:07) ==

Related Issues

@tpapaioa tpapaioa added CherryPick PR needs CherryPick to previous branches 6.12.z Introduced in or relating directly to Satellite 6.12 6.13.z Introduced in or relating directly to Satellite 6.13 6.14.z Introduced in or relating directly to Satellite 6.14 6.15.z Introduced in or relating directly to Satellite 6.15 labels May 16, 2024
@tpapaioa tpapaioa force-pushed the fixtures_remove_entities_module branch from faacec2 to 86f47b3 Compare May 16, 2024 18:43
@Satellite-QE Satellite-QE added PRT-Failed Indicates that latest PRT run is failed for the PR 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 May 16, 2024
@SatelliteQE SatelliteQE deleted a comment from Satellite-QE May 16, 2024
@tpapaioa tpapaioa removed the PRT-Passed Indicates that latest PRT run is passed for the PR label May 16, 2024
@tpapaioa tpapaioa force-pushed the fixtures_remove_entities_module branch from 86f47b3 to 16b5beb Compare May 16, 2024 21:43
@tpapaioa
Copy link
Contributor Author

trigger: test-robottelo
pytest:  tests/foreman/api/test_discoveryrule.py::test_positive_end_to_end_crud tests/foreman/api/test_host.py::test_negative_update_name tests/foreman/api/test_host.py::test_positive_create_and_update_os tests/foreman/api/test_host.py::test_positive_create_and_update_with_compute_profile tests/foreman/api/test_host.py::test_positive_create_and_update_with_model tests/foreman/api/test_host.py::test_positive_create_and_update_with_subnet tests/foreman/api/test_host.py::test_positive_create_and_update_with_user tests/foreman/api/test_oscappolicy.py::TestOscapPolicy::test_positive_crud_scap_policy tests/foreman/cli/test_contentview.py::TestContentView::test_positive_update_filter tests/foreman/cli/test_discoveryrule.py::TestDiscoveryRule::test_positive_create_disabled_rule tests/foreman/destructive/test_ldap_authentication.py::test_positive_autonegotiate[IDM] tests/foreman/ui/test_bookmarks.py::test_positive_create_bookmark_public[ActivationKey] tests/foreman/ui/test_host.py::test_positive_check_permissions_affect_create_procedure tests/foreman/ui/test_ldap_authentication.py::test_positive_group_sync_open_ldap_authsource tests/foreman/ui/test_ldap_authentication.py::test_verify_group_permissions tests/foreman/ui/test_registration.py::test_positive_global_registration_form tests/foreman/ui/test_repository.py::test_positive_remove_credentials

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 6979
Build Status: UNSTABLE
PRT Comment: pytest tests/foreman/api/test_discoveryrule.py::test_positive_end_to_end_crud tests/foreman/api/test_host.py::test_negative_update_name tests/foreman/api/test_host.py::test_positive_create_and_update_os tests/foreman/api/test_host.py::test_positive_create_and_update_with_compute_profile tests/foreman/api/test_host.py::test_positive_create_and_update_with_model tests/foreman/api/test_host.py::test_positive_create_and_update_with_subnet tests/foreman/api/test_host.py::test_positive_create_and_update_with_user tests/foreman/api/test_oscappolicy.py::TestOscapPolicy::test_positive_crud_scap_policy tests/foreman/cli/test_contentview.py::TestContentView::test_positive_update_filter tests/foreman/cli/test_discoveryrule.py::TestDiscoveryRule::test_positive_create_disabled_rule tests/foreman/destructive/test_ldap_authentication.py::test_positive_autonegotiate[IDM] tests/foreman/ui/test_bookmarks.py::test_positive_create_bookmark_public[ActivationKey] tests/foreman/ui/test_host.py::test_positive_check_permissions_affect_create_procedure tests/foreman/ui/test_ldap_authentication.py::test_positive_group_sync_open_ldap_authsource tests/foreman/ui/test_ldap_authentication.py::test_verify_group_permissions tests/foreman/ui/test_registration.py::test_positive_global_registration_form tests/foreman/ui/test_repository.py::test_positive_remove_credentials --external-logging
Test Result : = 2 failed, 13 passed, 1 skipped, 617 warnings, 1 error in 3674.62s (1:01:14) ==

@Satellite-QE Satellite-QE added the PRT-Failed Indicates that latest PRT run is failed for the PR label May 16, 2024
@SatelliteQE SatelliteQE deleted a comment from Satellite-QE May 20, 2024
@tpapaioa tpapaioa marked this pull request as ready for review May 20, 2024 13:32
@tpapaioa tpapaioa requested a review from a team as a code owner May 20, 2024 13:32
Copy link
Member

@JacobCallahan JacobCallahan left a comment

Choose a reason for hiding this comment

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

ACK on the changes. Can you determine (or get with the component owners) if the failures in PRT are related?

@omkarkhatavkar
Copy link

@JacobCallahan @tpapaioa I dont see these failures related to this PR. I see some failures because of removing the nailgun entities. These are need to modified by the component owner.

@tpapaioa
Copy link
Contributor Author

ACK on the changes. Can you determine (or get with the component owners) if the failures in PRT are related?

@JacobCallahan The PRT test failures / errors are the same before and after these changes, and are unrelated, pre-existing issues.

@omkarkhatavkar omkarkhatavkar merged commit 1e952b1 into SatelliteQE:master May 21, 2024
10 of 11 checks passed
github-actions bot pushed a commit that referenced this pull request May 21, 2024
github-actions bot pushed a commit that referenced this pull request May 21, 2024
github-actions bot pushed a commit that referenced this pull request May 21, 2024
damoore044 pushed a commit to damoore044/robottelo that referenced this pull request May 21, 2024
@tpapaioa tpapaioa deleted the fixtures_remove_entities_module branch May 22, 2024 13:51
Gauravtalreja1 pushed a commit that referenced this pull request Jun 3, 2024
Remove nailgun.entities imports in pytest_fixtures (#15084)

(cherry picked from commit 1e952b1)

Co-authored-by: Tasos Papaioannou <[email protected]>
Gauravtalreja1 pushed a commit that referenced this pull request Jun 3, 2024
Gauravtalreja1 pushed a commit that referenced this pull request Jun 3, 2024
Gauravtalreja1 pushed a commit that referenced this pull request Jun 4, 2024
Remove nailgun.entities imports in pytest_fixtures (#15084)

(cherry picked from commit 1e952b1)

Co-authored-by: Tasos Papaioannou <[email protected]>
Gauravtalreja1 pushed a commit that referenced this pull request Jun 4, 2024
Remove nailgun.entities imports in pytest_fixtures (#15084)

(cherry picked from commit 1e952b1)

Co-authored-by: Tasos Papaioannou <[email protected]>
jyejare pushed a commit to jyejare/robottelo that referenced this pull request Oct 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.12.z Introduced in or relating directly to Satellite 6.12 6.13.z Introduced in or relating directly to Satellite 6.13 6.14.z Introduced in or relating directly to Satellite 6.14 6.15.z Introduced in or relating directly to Satellite 6.15 CherryPick PR needs CherryPick to previous branches PRT-Failed Indicates that latest PRT run is failed for the PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants