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.15.z] Remove nailgun.entities imports in pytest_fixtures #15134

Conversation

Satellite-QE
Copy link
Collaborator

Cherrypick of PR: #15084

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

@Satellite-QE Satellite-QE requested a review from a team as a code owner May 21, 2024 17:33
@Satellite-QE Satellite-QE added 6.15.z Introduced in or relating directly to Satellite 6.15 Auto_Cherry_Picked Automatically cherrypicked PR using GHA No-CherryPick PR doesnt need CherryPick to previous branches labels May 21, 2024
@Satellite-QE
Copy link
Collaborator 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 Author

PRT Result

Build Number: 7042
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 : = 1 failed, 13 passed, 1 skipped, 431 warnings, 2 errors in 1758.76s (0:29:18) =

@Satellite-QE Satellite-QE added the PRT-Failed Indicates that latest PRT run is failed for the PR label May 21, 2024
@tpapaioa
Copy link
Contributor

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 Author

PRT Result

Build Number: 7070
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, 14 passed, 1 skipped, 615 warnings in 3479.15s (0:57:59) ======

@Gauravtalreja1
Copy link
Collaborator

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 Author

PRT Result

Build Number: 7128
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 : = 1 failed, 13 passed, 1 skipped, 438 warnings, 2 errors in 2074.80s (0:34:34) =

@Gauravtalreja1 Gauravtalreja1 merged commit 73569d5 into 6.15.z Jun 3, 2024
15 of 16 checks passed
@Gauravtalreja1 Gauravtalreja1 deleted the cherry-pick-6.15.z-1e952b13f3ed098bf8063c52703e8a4065d79619 branch June 3, 2024 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.15.z Introduced in or relating directly to Satellite 6.15 Auto_Cherry_Picked Automatically cherrypicked PR using GHA No-CherryPick PR doesnt need 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.

3 participants