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

Mark UI tests as end-to-end for Rocket Team Components #14702

Merged
merged 1 commit into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion tests/foreman/cli/test_leapp_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
:Team: Rocket
:CaseImportance: High
:CaseImportance: Critical
:CaseAutomation: Automated
Expand Down Expand Up @@ -219,6 +219,7 @@ def precondition_check_upgrade_and_install_leapp_tool(custom_leapp_host):
)


@pytest.mark.e2e
@pytest.mark.skip_if_open('SAT-24023')
@pytest.mark.parametrize(
'upgrade_path',
Expand Down Expand Up @@ -300,6 +301,7 @@ def test_leapp_upgrade_rhel(
assert new_ver == upgrade_path['target_version']


@pytest.mark.e2e
@pytest.mark.skip_if_open('SAT-24023')
@pytest.mark.parametrize(
'upgrade_path',
Expand Down
1 change: 1 addition & 0 deletions tests/foreman/ui/test_computeprofiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,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):
Expand Down
5 changes: 3 additions & 2 deletions tests/foreman/ui/test_computeresource.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def rhev_data():


@pytest.mark.tier2
def test_positive_end_to_end(session, rhev_data, module_org, module_location, module_target_sat):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Instead of removing the use of module_org, module_location here, why not consider using it to verify CR creation into specific org and location rather than default org/location?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Any changes to the code is not the scope of this PR. I would rather make this update in separate PR. I have removed only those fixtures which are not used in the test.

Copy link
Collaborator

Choose a reason for hiding this comment

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

yes, right, but you're modifying the existing usage of fixtures, which is also not in scope of the fixtures :)
so I'd recommend either using module_org, module_location here instead of removing this fixture use OR we can remove this change from this PR itself to avoid code modification

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am not modifying any usage of fixtures, I am just removing the unused fixtures from the test.

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
Expand Down Expand Up @@ -361,8 +361,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
Expand Down
4 changes: 2 additions & 2 deletions tests/foreman/ui/test_computeresource_azurerm.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ 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,
Expand Down Expand Up @@ -151,13 +151,13 @@ 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,
Expand Down
1 change: 1 addition & 0 deletions tests/foreman/ui/test_computeresource_ec2.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,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")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we remove this skip_if_open("BZ:2032530"), as its already closed as wontfix since long

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We need to modify/update the test to make it work. I would remove this once we update the test.

Expand Down
7 changes: 4 additions & 3 deletions tests/foreman/ui/test_computeresource_gce.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,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.
Expand Down Expand Up @@ -140,12 +141,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,
Expand Down Expand Up @@ -225,13 +226,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,
Expand Down
6 changes: 4 additions & 2 deletions tests/foreman/ui/test_computeresource_libvirt.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,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,
Expand Down Expand Up @@ -155,7 +155,9 @@ def test_positive_provision_end_to_end(
location=[module_location],
organization=[module_sca_manifest_org],
).create()
with session:
with sat.ui_session() as session:
shweta83 marked this conversation as resolved.
Show resolved Hide resolved
session.organization.select(module_sca_manifest_org.name)
session.location.select(module_location.name)
session.host.create(
{
'host.name': hostname,
Expand Down
1 change: 1 addition & 0 deletions tests/foreman/ui/test_config_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,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):
Expand Down
2 changes: 2 additions & 0 deletions tests/foreman/ui/test_discoveryrule.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,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
Expand Down Expand Up @@ -232,6 +233,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):
Expand Down
1 change: 1 addition & 0 deletions tests/foreman/ui/test_operatingsystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,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
Expand Down
1 change: 1 addition & 0 deletions tests/foreman/ui/test_puppetclass.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,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):
Expand Down
1 change: 1 addition & 0 deletions tests/foreman/ui/test_puppetenvironment.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,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):
Expand Down
1 change: 1 addition & 0 deletions tests/foreman/ui/test_smartclassparameter.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,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
Expand Down
1 change: 1 addition & 0 deletions tests/foreman/ui/test_subnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,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):
Expand Down
Loading