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

Add permission tests for foreman_scc_manager #16892

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dosas
Copy link
Collaborator

@dosas dosas commented Nov 11, 2024

Problem Statement

permission tests are failing with foreman_scc_manager plugin installed

Solution

adapt permission tests

Related Issues

relevant tests: tests/foreman/api/test_permission.py

@dosas dosas added CherryPick PR needs CherryPick to previous branches 6.16.z Introduced in or relating directly to Satellite 6.16 labels Nov 11, 2024
@dosas dosas requested review from a team as code owners November 11, 2024 10:54
@Satellite-QE
Copy link
Collaborator

Can one of the admins verify this patch?

@ogajduse
Copy link
Member

ogajduse commented Nov 11, 2024

trigger: test-robottelo
pytest: tests/foreman/api/test_permission.py::TestPermission::test_positive_search tests/foreman/api/test_permission.py::TestPermission::test_positive_search_by_name

@jyejare
Copy link
Member

jyejare commented Nov 11, 2024

@ogajduse Looks like the PRT is still not being triggered for Community member PRs.

@ogajduse
Copy link
Member

@ogajduse Looks like the PRT is still not being triggered for Community member PRs.

Oh, I did not know that it is a known issue. I will trigger PRT the other way and will get back with results.

@ogajduse
Copy link
Member

PRT passed using the comment above. Awaiting review from @SatelliteQE/team-endeavour.

@Gauravtalreja1
Copy link
Collaborator

@dosas We don't have foreman_scc_manager plugin installed, so could you please provide the results with plugin enabled?

@ogajduse Since we don't have this plugin installed, PRT might have passed without this plugin

@ogajduse
Copy link
Member

@dosas We don't have foreman_scc_manager plugin installed, so could you please provide the results with plugin enabled?

@ogajduse Since we don't have this plugin installed, PRT might have passed without this plugin

That is something I am aware of. Take the PR review from here, please.

@dosas
Copy link
Collaborator Author

dosas commented Nov 11, 2024

@dosas We don't have foreman_scc_manager plugin installed, so could you please provide the results with plugin enabled?

What results should I provide? Are you okay with some pytest output from cmdline?

@ogajduse Since we don't have this plugin installed, PRT might have passed without this plugin

That means it works perfectly fine and does not break anything.

@lhellebr
Copy link
Contributor

These tests use that variable:

tests/foreman/api/test_contentcredentials.py::test_positive_block_delete_key_in_use
tests/foreman/api/test_contentview.py::test_negative_non_readonly_user_actions
tests/foreman/api/test_partitiontable.py::TestPartitionTable::test_negative_update_layout
tests/foreman/api/test_partitiontable.py::TestPartitionTable::test_negative_update_layout
tests/foreman/api/test_permission.py::TestPermission::test_positive_search_by_resource_type
tests/foreman/api/test_permission.py::TestPermission::test_positive_search
tests/foreman/api/test_permission.py::TestPermission::test_positive_search
tests/foreman/cli/test_contentview.py::TestContentView::test_positive_user_with_all_cv_permissions
tests/foreman/cli/test_contentview.py::TestContentView::test_positive_user_with_all_cv_permissions
tests/foreman/cli/test_rhcloud_inventory.py::test_positive_generate_all_reports_job
tests/foreman/cli/test_role.py::TestRole::test_negative_list_filters_without_parameters
tests/foreman/ui/test_activationkey.py::test_positive_add_host_collection_non_admin
tests/foreman/ui/test_activationkey.py::test_positive_add_host_collection_non_admin
tests/foreman/ui/test_activationkey.py::test_positive_remove_host_collection_non_admin
tests/foreman/ui/test_activationkey.py::test_positive_remove_host_collection_non_admin
tests/foreman/ui/test_contentview.py::test_positive_delete_cv_promoted_to_multi_env
tests/foreman/ui/test_contentview_old.py::test_positive_non_admin_user_actions
tests/foreman/ui/test_hardwaremodel.py::test_positive_end_to_end
tests/foreman/ui/test_host.py::test_positive_remove_parameter_non_admin_user
tests/foreman/ui/test_host.py::test_positive_remove_parameter_non_admin_user
tests/foreman/ui/test_host.py::test_negative_remove_parameter_non_admin_user
tests/foreman/ui/test_host.py::test_positive_check_permissions_affect_create_procedure
tests/foreman/ui/test_jobtemplate.py::test_positive_end_to_end
tests/foreman/ui/test_ldap_authentication.py::test_positive_add_katello_role
tests/foreman/ui/test_ldap_authentication.py::test_positive_update_external_roles
tests/foreman/ui/test_ldap_authentication.py::test_positive_update_external_roles
tests/foreman/ui/test_ldap_authentication.py::test_positive_delete_external_roles
tests/foreman/ui/test_ldap_authentication.py::test_positive_update_external_user_roles
tests/foreman/ui/test_ldap_authentication.py::test_positive_update_external_user_roles
tests/foreman/ui/test_ldap_authentication.py::test_positive_add_foreman_role_with_org_loc
tests/foreman/ui/test_ldap_authentication.py::test_positive_add_katello_role_with_org
tests/foreman/ui/test_ldap_authentication.py::test_positive_login_user_basic_roles
tests/foreman/ui/test_ldap_authentication.py::test_userlist_with_external_admin
tests/foreman/ui/test_ldap_authentication.py::test_positive_group_sync_open_ldap_authsource
tests/foreman/ui/test_rhcloud_inventory.py::test_rhcloud_inventory_without_manifest
tests/foreman/ui/test_role.py::test_positive_create_with_21_filters
tests/foreman/ui/test_templatesync.py::test_positive_export_filtered_templates_to_git
tests/foreman/ui/test_user.py::test_positive_create_product_with_limited_user_permission

@lhellebr
Copy link
Contributor

trigger: test-robottelo
pytest: tests/foreman/api/test_contentcredentials.py::test_positive_block_delete_key_in_use tests/foreman/api/test_contentview.py::test_negative_non_readonly_user_actions tests/foreman/api/test_partitiontable.py::TestPartitionTable::test_negative_update_layout tests/foreman/api/test_partitiontable.py::TestPartitionTable::test_negative_update_layout tests/foreman/api/test_permission.py::TestPermission::test_positive_search_by_resource_type tests/foreman/api/test_permission.py::TestPermission::test_positive_search tests/foreman/api/test_permission.py::TestPermission::test_positive_search tests/foreman/cli/test_contentview.py::TestContentView::test_positive_user_with_all_cv_permissions tests/foreman/cli/test_contentview.py::TestContentView::test_positive_user_with_all_cv_permissions tests/foreman/cli/test_rhcloud_inventory.py::test_positive_generate_all_reports_job tests/foreman/cli/test_role.py::TestRole::test_negative_list_filters_without_parameters tests/foreman/ui/test_activationkey.py::test_positive_add_host_collection_non_admin tests/foreman/ui/test_activationkey.py::test_positive_add_host_collection_non_admin tests/foreman/ui/test_activationkey.py::test_positive_remove_host_collection_non_admin tests/foreman/ui/test_activationkey.py::test_positive_remove_host_collection_non_admin tests/foreman/ui/test_contentview.py::test_positive_delete_cv_promoted_to_multi_env tests/foreman/ui/test_contentview_old.py::test_positive_non_admin_user_actions tests/foreman/ui/test_hardwaremodel.py::test_positive_end_to_end tests/foreman/ui/test_host.py::test_positive_remove_parameter_non_admin_user tests/foreman/ui/test_host.py::test_positive_remove_parameter_non_admin_user tests/foreman/ui/test_host.py::test_negative_remove_parameter_non_admin_user tests/foreman/ui/test_host.py::test_positive_check_permissions_affect_create_procedure tests/foreman/ui/test_jobtemplate.py::test_positive_end_to_end tests/foreman/ui/test_ldap_authentication.py::test_positive_add_katello_role tests/foreman/ui/test_ldap_authentication.py::test_positive_update_external_roles tests/foreman/ui/test_ldap_authentication.py::test_positive_update_external_roles tests/foreman/ui/test_ldap_authentication.py::test_positive_delete_external_roles tests/foreman/ui/test_ldap_authentication.py::test_positive_update_external_user_roles tests/foreman/ui/test_ldap_authentication.py::test_positive_update_external_user_roles tests/foreman/ui/test_ldap_authentication.py::test_positive_add_foreman_role_with_org_loc tests/foreman/ui/test_ldap_authentication.py::test_positive_add_katello_role_with_org tests/foreman/ui/test_ldap_authentication.py::test_positive_login_user_basic_roles tests/foreman/ui/test_ldap_authentication.py::test_userlist_with_external_admin tests/foreman/ui/test_ldap_authentication.py::test_positive_group_sync_open_ldap_authsource tests/foreman/ui/test_rhcloud_inventory.py::test_rhcloud_inventory_without_manifest tests/foreman/ui/test_role.py::test_positive_create_with_21_filters tests/foreman/ui/test_templatesync.py::test_positive_export_filtered_templates_to_git tests/foreman/ui/test_user.py::test_positive_create_product_with_limited_user_permission 

@dosas
Copy link
Collaborator Author

dosas commented Nov 12, 2024

These tests use that variable:

tests/foreman/api/test_contentcredentials.py::test_positive_block_delete_key_in_use
tests/foreman/api/test_contentview.py::test_negative_non_readonly_user_actions
tests/foreman/api/test_partitiontable.py::TestPartitionTable::test_negative_update_layout
tests/foreman/api/test_partitiontable.py::TestPartitionTable::test_negative_update_layout
tests/foreman/api/test_permission.py::TestPermission::test_positive_search_by_resource_type
tests/foreman/api/test_permission.py::TestPermission::test_positive_search
tests/foreman/api/test_permission.py::TestPermission::test_positive_search
tests/foreman/cli/test_contentview.py::TestContentView::test_positive_user_with_all_cv_permissions
tests/foreman/cli/test_contentview.py::TestContentView::test_positive_user_with_all_cv_permissions
tests/foreman/cli/test_rhcloud_inventory.py::test_positive_generate_all_reports_job
tests/foreman/cli/test_role.py::TestRole::test_negative_list_filters_without_parameters
tests/foreman/ui/test_activationkey.py::test_positive_add_host_collection_non_admin
tests/foreman/ui/test_activationkey.py::test_positive_add_host_collection_non_admin
tests/foreman/ui/test_activationkey.py::test_positive_remove_host_collection_non_admin
tests/foreman/ui/test_activationkey.py::test_positive_remove_host_collection_non_admin
tests/foreman/ui/test_contentview.py::test_positive_delete_cv_promoted_to_multi_env
tests/foreman/ui/test_contentview_old.py::test_positive_non_admin_user_actions
tests/foreman/ui/test_hardwaremodel.py::test_positive_end_to_end
tests/foreman/ui/test_host.py::test_positive_remove_parameter_non_admin_user
tests/foreman/ui/test_host.py::test_positive_remove_parameter_non_admin_user
tests/foreman/ui/test_host.py::test_negative_remove_parameter_non_admin_user
tests/foreman/ui/test_host.py::test_positive_check_permissions_affect_create_procedure
tests/foreman/ui/test_jobtemplate.py::test_positive_end_to_end
tests/foreman/ui/test_ldap_authentication.py::test_positive_add_katello_role
tests/foreman/ui/test_ldap_authentication.py::test_positive_update_external_roles
tests/foreman/ui/test_ldap_authentication.py::test_positive_update_external_roles
tests/foreman/ui/test_ldap_authentication.py::test_positive_delete_external_roles
tests/foreman/ui/test_ldap_authentication.py::test_positive_update_external_user_roles
tests/foreman/ui/test_ldap_authentication.py::test_positive_update_external_user_roles
tests/foreman/ui/test_ldap_authentication.py::test_positive_add_foreman_role_with_org_loc
tests/foreman/ui/test_ldap_authentication.py::test_positive_add_katello_role_with_org
tests/foreman/ui/test_ldap_authentication.py::test_positive_login_user_basic_roles
tests/foreman/ui/test_ldap_authentication.py::test_userlist_with_external_admin
tests/foreman/ui/test_ldap_authentication.py::test_positive_group_sync_open_ldap_authsource
tests/foreman/ui/test_rhcloud_inventory.py::test_rhcloud_inventory_without_manifest
tests/foreman/ui/test_role.py::test_positive_create_with_21_filters
tests/foreman/ui/test_templatesync.py::test_positive_export_filtered_templates_to_git
tests/foreman/ui/test_user.py::test_positive_create_product_with_limited_user_permission

Can we run them using PRT?

@lhellebr
Copy link
Contributor

I'm trying, let's see if the job gets picked up

@lhellebr
Copy link
Contributor

There were 15 failures within 42 tests. At the first glance, they don't seem related. I will take a look at the automation results to compare.

Copy link
Contributor

@lhellebr lhellebr left a comment

Choose a reason for hiding this comment

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

They are not regressions. This PR LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.16.z Introduced in or relating directly to Satellite 6.16 CherryPick PR needs CherryPick to previous branches
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants