From 0eb3df931c07b081482c06069088c08789bafc3b Mon Sep 17 00:00:00 2001 From: shwsingh Date: Tue, 9 Apr 2024 19:53:32 +0530 Subject: [PATCH] Mark UI tests as end-to-end for Rocket Team Components --- tests/foreman/ui/test_computeprofiles.py | 1 + tests/foreman/ui/test_computeresource.py | 6 +++--- tests/foreman/ui/test_computeresource_azurerm.py | 7 ++----- tests/foreman/ui/test_computeresource_ec2.py | 1 + tests/foreman/ui/test_computeresource_gce.py | 9 ++++----- tests/foreman/ui/test_computeresource_libvirt.py | 4 ++-- tests/foreman/ui/test_config_group.py | 1 + tests/foreman/ui/test_discoveryrule.py | 2 ++ tests/foreman/ui/test_operatingsystem.py | 1 + tests/foreman/ui/test_puppetclass.py | 1 + tests/foreman/ui/test_puppetenvironment.py | 1 + tests/foreman/ui/test_smartclassparameter.py | 1 + tests/foreman/ui/test_subnet.py | 1 + 13 files changed, 21 insertions(+), 15 deletions(-) diff --git a/tests/foreman/ui/test_computeprofiles.py b/tests/foreman/ui/test_computeprofiles.py index dfe73935f3e..dd1c4556672 100644 --- a/tests/foreman/ui/test_computeprofiles.py +++ b/tests/foreman/ui/test_computeprofiles.py @@ -15,6 +15,7 @@ import pytest +@pytest.mark.e2e @pytest.mark.tier2 @pytest.mark.upgrade def test_positive_end_to_end(session, module_location, module_org, module_target_sat): diff --git a/tests/foreman/ui/test_computeresource.py b/tests/foreman/ui/test_computeresource.py index abbc088aa47..3afcc423fb4 100644 --- a/tests/foreman/ui/test_computeresource.py +++ b/tests/foreman/ui/test_computeresource.py @@ -47,7 +47,7 @@ def rhev_data(): @pytest.mark.tier2 -def test_positive_end_to_end(session, rhev_data, module_org, module_location, module_target_sat): +def test_positive_end_to_end(session, rhev_data, module_target_sat): """Perform end to end testing for compute resource RHEV. :id: 3c079675-e5d3-490e-9b7e-1c2950f9965d @@ -288,7 +288,6 @@ def test_positive_VM_import(session, module_org, module_location, rhev_data, mod name = gen_string('alpha') with session: - session.computeresource.create( { 'name': name, @@ -361,8 +360,9 @@ def test_positive_update_organization(session, rhev_data, module_location, modul assert new_organization.name in resource_values['organizations']['resources']['assigned'] +@pytest.mark.e2e @pytest.mark.tier2 -def test_positive_image_end_to_end(session, rhev_data, module_location, target_sat): +def test_positive_image_end_to_end(session, rhev_data, target_sat): """Perform end to end testing for compute resource RHV component image. :id: 62a5c52f-dd15-45e7-8200-c64bb335474f diff --git a/tests/foreman/ui/test_computeresource_azurerm.py b/tests/foreman/ui/test_computeresource_azurerm.py index 36228513ffa..163319d4dd3 100644 --- a/tests/foreman/ui/test_computeresource_azurerm.py +++ b/tests/foreman/ui/test_computeresource_azurerm.py @@ -73,14 +73,13 @@ def module_azure_hg( ).create() +@pytest.mark.e2e @pytest.mark.tier4 @pytest.mark.parametrize('sat_azure', ['sat'], indirect=True) def test_positive_end_to_end_azurerm_ft_host_provision( - session, sat_azure, azurermclient, module_azurerm_custom_finishimg, - module_azurerm_cr, sat_azure_domain, sat_azure_org, sat_azure_loc, @@ -150,19 +149,17 @@ def test_positive_end_to_end_azurerm_ft_host_provision( raise error +@pytest.mark.e2e @pytest.mark.tier3 @pytest.mark.upgrade @pytest.mark.parametrize( 'sat_azure', ['sat', 'puppet_sat'], indirect=True, ids=['satellite', 'puppet_enabled'] ) def test_positive_azurerm_host_provision_ud( - session, sat_azure, azurermclient, module_azurerm_cloudimg, - module_azurerm_cr, sat_azure_domain, - sat_azure_default_os, sat_azure_org, sat_azure_loc, module_azure_hg, diff --git a/tests/foreman/ui/test_computeresource_ec2.py b/tests/foreman/ui/test_computeresource_ec2.py index 0d08685543c..0426272fe7b 100644 --- a/tests/foreman/ui/test_computeresource_ec2.py +++ b/tests/foreman/ui/test_computeresource_ec2.py @@ -39,6 +39,7 @@ def module_ec2_settings(): ) +@pytest.mark.e2e @pytest.mark.tier2 @pytest.mark.skip_if_not_set('http_proxy') @pytest.mark.skip_if_open("BZ:2032530") diff --git a/tests/foreman/ui/test_computeresource_gce.py b/tests/foreman/ui/test_computeresource_gce.py index a25edb1da44..18413a4dd94 100644 --- a/tests/foreman/ui/test_computeresource_gce.py +++ b/tests/foreman/ui/test_computeresource_gce.py @@ -28,11 +28,12 @@ ) +@pytest.mark.e2e @pytest.mark.tier2 @pytest.mark.upgrade @pytest.mark.skip_if_not_set('http_proxy', 'gce') def test_positive_default_end_to_end_with_custom_profile( - session, sat_gce_org, sat_gce_loc, gce_cert, sat_gce + sat_gce_org, sat_gce_loc, gce_cert, sat_gce ): """Create GCE compute resource with default properties and apply it's basic functionality. @@ -139,12 +140,12 @@ def test_positive_default_end_to_end_with_custom_profile( assert not session.computeresource.search(new_cr_name) +@pytest.mark.e2e @pytest.mark.tier4 @pytest.mark.run_in_one_thread @pytest.mark.skip_if_not_set('gce') @pytest.mark.parametrize('sat_gce', ['sat', 'puppet_sat'], indirect=True) def test_positive_gce_provision_end_to_end( - session, request, sat_gce, sat_gce_org, @@ -153,7 +154,6 @@ def test_positive_gce_provision_end_to_end( gce_domain, gce_hostgroup_resource_image, googleclient, - gce_setting_update, ): """Provision Host on GCE compute resource @@ -224,13 +224,13 @@ def _finalize(): assert gceapi_vm.is_stopping or gceapi_vm.is_stopped +@pytest.mark.e2e @pytest.mark.tier4 @pytest.mark.upgrade @pytest.mark.run_in_one_thread @pytest.mark.skip_if_not_set('gce') @pytest.mark.parametrize('sat_gce', ['sat', 'puppet_sat'], indirect=True) def test_positive_gce_cloudinit_provision_end_to_end( - session, request, sat_gce, sat_gce_org, @@ -239,7 +239,6 @@ def test_positive_gce_cloudinit_provision_end_to_end( gce_domain, gce_hostgroup_resource_image, googleclient, - gce_setting_update, ): """Provision Host on GCE compute resource diff --git a/tests/foreman/ui/test_computeresource_libvirt.py b/tests/foreman/ui/test_computeresource_libvirt.py index 42477b8d46a..867348ca68b 100644 --- a/tests/foreman/ui/test_computeresource_libvirt.py +++ b/tests/foreman/ui/test_computeresource_libvirt.py @@ -117,13 +117,13 @@ def test_positive_end_to_end(session, module_target_sat, module_org, module_loca assert not session.computeresource.search(new_cr_name) +@pytest.mark.e2e @pytest.mark.on_premises_provisioning @pytest.mark.tier4 @pytest.mark.rhel_ver_match('[^6]') @pytest.mark.parametrize('setting_update', ['destroy_vm_on_host_delete=True'], indirect=True) def test_positive_provision_end_to_end( request, - session, setting_update, module_sca_manifest_org, module_location, @@ -154,7 +154,7 @@ def test_positive_provision_end_to_end( location=[module_location], organization=[module_sca_manifest_org], ).create() - with session: + with sat.ui_session() as session: session.host.create( { 'host.name': hostname, diff --git a/tests/foreman/ui/test_config_group.py b/tests/foreman/ui/test_config_group.py index b38384d2977..9bf49ed1e1d 100644 --- a/tests/foreman/ui/test_config_group.py +++ b/tests/foreman/ui/test_config_group.py @@ -20,6 +20,7 @@ def module_puppet_class(session_puppet_enabled_sat): return session_puppet_enabled_sat.api.PuppetClass().create() +@pytest.mark.e2e @pytest.mark.tier2 @pytest.mark.upgrade def test_positive_end_to_end(session_puppet_enabled_sat, module_puppet_class): diff --git a/tests/foreman/ui/test_discoveryrule.py b/tests/foreman/ui/test_discoveryrule.py index 83ab23cbcc2..e49083d3300 100644 --- a/tests/foreman/ui/test_discoveryrule.py +++ b/tests/foreman/ui/test_discoveryrule.py @@ -62,6 +62,7 @@ def gen_int32(min_value=1): return gen_integer(min_value=min_value, max_value=max_value) +@pytest.mark.e2e @pytest.mark.tier2 def test_positive_crud_with_non_admin_user( module_location, manager_user, module_org, module_target_sat @@ -231,6 +232,7 @@ def test_positive_list_host_based_on_rule_search_query( assert values['properties']['properties_table']['IP Address'] == ip_address +@pytest.mark.e2e @pytest.mark.tier3 @pytest.mark.upgrade def test_positive_end_to_end(session, module_org, module_location, module_target_sat): diff --git a/tests/foreman/ui/test_operatingsystem.py b/tests/foreman/ui/test_operatingsystem.py index 1324b556230..d3b35faed0b 100644 --- a/tests/foreman/ui/test_operatingsystem.py +++ b/tests/foreman/ui/test_operatingsystem.py @@ -17,6 +17,7 @@ from robottelo.utils.datafactory import gen_string +@pytest.mark.e2e @pytest.mark.tier2 def test_positive_end_to_end(session, module_org, module_location, target_sat): """Create all possible entities that required for operating system and then diff --git a/tests/foreman/ui/test_puppetclass.py b/tests/foreman/ui/test_puppetclass.py index b44ad73e7a7..776d3e7845b 100644 --- a/tests/foreman/ui/test_puppetclass.py +++ b/tests/foreman/ui/test_puppetclass.py @@ -15,6 +15,7 @@ import pytest +@pytest.mark.e2e @pytest.mark.tier2 @pytest.mark.upgrade def test_positive_end_to_end(session_puppet_enabled_sat, module_puppet_org, module_puppet_loc): diff --git a/tests/foreman/ui/test_puppetenvironment.py b/tests/foreman/ui/test_puppetenvironment.py index 57502a51191..6a656b65ffb 100644 --- a/tests/foreman/ui/test_puppetenvironment.py +++ b/tests/foreman/ui/test_puppetenvironment.py @@ -17,6 +17,7 @@ from robottelo.utils.datafactory import gen_string +@pytest.mark.e2e @pytest.mark.upgrade @pytest.mark.tier2 def test_positive_end_to_end(session_puppet_enabled_sat, module_puppet_org, module_puppet_loc): diff --git a/tests/foreman/ui/test_smartclassparameter.py b/tests/foreman/ui/test_smartclassparameter.py index adc5169f2ae..081a2985d14 100644 --- a/tests/foreman/ui/test_smartclassparameter.py +++ b/tests/foreman/ui/test_smartclassparameter.py @@ -65,6 +65,7 @@ def module_domain(session_puppet_enabled_sat, module_host): return session_puppet_enabled_sat.api.Domain(id=module_host.domain.id).read() +@pytest.mark.e2e @pytest.mark.tier2 def test_positive_end_to_end(session_puppet_enabled_sat, module_puppet_classes, sc_params_list): """Perform end to end testing for smart class parameter component diff --git a/tests/foreman/ui/test_subnet.py b/tests/foreman/ui/test_subnet.py index 45886c3ec86..3994d8a7b45 100644 --- a/tests/foreman/ui/test_subnet.py +++ b/tests/foreman/ui/test_subnet.py @@ -26,6 +26,7 @@ def module_dom(module_target_sat, module_org, module_location): d.delete() +@pytest.mark.e2e @pytest.mark.tier2 @pytest.mark.upgrade def test_positive_end_to_end(session, module_target_sat, module_dom):