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

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 added 6.14.z Introduced in or relating directly to Satellite 6.14 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: 7044
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, 12 passed, 1 skipped, 403 warnings, 3 errors in 1740.11s (0:29:00) =

@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

@tpapaioa
Copy link
Contributor

Waiting on #14966

@Satellite-QE
Copy link
Collaborator Author

PRT Result

Build Number: 7069
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, 12 passed, 1 skipped, 606 warnings, 2 errors in 3582.10s (0:59:42) =

@Gauravtalreja1 Gauravtalreja1 force-pushed the cherry-pick-6.14.z-1e952b13f3ed098bf8063c52703e8a4065d79619 branch from df59600 to bf6dac8 Compare June 3, 2024 20:00
@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

1 similar comment
@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: 7269
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, 465 warnings, 2 errors in 1984.59s (0:33:04) =

Copy link
Collaborator

@Gauravtalreja1 Gauravtalreja1 left a comment

Choose a reason for hiding this comment

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

ACK, PRT failures look unrelated same as master PR

@Gauravtalreja1 Gauravtalreja1 merged commit a1e3c68 into 6.14.z Jun 4, 2024
8 of 9 checks passed
@Gauravtalreja1 Gauravtalreja1 deleted the cherry-pick-6.14.z-1e952b13f3ed098bf8063c52703e8a4065d79619 branch June 4, 2024 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.14.z Introduced in or relating directly to Satellite 6.14 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