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 tests/foreman/cli #15033

Merged

Conversation

tpapaioa
Copy link
Contributor

@tpapaioa tpapaioa commented May 10, 2024

Problem Statement

SAT-22500

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

Solution

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

PRT results are the same before and after these changes:

with PR changes:

PRT job #6928:

16:11:32  =========================== short test summary info ============================
16:11:32  FAILED tests/foreman/cli/test_ldapauthsource.py::TestIPAAuthSource::test_usergroup_sync_with_refresh - robottelo.hosts.IPAHostError: Failed to add the user to usergroup
16:11:32  FAILED tests/foreman/cli/test_repository.py::TestFileRepository::test_positive_upload_file_to_file_repo[0] - assert "Successfully uploaded file 'which-2.19-6.el6.x86_64.rpm'" in 'Successfully uploaded file which-2.19-6.el6.x86_64.rpm'
16:11:32  FAILED tests/foreman/cli/test_repository.py::TestFileRepository::test_file_repo_contains_only_newer_file[0] - assert "Successfully uploaded file 'test-tqpuz.txt'" in 'Successfully uploaded file test-tqpuz.txt'
16:11:32  ERROR tests/foreman/cli/test_contentaccess.py::test_positive_list_installable_updates[rhel7_contenthost_module0] - KeyError: 'subscription_status'
16:11:32  = 3 failed, 23 passed, 1819 deselected, 2225 warnings, 1 error in 4149.45s (1:09:09) =

PRT job #7019:

10:59:39  ERROR tests/foreman/cli/test_contentaccess.py::test_positive_list_installable_updates[rhel7_contenthost_module0] - KeyError: 'subscription_status'
10:59:39  =================== 8 warnings, 1 error in 771.65s (0:12:51) ===================

master:

PRT job #6924:

11:26:39  =========================== short test summary info ============================
11:26:39  FAILED tests/foreman/cli/test_ldapauthsource.py::TestIPAAuthSource::test_usergroup_sync_with_refresh - robottelo.hosts.IPAHostError: Failed to add the user to usergroup
11:26:39  FAILED tests/foreman/cli/test_repository.py::TestFileRepository::test_positive_upload_file_to_file_repo[0] - assert "Successfully uploaded file 'which-2.19-6.el6.x86_64.rpm'" in 'Successfully uploaded file which-2.19-6.el6.x86_64.rpm'
11:26:39  FAILED tests/foreman/cli/test_repository.py::TestFileRepository::test_file_repo_contains_only_newer_file[0] - assert "Successfully uploaded file 'test-mjebn.txt'" in 'Successfully uploaded file test-mjebn.txt'
11:26:39  ERROR tests/foreman/cli/test_contentaccess.py::test_positive_list_installable_updates[rhel7_contenthost_module0] - KeyError: 'subscription_status'
11:26:39  = 3 failed, 23 passed, 1819 deselected, 2214 warnings, 1 error in 3845.33s (1:04:05) =

PRT job #7020:

11:20:14  ERROR tests/foreman/cli/test_contentaccess.py::test_positive_list_installable_updates[rhel7_contenthost_module0] - KeyError: 'subscription_status'
11:20:14  =================== 8 warnings, 1 error in 764.23s (0:12:44) ===================

Related Issues

@tpapaioa tpapaioa self-assigned this May 10, 2024
@tpapaioa tpapaioa added No-CherryPick PR doesnt need CherryPick to previous branches 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 and removed No-CherryPick PR doesnt need CherryPick to previous branches labels May 10, 2024
@Satellite-QE Satellite-QE added the PRT-Failed Indicates that latest PRT run is failed for the PR label May 10, 2024
@tpapaioa tpapaioa force-pushed the cli_tests_remove_entities_module branch from 903e553 to cfa357d Compare May 14, 2024 18:53
@tpapaioa
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/cli -k 'test_positive_add_rh_repo_by_id_and_create_filter or test_positive_add_module_stream_filter_rule or test_positive_crud_with_non_admin_user or test_negative_delete_rule_with_non_admin_user or test_positive_create_with_multiple_entities_and_delete or test_positive_refresh_usergroup_with_ad[foobargroup] or test_positive_end_to_end_with_ipa[0] or test_usergroup_sync_with_refresh or test_positive_list_installable_updates or test_positive_associate_scap_policy_with_single_server or test_positive_create_with_auth_yum_repo[0] or test_positive_upload_file_to_file_repo[0] or test_file_repo_contains_only_newer_file[0] or test_positive_delete_manifest_as_another_user or test_positive_update_interval[0] or test_positive_update_sync_date or test_positive_info_enabled_field_is_displayed or test_negative_synchronize_custom_product_past_sync_date or test_positive_synchronize_custom_product_past_sync_date or test_positive_synchronize_custom_product_future_sync_date or test_positive_synchronize_custom_products_future_sync_date or test_positive_synchronize_rh_product_past_sync_date or test_positive_synchronize_rh_product_future_sync_date or test_positive_synchronize_custom_product_daily_recurrence or test_positive_synchronize_custom_product_weekly_recurrence or test_positive_import_force_locked_template or test_positive_CRD_ssh_key'

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 6928
Build Status: UNSTABLE
PRT Comment: pytest tests/foreman/cli -k test_positive_add_rh_repo_by_id_and_create_filter or test_positive_add_module_stream_filter_rule or test_positive_crud_with_non_admin_user or test_negative_delete_rule_with_non_admin_user or test_positive_create_with_multiple_entities_and_delete or test_positive_refresh_usergroup_with_ad[foobargroup] or test_positive_end_to_end_with_ipa[0] or test_usergroup_sync_with_refresh or test_positive_list_installable_updates or test_positive_associate_scap_policy_with_single_server or test_positive_create_with_auth_yum_repo[0] or test_positive_upload_file_to_file_repo[0] or test_file_repo_contains_only_newer_file[0] or test_positive_delete_manifest_as_another_user or test_positive_update_interval[0] or test_positive_update_sync_date or test_positive_info_enabled_field_is_displayed or test_negative_synchronize_custom_product_past_sync_date or test_positive_synchronize_custom_product_past_sync_date or test_positive_synchronize_custom_product_future_sync_date or test_positive_synchronize_custom_products_future_sync_date or test_positive_synchronize_rh_product_past_sync_date or test_positive_synchronize_rh_product_future_sync_date or test_positive_synchronize_custom_product_daily_recurrence or test_positive_synchronize_custom_product_weekly_recurrence or test_positive_import_force_locked_template or test_positive_CRD_ssh_key --external-logging
Test Result : = 3 failed, 23 passed, 1819 deselected, 2225 warnings, 1 error in 4149.45s (1:09:09) =

@tpapaioa tpapaioa force-pushed the cli_tests_remove_entities_module branch from cfa357d to 50bc0df Compare May 14, 2024 20:28
@SatelliteQE SatelliteQE deleted a comment from Satellite-QE May 16, 2024
@tpapaioa tpapaioa force-pushed the cli_tests_remove_entities_module branch from 50bc0df to 77908bb Compare May 20, 2024 14:36
@tpapaioa
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/cli/test_contentaccess.py::test_positive_list_installable_updates[rhel7_contenthost_module0]

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 7019
Build Status: UNSTABLE
PRT Comment: pytest tests/foreman/cli/test_contentaccess.py::test_positive_list_installable_updates[rhel7_contenthost_module0] --external-logging
Test Result : =================== 8 warnings, 1 error in 771.65s (0:12:51) ===================

@SatelliteQE SatelliteQE deleted a comment from Satellite-QE May 20, 2024
@tpapaioa tpapaioa marked this pull request as ready for review May 20, 2024 15:30
@tpapaioa tpapaioa requested review from a team as code owners May 20, 2024 15:30
Copy link
Contributor

@vsedmik vsedmik 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 phoenix-owned files.

@tpapaioa tpapaioa added 6.16.z and removed 6.12.z Introduced in or relating directly to Satellite 6.12 6.16.z labels May 29, 2024
tpapaioa added a commit to tpapaioa/robottelo that referenced this pull request May 29, 2024
tpapaioa added a commit to tpapaioa/robottelo that referenced this pull request May 29, 2024
tpapaioa added a commit to tpapaioa/robottelo that referenced this pull request May 29, 2024
tpapaioa added a commit to tpapaioa/robottelo that referenced this pull request May 29, 2024
tpapaioa added a commit to tpapaioa/robottelo that referenced this pull request May 29, 2024
tpapaioa added a commit to tpapaioa/robottelo that referenced this pull request May 29, 2024
tpapaioa added a commit to tpapaioa/robottelo that referenced this pull request May 30, 2024
tpapaioa added a commit that referenced this pull request May 30, 2024
[6.14.z] Remove nailgun.entities imports in tests/foreman/cli (#15033)
tpapaioa added a commit that referenced this pull request May 30, 2024
[6.15.z] Remove nailgun.entities imports in tests/foreman/cli (#15033)
tpapaioa added a commit that referenced this pull request May 30, 2024
Remove nailgun.entities imports in tests/foreman/cli (#15033)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

None yet

4 participants