diff --git a/cfme/markers/rhv.py b/cfme/markers/rhv.py deleted file mode 100644 index 7e3ad4b2d1..0000000000 --- a/cfme/markers/rhv.py +++ /dev/null @@ -1,73 +0,0 @@ -""" -This marker is used for purposes of RHV - CFME integration. - -Tests can be marked like this: - -.. code-block:: python - - @pytest.mark.rhv2 - def test_something(): - assert True - -Usage on CLI:: - - pytest -m 'rhv1' # Run only tier 1 - pytest -m 'rhv1 or rhv2 or rhv3' # Run all the tiers - pytest -m 'not rhv3' # Run all test methods except for RHV tier 3 - pytest -m 'not rhv1 and not rhv2 and not rhv3' # Run everything that is not marked with rhv1-3 - -To test this module:: - - pytest -p pytester markers/rhv.py -""" -from cfme.fixtures.pytest_store import store - - -RHV_CFME_TIERS = (1, 2, 3) - - -def pytest_configure(config): - for tier in RHV_CFME_TIERS: - config.addinivalue_line("markers", "rhv{t}: Run tier {t} of RHV-CFME tests.".format(t=tier)) - - -def test_rhv_markers(testdir): - - testdir.makepyfile(""" - import pytest - - @pytest.mark.rhv1 - def test_rhv_marker_tier_1(): - assert True - - @pytest.mark.rhv2 - def test_rhv_marker_tier_2(): - assert True - - @pytest.mark.rhv3 - def test_rhv_marker_tier_3(): - assert True - - def test_without_marker(): - assert False - """) - - testdir.runpytest("-m rhv1", "--strict").assert_outcomes(passed=1) - testdir.runpytest("-m rhv1 or rhv2 or rhv3", "--strict").assert_outcomes(passed=3) - testdir.runpytest("-m not rhv3", "--strict").assert_outcomes(passed=2, failed=1) - testdir.runpytest("-m not rhv1 and not rhv2 and not rhv3", "--strict").assert_outcomes(failed=1) - - -def pytest_runtest_logreport(report): - """Add RHV tier (e.g. "rhv1" to XML report as a property.""" - if report.when != 'setup': - return - xml = getattr(store.config, '_xml', None) - if xml is None: - return - reporter = xml.node_reporter(report) - for tier in RHV_CFME_TIERS: - tier_marker = f'rhv{tier}' - if report.keywords.get(tier_marker): - reporter.add_property('rhv_tier', tier_marker) - break diff --git a/cfme/tests/automate/test_common_methods.py b/cfme/tests/automate/test_common_methods.py index aaf50a749d..a3ad366e73 100644 --- a/cfme/tests/automate/test_common_methods.py +++ b/cfme/tests/automate/test_common_methods.py @@ -41,7 +41,6 @@ def generate_retirement_date(delta=None): return gen_date -@pytest.mark.rhv3 @pytest.mark.tier(3) @pytest.mark.parametrize('create_vm', ['small_template'], indirect=True) def test_vm_retire_extend(appliance, request, create_vm, soft_assert): diff --git a/cfme/tests/candu/test_utilization_metrics.py b/cfme/tests/candu/test_utilization_metrics.py index 76644130da..8fbf4f8345 100644 --- a/cfme/tests/candu/test_utilization_metrics.py +++ b/cfme/tests/candu/test_utilization_metrics.py @@ -122,7 +122,6 @@ def query_metric_db(appliance, provider, metric, vm_name=None, host_name=None): metrics_tbl.id.in_(provs.subquery())) -@pytest.mark.rhv2 @pytest.mark.meta(automates=[1671580, 1722937]) @pytest.mark.meta( blockers=[BZ(1744845, forced_streams=['5.10'], @@ -152,7 +151,6 @@ def test_raw_metric_vm_cpu(metrics_collection, appliance, provider): break -@pytest.mark.rhv2 @pytest.mark.meta(automates=[1671580, 1722937]) @pytest.mark.meta( blockers=[BZ(1724415, forced_streams=['5.10', '5.11'], @@ -183,7 +181,6 @@ def test_raw_metric_vm_memory(metrics_collection, appliance, provider): break -@pytest.mark.rhv2 @pytest.mark.meta(automates=[1671580, 1722937]) @pytest.mark.meta( blockers=[BZ(1744845, forced_streams=['5.10'], @@ -206,7 +203,6 @@ def test_raw_metric_vm_network(metrics_collection, appliance, provider): break -@pytest.mark.rhv2 @pytest.mark.provider( [VMwareProvider, RHEVMProvider, OpenStackProvider, AzureProvider, GCEProvider], required_fields=[(['cap_and_util', 'capandu_vm'], 'cu-24x7')], @@ -235,7 +231,6 @@ def test_raw_metric_vm_disk(metrics_collection, appliance, provider): break -@pytest.mark.rhv2 @pytest.mark.provider( [VMwareProvider, RHEVMProvider], required_fields=[(['cap_and_util', 'capandu_vm'], 'cu-24x7')], @@ -258,7 +253,6 @@ def test_raw_metric_host_cpu(metrics_collection, appliance, provider): break -@pytest.mark.rhv2 @pytest.mark.provider( [VMwareProvider, RHEVMProvider], required_fields=[(['cap_and_util', 'capandu_vm'], 'cu-24x7')], @@ -282,7 +276,6 @@ def test_raw_metric_host_memory(metrics_collection, appliance, provider): break -@pytest.mark.rhv2 @pytest.mark.provider( [VMwareProvider, RHEVMProvider], required_fields=[(['cap_and_util', 'capandu_vm'], 'cu-24x7')], @@ -305,7 +298,6 @@ def test_raw_metric_host_network(metrics_collection, appliance, provider): break -@pytest.mark.rhv2 @pytest.mark.provider( [VMwareProvider, RHEVMProvider], required_fields=[(['cap_and_util', 'capandu_vm'], 'cu-24x7')], diff --git a/cfme/tests/cloud_infra_common/test_cloud_init_provisioning.py b/cfme/tests/cloud_infra_common/test_cloud_init_provisioning.py index f55d25f7b1..de8fcf699d 100644 --- a/cfme/tests/cloud_infra_common/test_cloud_init_provisioning.py +++ b/cfme/tests/cloud_infra_common/test_cloud_init_provisioning.py @@ -57,7 +57,6 @@ def vm_name(): return random_vm_name('ci') -@pytest.mark.rhv2 @pytest.mark.tier(3) @test_requirements.provision def test_provision_cloud_init(appliance, request, setup_provider, provider, provisioning, @@ -121,7 +120,6 @@ def test_provision_cloud_init(appliance, request, setup_provider, provider, prov wait_for(ssh_client.uptime, num_sec=200, handle_exception=True) -@pytest.mark.rhv3 @test_requirements.provision @pytest.mark.provider([RHEVMProvider]) def test_provision_cloud_init_payload(appliance, request, setup_provider, provider, provisioning, diff --git a/cfme/tests/cloud_infra_common/test_cockpit_server.py b/cfme/tests/cloud_infra_common/test_cockpit_server.py index 373427d96e..0de95dd3a7 100644 --- a/cfme/tests/cloud_infra_common/test_cockpit_server.py +++ b/cfme/tests/cloud_infra_common/test_cockpit_server.py @@ -13,7 +13,6 @@ pytestmark = [test_requirements.cockpit] -@pytest.mark.rhv3 @pytest.mark.provider( gen_func=providers, filters=[ diff --git a/cfme/tests/cloud_infra_common/test_custom_attributes_rest.py b/cfme/tests/cloud_infra_common/test_custom_attributes_rest.py index dd8b26a12e..d9c8fb6812 100644 --- a/cfme/tests/cloud_infra_common/test_custom_attributes_rest.py +++ b/cfme/tests/cloud_infra_common/test_custom_attributes_rest.py @@ -15,7 +15,6 @@ pytest.mark.tier(2), pytest.mark.provider([CloudProvider, InfraProvider], scope='module'), test_requirements.rest, - pytest.mark.rhv3 ] COLLECTIONS = ['providers', 'vms', 'instances', 'services'] @@ -127,7 +126,6 @@ class TestCustomAttributesRESTAPI: @pytest.mark.uncollectif(lambda provider, collection_name: _uncollect(provider, collection_name), reason=GENERIC_UNCOLLECT) - @pytest.mark.rhv2 @pytest.mark.parametrize("collection_name", COLLECTIONS) def test_add(self, request, collection_name, get_resource): """Test adding custom attributes to resource using REST API. diff --git a/cfme/tests/cloud_infra_common/test_discovery_and_support.py b/cfme/tests/cloud_infra_common/test_discovery_and_support.py index ffc7bb6c0f..39439943b3 100644 --- a/cfme/tests/cloud_infra_common/test_discovery_and_support.py +++ b/cfme/tests/cloud_infra_common/test_discovery_and_support.py @@ -10,7 +10,6 @@ from cfme.utils.wait import TimedOutError -@pytest.mark.rhv2 @pytest.mark.tier(2) @test_requirements.power @pytest.mark.provider( diff --git a/cfme/tests/cloud_infra_common/test_events.py b/cfme/tests/cloud_infra_common/test_events.py index 2c06bacdcd..f0ff86ca6d 100644 --- a/cfme/tests/cloud_infra_common/test_events.py +++ b/cfme/tests/cloud_infra_common/test_events.py @@ -37,7 +37,6 @@ def vm_crud(provider, setup_provider_modscope, small_template_modscope): vm.cleanup_on_provider() -@pytest.mark.rhv2 def test_vm_create(request, appliance, vm_crud, provider, register_event): """ Test whether vm_create_complete event is emitted. diff --git a/cfme/tests/cloud_infra_common/test_html5_vm_console.py b/cfme/tests/cloud_infra_common/test_html5_vm_console.py index 079aa4fa0d..37da6c7035 100644 --- a/cfme/tests/cloud_infra_common/test_html5_vm_console.py +++ b/cfme/tests/cloud_infra_common/test_html5_vm_console.py @@ -35,7 +35,6 @@ def test_html5_console_ports_present(appliance, setup_provider, provider): assert edit_view.vnc_end_port.is_displayed -@pytest.mark.rhv1 @test_requirements.html5 @pytest.mark.provider([CloudProvider, InfraProvider], required_flags=['html5_console']) @pytest.mark.parametrize('create_vm', ['console_template'], indirect=True) diff --git a/cfme/tests/cloud_infra_common/test_power_control_rest.py b/cfme/tests/cloud_infra_common/test_power_control_rest.py index bf3326e40e..3e1365c9b0 100644 --- a/cfme/tests/cloud_infra_common/test_power_control_rest.py +++ b/cfme/tests/cloud_infra_common/test_power_control_rest.py @@ -56,7 +56,6 @@ def verify_action_result(rest_api, assert_success=True): return success, message -@pytest.mark.rhv2 @pytest.mark.parametrize('create_vm', ['small_template'], indirect=True) def test_stop_vm_rest(appliance, create_vm, ensure_vm_running, soft_assert, from_detail): """Test stop of vm @@ -94,7 +93,6 @@ def test_stop_vm_rest(appliance, create_vm, ensure_vm_running, soft_assert, from soft_assert(not verify_vm_power_state(vm, create_vm.STATE_ON), "vm still running") -@pytest.mark.rhv2 @pytest.mark.parametrize('create_vm', ['small_template'], indirect=True) def test_start_vm_rest(appliance, create_vm, ensure_vm_stopped, soft_assert, from_detail): """Test start vm @@ -132,7 +130,6 @@ def test_start_vm_rest(appliance, create_vm, ensure_vm_stopped, soft_assert, fro soft_assert(verify_vm_power_state(vm, create_vm.STATE_ON), "vm not running") -@pytest.mark.rhv2 @pytest.mark.parametrize('create_vm', ['small_template'], indirect=True) def test_suspend_vm_rest(appliance, create_vm, ensure_vm_running, soft_assert, from_detail): """Test suspend vm diff --git a/cfme/tests/cloud_infra_common/test_provisioning.py b/cfme/tests/cloud_infra_common/test_provisioning.py index 6f0bab2b79..cb5deea94a 100644 --- a/cfme/tests/cloud_infra_common/test_provisioning.py +++ b/cfme/tests/cloud_infra_common/test_provisioning.py @@ -169,7 +169,6 @@ def check_subjects(): message='Some expected subjects not found in the received emails subjects.') -@pytest.mark.rhv2 @pytest.mark.meta(automates=[1472844, 1676910]) @pytest.mark.parametrize("action", ["edit", "approve", "deny"]) def test_provision_approval(appliance, provider, vm_name, smtp_test, request, diff --git a/cfme/tests/cloud_infra_common/test_relationships.py b/cfme/tests/cloud_infra_common/test_relationships.py index c6344368ca..9fe5863e2d 100644 --- a/cfme/tests/cloud_infra_common/test_relationships.py +++ b/cfme/tests/cloud_infra_common/test_relationships.py @@ -131,7 +131,6 @@ def host(appliance, provider): @test_requirements.relationships -@pytest.mark.rhv3 @pytest.mark.parametrize("relationship,view", HOST_RELATIONSHIPS, ids=[rel[0] for rel in HOST_RELATIONSHIPS]) @pytest.mark.provider([InfraProvider], selector=ONE_PER_TYPE) @@ -155,7 +154,6 @@ def test_host_relationships(appliance, provider, setup_provider, host, relations @test_requirements.relationships -@pytest.mark.rhv3 @pytest.mark.parametrize("relationship,view", INFRA_PROVIDER_RELATIONSHIPS, ids=[rel[0] for rel in INFRA_PROVIDER_RELATIONSHIPS]) @pytest.mark.provider([InfraProvider], selector=ONE_PER_TYPE) @@ -281,7 +279,6 @@ def test_tagvis_cloud_provider_children(prov_child_visibility, setup_provider, r @test_requirements.relationships -@pytest.mark.rhv1 @pytest.mark.provider([CloudProvider, InfraProvider]) @pytest.mark.tier(1) @pytest.mark.meta( @@ -315,7 +312,6 @@ def test_provider_refresh_relationship(provider, setup_provider): @test_requirements.relationships -@pytest.mark.rhv2 @pytest.mark.provider([InfraProvider]) def test_host_refresh_relationships(provider, setup_provider): """ Test that host refresh doesn't fail @@ -339,7 +335,6 @@ def test_host_refresh_relationships(provider, setup_provider): provider.wait_for_relationship_refresh() -@pytest.mark.rhv3 @pytest.mark.provider([InfraProvider]) @pytest.mark.meta(automates=[BZ(1732349)]) def test_template_refresh_relationships(appliance, provider, setup_provider): diff --git a/cfme/tests/cloud_infra_common/test_rest_providers.py b/cfme/tests/cloud_infra_common/test_rest_providers.py index 7e362d7ee5..a1b37dfaaf 100644 --- a/cfme/tests/cloud_infra_common/test_rest_providers.py +++ b/cfme/tests/cloud_infra_common/test_rest_providers.py @@ -46,7 +46,6 @@ def provider_rest(request, appliance, provider): return provider_rest -@pytest.mark.rhv1 def test_query_provider_attributes(provider, provider_rest, soft_assert): """Tests access to attributes of /api/providers. @@ -70,7 +69,6 @@ def test_query_provider_attributes(provider, provider_rest, soft_assert): failure.type, failure.name, failure.response.status_code, failure.error)) -@pytest.mark.rhv3 def test_provider_options(appliance): """Tests that provider settings are present in OPTIONS listing. @@ -87,7 +85,6 @@ def test_provider_options(appliance): assert 'provider_settings' in options['data'] -@pytest.mark.rhv3 def test_create_provider(provider_rest): """Tests creating provider using REST API. @@ -103,7 +100,6 @@ def test_create_provider(provider_rest): assert "ManageIQ::Providers::" in provider_rest.type -@pytest.mark.rhv1 def test_provider_refresh(provider_rest, appliance): """Test checking that refresh invoked from the REST API works. @@ -140,7 +136,6 @@ def _refresh_success(): assert task.status.lower() == "ok", f"Task failed with status '{task.status}'" -@pytest.mark.rhv3 def test_provider_edit(request, provider_rest, appliance): """Test editing a provider using REST API. @@ -162,7 +157,6 @@ def test_provider_edit(request, provider_rest, appliance): assert provider_rest.name == new_name == edited.name -@pytest.mark.rhv3 @pytest.mark.parametrize("method", ["post", "delete"], ids=["POST", "DELETE"]) def test_provider_delete_from_detail(provider_rest, method): """Tests deletion of the provider from detail using REST API. @@ -183,7 +177,6 @@ def test_provider_delete_from_detail(provider_rest, method): delete_resources_from_detail([provider_rest], method=method, num_sec=50) -@pytest.mark.rhv3 def test_provider_delete_from_collection(provider_rest): """Tests deletion of the provider from collection using REST API. diff --git a/cfme/tests/cloud_infra_common/test_retirement.py b/cfme/tests/cloud_infra_common/test_retirement.py index 6113e5032f..6f4681db2f 100644 --- a/cfme/tests/cloud_infra_common/test_retirement.py +++ b/cfme/tests/cloud_infra_common/test_retirement.py @@ -122,7 +122,6 @@ def generate_retirement_date(delta=9): return gen_date -@pytest.mark.rhv1 @pytest.mark.meta(automates=[1518926, 1565128]) def test_retirement_now(create_vm): """Test on-demand retirement of a VM/Instance. @@ -154,7 +153,6 @@ def test_retirement_now(create_vm): verify_retirement_date(create_vm, expected_date=expected_date) -@pytest.mark.rhv1 @pytest.mark.parametrize('create_vms', [{'template_type': 'small_template', 'num_vms': 2}], ids=['small_template-two_vms'], @@ -230,7 +228,6 @@ def test_retirement_now_ec2_instance_backed(create_vm, tagged, appliance): verify_retirement_date(create_vm, expected_date=expected_date) -@pytest.mark.rhv3 @pytest.mark.parametrize('warn', warnings, ids=[warning.id for warning in warnings]) def test_set_retirement_date(create_vm, warn): """Tests setting retirement date and verifies configured date is reflected in UI @@ -254,7 +251,6 @@ def test_set_retirement_date(create_vm, warn): verify_retirement_date(create_vm, expected_date=expected_date) -@pytest.mark.rhv3 @pytest.mark.parametrize('warn', warnings, ids=[warning.id for warning in warnings]) @pytest.mark.parametrize('create_vms', [{'template_type': 'small_template', 'num_vms': 2}], @@ -320,7 +316,6 @@ def test_set_retirement_offset(create_vm, warn): verify_retirement_date(create_vm, expected_date=expected_date) -@pytest.mark.rhv3 @pytest.mark.parametrize('warn', warnings, ids=[warning.id for warning in warnings]) @pytest.mark.parametrize('create_vms', [{'template_type': 'small_template', 'num_vms': 2}], @@ -362,7 +357,6 @@ def test_set_retirement_offset_multiple(create_vms, provider, warn): verify_retirement_date(vm, expected_date=expected_date) -@pytest.mark.rhv3 def test_unset_retirement_date(create_vm): """Tests cancelling a scheduled retirement by removing the set date @@ -393,7 +387,6 @@ def test_unset_retirement_date(create_vm): verify_retirement_date(create_vm, expected_date='Never') -@pytest.mark.rhv3 @pytest.mark.tier(2) @pytest.mark.parametrize('remove_date', [True, False], ids=['remove_date', 'set_future_date']) def test_resume_retired_instance(create_vm, provider, remove_date): diff --git a/cfme/tests/cloud_infra_common/test_snapshots_rest.py b/cfme/tests/cloud_infra_common/test_snapshots_rest.py index 7b2f7787cb..0cd1f6205f 100644 --- a/cfme/tests/cloud_infra_common/test_snapshots_rest.py +++ b/cfme/tests/cloud_infra_common/test_snapshots_rest.py @@ -104,7 +104,6 @@ def vm_snapshot(appliance, vm): class TestRESTSnapshots: """Tests actions with VM/instance snapshots using REST API.""" - @pytest.mark.rhv2 def test_create_snapshot(self, vm_snapshot): """Creates VM/instance snapshot using REST API. @@ -120,7 +119,6 @@ def test_create_snapshot(self, vm_snapshot): vm, snapshot = vm_snapshot vm.snapshots.get(description=snapshot.description) - @pytest.mark.rhv3 @pytest.mark.parametrize('method', ['post', 'delete'], ids=['POST', 'DELETE']) def test_delete_snapshot_from_detail(self, vm_snapshot, method): """Deletes VM/instance snapshot from detail using REST API. @@ -139,7 +137,6 @@ def test_delete_snapshot_from_detail(self, vm_snapshot, method): __, snapshot = vm_snapshot delete_resources_from_detail([snapshot], method=method, num_sec=300, delay=5) - @pytest.mark.rhv3 def test_delete_snapshot_from_collection(self, vm_snapshot): """Deletes VM/instance snapshot from collection using REST API. @@ -189,7 +186,6 @@ def test_delete_snapshot_race(self, request, appliance, collection, vm, vm_snaps if 'Please wait for the operation to finish' not in str(err): raise - @pytest.mark.rhv2 @pytest.mark.provider([VMwareProvider, RHEVMProvider], scope='module') def test_revert_snapshot(self, appliance, provider, vm_snapshot): """Reverts VM/instance snapshot using REST API. diff --git a/cfme/tests/cloud_infra_common/test_tag_visibility.py b/cfme/tests/cloud_infra_common/test_tag_visibility.py index 1137a0bcfb..f1f9d8bda6 100644 --- a/cfme/tests/cloud_infra_common/test_tag_visibility.py +++ b/cfme/tests/cloud_infra_common/test_tag_visibility.py @@ -30,7 +30,6 @@ def tagged_vm(tag, provider): tag_vm.remove_tag(tag=tag) -@pytest.mark.rhv3 def test_tag_vis_vm(tagged_vm, user_restricted): """ Polarion: diff --git a/cfme/tests/cloud_infra_common/test_vm_instance_analysis.py b/cfme/tests/cloud_infra_common/test_vm_instance_analysis.py index daeb699a3b..1f53e521e7 100644 --- a/cfme/tests/cloud_infra_common/test_vm_instance_analysis.py +++ b/cfme/tests/cloud_infra_common/test_vm_instance_analysis.py @@ -538,7 +538,6 @@ def _compare_windows_vm_data(ssa_vm): return _compare_windows_vm_data -@pytest.mark.rhv2 @pytest.mark.tier(1) def test_ssa_template(local_setup_provider, provider, soft_assert, vm_analysis_provisioning_data, appliance, ssa_vm, compare_windows_vm_data): @@ -625,7 +624,6 @@ def test_ssa_compliance(local_setup_provider, ssa_compliance_profile, ssa_vm, compare_windows_vm_data(ssa_vm) -@pytest.mark.rhv3 @pytest.mark.tier(2) def test_ssa_schedule(ssa_vm, schedule_ssa, soft_assert, vm_system_type, compare_linux_vm_data, compare_windows_vm_data): @@ -663,7 +661,6 @@ def test_ssa_schedule(ssa_vm, schedule_ssa, soft_assert, vm_system_type, compare_windows_vm_data(ssa_vm) -@pytest.mark.rhv1 @pytest.mark.tier(2) def test_ssa_vm(ssa_vm, scanned_vm, soft_assert, vm_system_type, compare_linux_vm_data, compare_windows_vm_data): @@ -701,7 +698,6 @@ def test_ssa_vm(ssa_vm, scanned_vm, soft_assert, vm_system_type, compare_windows_vm_data(ssa_vm) -@pytest.mark.rhv3 def test_ssa_users(ssa_vm): """ Tests SSA fetches correct results for users list @@ -746,7 +742,6 @@ def test_ssa_users(ssa_vm): pytest.fail(f'User {username} was not found in details table after SSA run') -@pytest.mark.rhv3 def test_ssa_groups(ssa_vm): """ Tests SSA fetches correct results for groups @@ -868,7 +863,6 @@ def test_ssa_files(ssa_vm): ssa_expect_files[0])) -@pytest.mark.rhv2 @pytest.mark.tier(2) def test_drift_analysis(request, ssa_vm, soft_assert, appliance): """ Tests drift analysis is correct diff --git a/cfme/tests/cloud_infra_common/test_vm_ownership.py b/cfme/tests/cloud_infra_common/test_vm_ownership.py index b6cc83bfb9..f6228f6c15 100644 --- a/cfme/tests/cloud_infra_common/test_vm_ownership.py +++ b/cfme/tests/cloud_infra_common/test_vm_ownership.py @@ -150,7 +150,6 @@ def check_vm_exists(vm_ownership): return False -@pytest.mark.rhv3 def test_form_button_validation(user1, vm_crud): """Tests group ownership @@ -173,7 +172,6 @@ def test_form_button_validation(user1, vm_crud): vm_crud.unset_ownership() -@pytest.mark.rhv2 def test_user_ownership_crud(user1, vm_crud): """Tests user ownership @@ -195,7 +193,6 @@ def test_user_ownership_crud(user1, vm_crud): assert not check_vm_exists(vm_crud), "vm exists! but shouldn't exist" -@pytest.mark.rhv3 def test_group_ownership_on_user_only_role(user2, vm_crud): """Tests group ownership @@ -218,7 +215,6 @@ def test_group_ownership_on_user_only_role(user2, vm_crud): assert vm_crud.exists, "vm exists" -@pytest.mark.rhv3 def test_group_ownership_on_user_or_group_role(user3, vm_crud): """Tests group ownership diff --git a/cfme/tests/control/test_alerts.py b/cfme/tests/control/test_alerts.py index 6aa2d991a8..30407086a5 100644 --- a/cfme/tests/control/test_alerts.py +++ b/cfme/tests/control/test_alerts.py @@ -173,7 +173,6 @@ def setup_snmp(appliance): appliance.ssh_client.run_command("sed -i '$ d' /etc/snmp/snmptrapd.conf") -@pytest.mark.rhv3 @pytest.mark.parametrize('create_vm', ['full_template'], indirect=True) @pytest.mark.provider(gen_func=providers, filters=[pf1, pf2], scope="module") def test_alert_vm_turned_on_more_than_twice_in_past_15_minutes( diff --git a/cfme/tests/infrastructure/test_child_tenant.py b/cfme/tests/infrastructure/test_child_tenant.py index 975f45a872..5cc0d20948 100644 --- a/cfme/tests/infrastructure/test_child_tenant.py +++ b/cfme/tests/infrastructure/test_child_tenant.py @@ -100,7 +100,6 @@ def new_user(appliance, new_group, new_credential): user.delete() -@pytest.mark.rhv3 # first arg of parametrize is the list of fixtures or parameters, # second arg is a list of lists, with each one a test is to be generated # sequence is important here diff --git a/cfme/tests/infrastructure/test_host.py b/cfme/tests/infrastructure/test_host.py index 68477b15ca..ef8561d9bb 100644 --- a/cfme/tests/infrastructure/test_host.py +++ b/cfme/tests/infrastructure/test_host.py @@ -137,7 +137,6 @@ def _check_items_visibility(): assert host in host_ips -@pytest.mark.rhv2 @pytest.mark.parametrize("creds", ["default", "remote_login", "web_services"], ids=["default", "remote", "web"]) @pytest.mark.uncollectif(lambda provider, creds: @@ -182,7 +181,6 @@ def test_multiple_host_good_creds(setup_provider, provider, creds): view.flash.assert_success_message('Credentials/Settings saved successfully') -@pytest.mark.rhv3 def test_multiple_host_bad_creds(setup_provider, provider): """ Tests multiple host credentialing with bad credentials @@ -333,7 +331,6 @@ def _finalize(): @test_requirements.rhev -@pytest.mark.rhv3 @pytest.mark.provider([RHEVMProvider], required_fields=['hosts'], selector=ONE) @pytest.mark.meta(automates=[1528859]) def test_hosts_not_displayed_several_times(appliance, provider, setup_provider): @@ -516,7 +513,6 @@ def test_infrastructure_hosts_navigation_after_download_from_compare( @test_requirements.rhev -@pytest.mark.rhv3 @pytest.mark.provider([RHEVMProvider], required_fields=['hosts'], selector=ONE) @pytest.mark.meta(automates=[1669011]) def test_add_ipmi_refresh(appliance, setup_provider): diff --git a/cfme/tests/infrastructure/test_host_analysis.py b/cfme/tests/infrastructure/test_host_analysis.py index fc49a656aa..0850066977 100644 --- a/cfme/tests/infrastructure/test_host_analysis.py +++ b/cfme/tests/infrastructure/test_host_analysis.py @@ -58,7 +58,6 @@ def host_with_credentials(provider, host_name): host.update_credentials_rest(credentials={'default': Host.Credential(principal="", secret="")}) -@pytest.mark.rhv1 @pytest.mark.uncollectif(lambda provider, appliance: provider.one_of(RHEVMProvider) and not appliance.is_downstream, reason='RHEVM host analysis not valid on upstream') diff --git a/cfme/tests/infrastructure/test_host_drift_analysis.py b/cfme/tests/infrastructure/test_host_drift_analysis.py index d44aa52d7b..cbfc59e74c 100644 --- a/cfme/tests/infrastructure/test_host_drift_analysis.py +++ b/cfme/tests/infrastructure/test_host_drift_analysis.py @@ -57,7 +57,6 @@ def set_host_credentials(provider, a_host, setup_provider_modscope): credentials={'default': Host.Credential(principal='', secret='')}) -@pytest.mark.rhv3 def test_host_drift_analysis(appliance, request, a_host, soft_assert, set_host_credentials): """Tests host drift analysis diff --git a/cfme/tests/infrastructure/test_individual_host_creds.py b/cfme/tests/infrastructure/test_individual_host_creds.py index b3d620d1db..e33a967bc3 100644 --- a/cfme/tests/infrastructure/test_individual_host_creds.py +++ b/cfme/tests/infrastructure/test_individual_host_creds.py @@ -44,7 +44,6 @@ def get_host_data_by_name(provider_key, host_name): return None -@pytest.mark.rhv1 @pytest.mark.parametrize("creds", ["default", "remote_login", "web_services"], ids=["default", "remote", "web"]) @pytest.mark.uncollectif(lambda provider, creds: @@ -104,7 +103,6 @@ def _refresh(): message='Waiting for \'{}\' state change'.format(credentials_type[creds])) -@pytest.mark.rhv3 @pytest.mark.parametrize("creds", ["default", "remote_login", "web_services"], ids=["default", "remote", "web"]) @pytest.mark.uncollectif(lambda provider, creds: diff --git a/cfme/tests/infrastructure/test_iso_datastore.py b/cfme/tests/infrastructure/test_iso_datastore.py index 10ad6570c3..f929094874 100644 --- a/cfme/tests/infrastructure/test_iso_datastore.py +++ b/cfme/tests/infrastructure/test_iso_datastore.py @@ -19,7 +19,6 @@ def no_iso_dss(provider): template_crud.delete(cancel=False) -@pytest.mark.rhv1 @test_requirements.rhev def test_iso_datastore_crud(setup_provider, no_iso_dss, provider): """ diff --git a/cfme/tests/infrastructure/test_iso_provisioning.py b/cfme/tests/infrastructure/test_iso_provisioning.py index 068b99bb8e..22bd9d0c92 100644 --- a/cfme/tests/infrastructure/test_iso_provisioning.py +++ b/cfme/tests/infrastructure/test_iso_provisioning.py @@ -77,7 +77,6 @@ def vm_name(): return vm_name -@pytest.mark.rhv1 @pytest.mark.tier(2) @test_requirements.provision def test_iso_provision_from_template(appliance, provider, vm_name, datastore_init, request): diff --git a/cfme/tests/infrastructure/test_project_quota.py b/cfme/tests/infrastructure/test_project_quota.py index a15991e3b9..e24f5e748f 100644 --- a/cfme/tests/infrastructure/test_project_quota.py +++ b/cfme/tests/infrastructure/test_project_quota.py @@ -94,7 +94,6 @@ def new_user(appliance, new_group, new_credential): user.delete() -@pytest.mark.rhv2 # first arg of parametrize is the list of fixtures or parameters, # second arg is a list of lists, with each one a test is to be generated # sequence is important here diff --git a/cfme/tests/infrastructure/test_providers.py b/cfme/tests/infrastructure/test_providers.py index db50c8b2fc..6a45399800 100644 --- a/cfme/tests/infrastructure/test_providers.py +++ b/cfme/tests/infrastructure/test_providers.py @@ -218,7 +218,6 @@ def test_api_port_max_character_validation_infra(appliance): assert text == prov.default_endpoint.api_port[0:15] -@pytest.mark.rhv1 @pytest.mark.usefixtures('has_no_infra_providers') @pytest.mark.tier(1) def test_providers_discovery(request, appliance, provider): @@ -246,7 +245,6 @@ def test_providers_discovery(request, appliance, provider): appliance.collections.infra_providers.wait_for_a_provider() -@pytest.mark.rhv1 @pytest.mark.usefixtures('has_no_infra_providers') def test_infra_provider_add_with_bad_credentials(provider): """Tests provider add with bad credentials @@ -270,7 +268,6 @@ def test_infra_provider_add_with_bad_credentials(provider): provider.create(validate_credentials=True) -@pytest.mark.rhv1 @pytest.mark.usefixtures('has_no_infra_providers') @pytest.mark.tier(1) @pytest.mark.smoke @@ -301,7 +298,6 @@ def test_infra_provider_crud(provider): provider.wait_for_delete() -@pytest.mark.rhv1 @pytest.mark.usefixtures('has_no_infra_providers') @pytest.mark.tier(1) @pytest.mark.parametrize('verify_tls', [False, True], ids=['no_tls', 'tls']) @@ -339,7 +335,6 @@ def test_provider_rhv_create_delete_tls(request, provider, verify_tls): prov.wait_for_delete() -@pytest.mark.rhv3 @test_requirements.rhev @pytest.mark.meta(automates=[1691109, 1731237]) @pytest.mark.provider([RHEVMProvider], selector=ONE_PER_VERSION, scope="function") @@ -379,7 +374,6 @@ def _refresh_provider(): assert gd_count_before == gd_count_after, "guest devices count changed after refresh!" -@pytest.mark.rhv2 @test_requirements.rhev @pytest.mark.meta(automates=[1594817]) @pytest.mark.provider([RHEVMProvider], selector=ONE, scope="function") diff --git a/cfme/tests/infrastructure/test_provisioning_dialog.py b/cfme/tests/infrastructure/test_provisioning_dialog.py index db220567f5..247d2c7ca6 100644 --- a/cfme/tests/infrastructure/test_provisioning_dialog.py +++ b/cfme/tests/infrastructure/test_provisioning_dialog.py @@ -115,7 +115,6 @@ def _provisioner(template, provisioning_data, delayed=None): return _provisioner -@pytest.mark.rhv2 @pytest.mark.meta(blockers=[BZ(1627673, forced_streams=['5.10'])]) def test_change_cpu_ram(provisioner, soft_assert, provider, prov_data, vm_name): """ Tests change RAM and CPU in provisioning dialog. @@ -164,7 +163,6 @@ def test_change_cpu_ram(provisioner, soft_assert, provider, prov_data, vm_name): soft_assert(memory == "2048 MB", "memory should be {}, is {}".format("2048 MB", memory)) -@pytest.mark.rhv3 # Special parametrization in testgen above @pytest.mark.meta(blockers=[1209847, 1380782], automates=[1633867]) @pytest.mark.provider(gen_func=providers, @@ -229,7 +227,6 @@ def test_disk_format_select(provisioner, disk_format, provider, prov_data, vm_na assert thin != 'true', "The disk format should not be Thin" -@pytest.mark.rhv3 @pytest.mark.parametrize("started", [True, False]) def test_power_on_or_off_after_provision(provisioner, prov_data, provider, started, vm_name): """ Tests setting the desired power state after provisioning. @@ -266,7 +263,6 @@ def test_power_on_or_off_after_provision(provisioner, prov_data, provider, start ) -@pytest.mark.rhv3 @test_requirements.tag def test_tag(provisioner, prov_data, provider, vm_name): """ Tests tagging VMs using provisioning dialogs. @@ -302,7 +298,6 @@ def test_tag(provisioner, prov_data, provider, vm_name): ), f"Service Level: Gold not in tags ({tags})" -@pytest.mark.rhv3 @pytest.mark.meta(blockers=[1204115]) @test_requirements.scheduled_ops def test_provisioning_schedule(provisioner, provider, prov_data, vm_name): @@ -343,7 +338,6 @@ def test_provisioning_schedule(provisioner, provider, prov_data, vm_name): provisioner(template_name, prov_data, delayed=provision_time) -@pytest.mark.rhv2 @pytest.mark.provider([RHEVMProvider], required_fields=[['provisioning', 'template'], ['provisioning', 'host'], @@ -394,7 +388,6 @@ def test_provisioning_vnic_profiles(provisioner, provider, prov_data, vm_name, v assert not profile, 'The vNIC profile should be empty.' -@pytest.mark.rhv2 @pytest.mark.provider([RHEVMProvider], required_fields=[['provisioning', 'template_2_nics']]) @pytest.mark.meta(blockers=[BZ(1625139, forced_streams=['5.10', 'upstream'])]) @@ -473,7 +466,6 @@ def test_vmware_default_placement(provisioner, prov_data, provider, setup_provid 'The new vm is not placed in the Datacenter root directory!') -@pytest.mark.rhv2 @pytest.mark.provider([RHEVMProvider], required_fields=[['provisioning', 'template_false_sparse']]) @pytest.mark.meta(automates=[1726590], blockers=[BZ(1726590, forced_streams=["5.10"])]) def test_linked_clone_default(provisioner, provisioning, provider, prov_data, vm_name): diff --git a/cfme/tests/infrastructure/test_provisioning_rest.py b/cfme/tests/infrastructure/test_provisioning_rest.py index 4ac3556296..7b87c6dc07 100644 --- a/cfme/tests/infrastructure/test_provisioning_rest.py +++ b/cfme/tests/infrastructure/test_provisioning_rest.py @@ -83,7 +83,6 @@ def clean_vm(appliance, provider, vm_name): appliance.collections.infra_vms.instantiate(vm_name, provider).cleanup_on_provider() -@pytest.mark.rhv2 # Here also available the ability to create multiple provision request, but used the save # href and method, so it doesn't make any sense actually def test_provision(request, appliance, provider, provision_data): @@ -117,7 +116,6 @@ def test_provision(request, appliance, provider, provision_data): assert found_vms, f'VM `{vm_name}` not found' -@pytest.mark.rhv2 # These profile names are RHV specific @pytest.mark.provider([RHEVMProvider], scope='module') @pytest.mark.parametrize('vnic_profile', ['empty_vnic_profile', 'specific_vnic_profile']) @@ -177,7 +175,6 @@ def test_provision_vlan(request, appliance, provision_data, vnic_profile, provid assert profile_via_provider.name == profile_name.split()[0], assert_msg -@pytest.mark.rhv3 @pytest.mark.meta(server_roles="+notifier") def test_provision_emails(request, provision_data, provider, appliance, smtp_test): """ @@ -226,7 +223,6 @@ def check_one_completed_mail_received(): wait_for(check_one_completed_mail_received, num_sec=90, delay=5) -@pytest.mark.rhv3 def test_create_pending_provision_requests(request, appliance, provider, small_template): """Tests creation and and auto-approval of pending provision request using /api/provision_requests. @@ -266,7 +262,6 @@ def test_create_pending_provision_requests(request, appliance, provider, small_t delay=10) -@pytest.mark.rhv3 def test_provision_attributes(appliance, provider, small_template, soft_assert): """Tests that it's possible to display additional attributes in /api/provision_requests/:id. diff --git a/cfme/tests/infrastructure/test_publish_vm_to_template.py b/cfme/tests/infrastructure/test_publish_vm_to_template.py index 92fb3d978c..ec4646f6fc 100644 --- a/cfme/tests/infrastructure/test_publish_vm_to_template.py +++ b/cfme/tests/infrastructure/test_publish_vm_to_template.py @@ -47,7 +47,6 @@ def vm_crud(provider): provider.name) -@pytest.mark.rhv2 def test_publish_vm_to_template(request, vm_crud): """ Try to publish VM to template. Steps: diff --git a/cfme/tests/infrastructure/test_pxe_provisioning.py b/cfme/tests/infrastructure/test_pxe_provisioning.py index f0a89f0f8a..d63c3b0832 100644 --- a/cfme/tests/infrastructure/test_pxe_provisioning.py +++ b/cfme/tests/infrastructure/test_pxe_provisioning.py @@ -92,7 +92,6 @@ def vm_name(): return vm_name -@pytest.mark.rhv1 @test_requirements.provision def test_pxe_provision_from_template(appliance, provider, vm_name, setup_provider, request, setup_pxe_servers_vm_prov): diff --git a/cfme/tests/infrastructure/test_quota.py b/cfme/tests/infrastructure/test_quota.py index 58154a7fed..3006e2a8eb 100644 --- a/cfme/tests/infrastructure/test_quota.py +++ b/cfme/tests/infrastructure/test_quota.py @@ -184,7 +184,6 @@ def custom_prov_data(request, prov_data, vm_name, template_name): # Here custom_prov_data is the dict required during provisioning of the VM. -@pytest.mark.rhv2 @pytest.mark.parametrize( ['custom_prov_data'], [ diff --git a/cfme/tests/infrastructure/test_quota_tagging.py b/cfme/tests/infrastructure/test_quota_tagging.py index 51ac44fe7a..925c13245e 100644 --- a/cfme/tests/infrastructure/test_quota_tagging.py +++ b/cfme/tests/infrastructure/test_quota_tagging.py @@ -160,7 +160,6 @@ def set_entity_quota_tag(request, entities, appliance): entities.remove_tag(tag) -@pytest.mark.rhv2 @pytest.mark.parametrize( ['set_entity_quota_tag', 'custom_prov_data'], [ @@ -198,7 +197,6 @@ def test_quota_tagging_infra_via_lifecycle(request, appliance, provider, # Here set_entity_quota_tag is used for setting the tag value. # Here custom_prov_data is used to provide the value fo the catalog item to be created. -@pytest.mark.rhv2 @pytest.mark.parametrize('context', [ViaSSUI, ViaUI]) @pytest.mark.parametrize( ['set_entity_quota_tag', 'custom_prov_data'], diff --git a/cfme/tests/infrastructure/test_snapshot.py b/cfme/tests/infrastructure/test_snapshot.py index 248a08060e..24959ffe0d 100644 --- a/cfme/tests/infrastructure/test_snapshot.py +++ b/cfme/tests/infrastructure/test_snapshot.py @@ -37,7 +37,6 @@ def new_snapshot(test_vm, has_name=True, memory=False, create_description=True): ) -@pytest.mark.rhv2 def test_memory_checkbox(create_vm, provider, soft_assert): """Tests snapshot memory checkbox @@ -70,8 +69,6 @@ def test_memory_checkbox(create_vm, provider, soft_assert): "Memory checkbox is displayed when VM is stopped") -@pytest.mark.rhv1 -@pytest.mark.rhv3 @test_requirements.rhev @pytest.mark.meta(automates=[1571291, 1608475]) def test_snapshot_crud(create_vm, provider): @@ -101,7 +98,6 @@ def test_snapshot_crud(create_vm, provider): assert result.validate(wait="60s") -@pytest.mark.rhv3 @test_requirements.rhev @pytest.mark.provider([RHEVMProvider]) @pytest.mark.meta(automates=[BZ(1443411)]) @@ -124,7 +120,6 @@ def test_delete_active_vm_snapshot(create_vm): assert not view.toolbar.delete.is_displayed -@pytest.mark.rhv3 @test_requirements.rhev @pytest.mark.provider([RHEVMProvider]) def test_create_without_description(create_vm): @@ -245,7 +240,6 @@ def verify_revert_snapshot(full_test_vm, provider, soft_assert, register_event, ssh_client.close() -@pytest.mark.rhv1 @pytest.mark.parametrize('create_vm', ['full_template'], indirect=True) def test_verify_revert_snapshot(create_vm, provider, soft_assert, register_event, request): """Tests revert snapshot @@ -284,7 +278,6 @@ def test_revert_active_snapshot(create_vm, provider, soft_assert, register_event active_snapshot=True) -@pytest.mark.rhv2 @pytest.mark.provider([RHEVMProvider]) @pytest.mark.meta(automates=[BZ(1552732)]) def test_revert_to_active_vm(create_vm, provider): @@ -312,7 +305,6 @@ def test_revert_to_active_vm(create_vm, provider): assert not view.toolbar.revert.is_displayed -@pytest.mark.rhv3 @pytest.mark.provider([RHEVMProvider]) @pytest.mark.meta(automates=[BZ(1375544)]) def test_revert_on_running_vm(create_vm): @@ -459,7 +451,6 @@ def test_operations_powered_off_vm(create_vm): snapshot2.delete() -@pytest.mark.rhv3 def test_snapshot_history_btn(create_vm, provider): """Tests snapshot history button Metadata: diff --git a/cfme/tests/infrastructure/test_tenant_quota.py b/cfme/tests/infrastructure/test_tenant_quota.py index c56341d4c8..6e05475d26 100644 --- a/cfme/tests/infrastructure/test_tenant_quota.py +++ b/cfme/tests/infrastructure/test_tenant_quota.py @@ -160,7 +160,6 @@ def quota_limit(roottenant): roottenant.set_quota(**{"storage_cb": False}) -@pytest.mark.rhv2 # first arg of parametrize is the list of fixtures or parameters, # second arg is a list of lists, with each one a test is to be generated # sequence is important here @@ -207,7 +206,6 @@ def test_tenant_quota_enforce_via_lifecycle_infra(appliance, provider, set_roott # second arg is a list of lists, with each one a test is to be generated # sequence is important here # indirect is the list where we define which fixtures are to be passed values indirectly. -@pytest.mark.rhv3 @pytest.mark.parametrize('context', [ViaSSUI, ViaUI]) @pytest.mark.parametrize( ['set_roottenant_quota', 'custom_prov_data', 'extra_msg', 'set_default'], @@ -249,7 +247,6 @@ def test_tenant_quota_enforce_via_service_infra(request, appliance, context, set # second arg is a list of lists, with each one a test is to be generated # sequence is important here # indirect is the list where we define which fixtures are to be passed values indirectly. -@pytest.mark.rhv2 @pytest.mark.meta(automates=[1467644]) @pytest.mark.parametrize( ['set_roottenant_quota', 'custom_prov_data'], diff --git a/cfme/tests/infrastructure/test_vm_clone.py b/cfme/tests/infrastructure/test_vm_clone.py index 57bf08e258..3ee12b4a7d 100644 --- a/cfme/tests/infrastructure/test_vm_clone.py +++ b/cfme/tests/infrastructure/test_vm_clone.py @@ -67,7 +67,6 @@ def test_vm_clone(appliance, provider, clone_vm_name, create_vm): assert request_row.is_succeeded(method='ui'), msg -@pytest.mark.rhv3 @pytest.mark.provider(gen_func=providers, filters=[infra_filter, not_vmware],) @test_requirements.provision diff --git a/cfme/tests/infrastructure/test_vm_delete.py b/cfme/tests/infrastructure/test_vm_delete.py index 2646643133..d9ee134284 100644 --- a/cfme/tests/infrastructure/test_vm_delete.py +++ b/cfme/tests/infrastructure/test_vm_delete.py @@ -27,7 +27,6 @@ def vm_test(provider): vm.cleanup_on_provider() -@pytest.mark.rhv2 @pytest.mark.meta(automates=[1592430]) def test_delete_vm_on_provider_side(vm_test, provider): """ Delete VM on the provider side and refresh relationships in CFME diff --git a/cfme/tests/infrastructure/test_vm_migrate.py b/cfme/tests/infrastructure/test_vm_migrate.py index e4115a892e..17b621521f 100644 --- a/cfme/tests/infrastructure/test_vm_migrate.py +++ b/cfme/tests/infrastructure/test_vm_migrate.py @@ -35,7 +35,6 @@ def new_vm(setup_provider, provider): vm.cleanup_on_provider() -@pytest.mark.rhv1 def test_vm_migrate(appliance, new_vm, provider): """Tests migration of a vm diff --git a/cfme/tests/infrastructure/test_vm_power_control.py b/cfme/tests/infrastructure/test_vm_power_control.py index da2804ce1e..36eb60f01a 100644 --- a/cfme/tests/infrastructure/test_vm_power_control.py +++ b/cfme/tests/infrastructure/test_vm_power_control.py @@ -152,7 +152,6 @@ def _wait_for_tools_ok(): class TestControlOnQuadicons: - @pytest.mark.rhv3 def test_power_off_cancel(self, testing_vm, ensure_vm_running, soft_assert): """Tests power off cancel @@ -174,7 +173,6 @@ def test_power_off_cancel(self, testing_vm, ensure_vm_running, soft_assert): soft_assert( testing_vm.mgmt.is_running, "vm not running") - @pytest.mark.rhv1 def test_power_off(self, appliance, testing_vm, ensure_vm_running, soft_assert): """Tests power off @@ -197,7 +195,6 @@ def test_power_off(self, appliance, testing_vm, ensure_vm_running, soft_assert): soft_assert(vm_state == 'off') soft_assert(not testing_vm.mgmt.is_running, "vm running") - @pytest.mark.rhv3 def test_power_on_cancel(self, testing_vm, ensure_vm_stopped, soft_assert): """Tests power on cancel @@ -216,7 +213,6 @@ def test_power_on_cancel(self, testing_vm, ensure_vm_stopped, soft_assert): soft_assert(vm_state == 'off') soft_assert(not testing_vm.mgmt.is_running, "vm running") - @pytest.mark.rhv1 @pytest.mark.tier(1) def test_power_on(self, appliance, testing_vm, ensure_vm_stopped, soft_assert): """Tests power on @@ -246,7 +242,6 @@ def test_power_on(self, appliance, testing_vm, ensure_vm_stopped, soft_assert): class TestVmDetailsPowerControlPerProvider: - @pytest.mark.rhv3 def test_power_off(self, appliance, testing_vm, ensure_vm_running, soft_assert): """Tests power off @@ -280,7 +275,6 @@ def test_power_off(self, appliance, testing_vm, ensure_vm_running, soft_assert): soft_assert(new_last_boot_time == last_boot_time, f"ui: {new_last_boot_time} should == orig: {last_boot_time}") - @pytest.mark.rhv3 def test_power_on(self, appliance, testing_vm, ensure_vm_stopped, soft_assert): """Tests power on @@ -307,7 +301,6 @@ def test_power_on(self, appliance, testing_vm, ensure_vm_stopped, soft_assert): desired_state=testing_vm.STATE_ON, timeout=720, from_details=True) soft_assert(testing_vm.mgmt.is_running, "vm not running") - @pytest.mark.rhv3 @pytest.mark.meta(automates=[BZ(1174858)]) def test_suspend(self, appliance, testing_vm, ensure_vm_running, soft_assert): """Tests suspend @@ -343,7 +336,6 @@ def test_suspend(self, appliance, testing_vm, ensure_vm_running, soft_assert): soft_assert(new_last_boot_time == last_boot_time, f"ui: {new_last_boot_time} should == orig: {last_boot_time}") - @pytest.mark.rhv1 def test_start_from_suspend(self, appliance, testing_vm, ensure_vm_suspended, soft_assert): """Tests start from suspend @@ -378,7 +370,6 @@ def test_start_from_suspend(self, appliance, testing_vm, ensure_vm_suspended, so soft_assert(testing_vm.mgmt.is_running, "vm not running") -@pytest.mark.rhv3 def test_no_template_power_control(provider, soft_assert): """ Ensures that no power button is displayed for templates. @@ -429,7 +420,6 @@ def test_no_template_power_control(provider, soft_assert): soft_assert(not view.toolbar.power.is_displayed, "Power displayed in template details!") -@pytest.mark.rhv3 @pytest.mark.meta( blockers=[ BZ( @@ -460,7 +450,6 @@ def test_no_power_controls_on_archived_vm(appliance, testing_vm, archived_vm, so assert not status, "Power displayed in archived VM's details!" -@pytest.mark.rhv3 def test_archived_vm_status(testing_vm, archived_vm): """Tests archived vm status @@ -478,7 +467,6 @@ def test_archived_vm_status(testing_vm, archived_vm): assert (vm_state == 'archived') -@pytest.mark.rhv3 def test_orphaned_vm_status(testing_vm, orphaned_vm): """Tests orphaned vm status @@ -492,7 +480,6 @@ def test_orphaned_vm_status(testing_vm, orphaned_vm): assert (vm_state == 'orphaned') -@pytest.mark.rhv1 def test_vm_power_options_from_on(provider, soft_assert, testing_vm, ensure_vm_running): """Tests vm power options from on @@ -509,7 +496,6 @@ def test_vm_power_options_from_on(provider, soft_assert, testing_vm, ensure_vm_r check_power_options(provider, soft_assert, testing_vm, testing_vm.STATE_ON) -@pytest.mark.rhv3 @pytest.mark.meta(automates=[BZ(1724062)]) def test_vm_power_options_from_off(provider, soft_assert, testing_vm, ensure_vm_stopped): """Tests vm power options from off diff --git a/cfme/tests/infrastructure/test_vm_reconfigure.py b/cfme/tests/infrastructure/test_vm_reconfigure.py index e0de36594e..fcae5c2dfa 100644 --- a/cfme/tests/infrastructure/test_vm_reconfigure.py +++ b/cfme/tests/infrastructure/test_vm_reconfigure.py @@ -119,7 +119,6 @@ def enable_hot_plugin(provider, full_vm, ensure_vm_stopped): vm.memory_hot_plug = True -@pytest.mark.rhv1 @pytest.mark.parametrize('change_type', ['cores_per_socket', 'sockets', 'memory']) def test_vm_reconfig_add_remove_hw_cold(provider, full_vm, ensure_vm_stopped, change_type): """ @@ -139,7 +138,6 @@ def test_vm_reconfig_add_remove_hw_cold(provider, full_vm, ensure_vm_stopped, ch reconfigure_vm(full_vm, orig_config) -@pytest.mark.rhv1 @pytest.mark.parametrize('disk_type', ['thin', 'thick']) @pytest.mark.parametrize( 'disk_mode', ['persistent', 'independent_persistent', 'independent_nonpersistent']) @@ -198,7 +196,6 @@ def test_vm_reconfig_add_remove_disk(provider, full_vm, vm_state, disk_type, dis assert full_vm.configuration.num_disks == orig_config.num_disks, msg -@pytest.mark.rhv3 def test_reconfig_vm_negative_cancel(provider, full_vm, ensure_vm_stopped): """ Cancel reconfiguration changes @@ -221,7 +218,6 @@ def test_reconfig_vm_negative_cancel(provider, full_vm, ensure_vm_stopped): full_vm.reconfigure(config_vm, cancel=True) -@pytest.mark.rhv1 @pytest.mark.meta( blockers=[BZ(1697967, unblock=lambda provider: not provider.one_of(RHEVMProvider))]) @pytest.mark.parametrize('change_type', ['sockets', 'memory']) diff --git a/cfme/tests/intelligence/reports/test_canned_corresponds.py b/cfme/tests/intelligence/reports/test_canned_corresponds.py index 3d9bb953b2..6abfe2d26b 100644 --- a/cfme/tests/intelligence/reports/test_canned_corresponds.py +++ b/cfme/tests/intelligence/reports/test_canned_corresponds.py @@ -24,7 +24,6 @@ def compare(db_item, report_item): return db_item is None and report_item == '' -@pytest.mark.rhv3 def test_providers_summary(appliance, soft_assert, request, setup_provider): """Checks some informations about the provider. Does not check memory/frequency as there is presence of units and rounding. @@ -68,7 +67,6 @@ def test_providers_summary(appliance, soft_assert, request, setup_provider): "Physical CPU count does not match at {}".format(provider["Name"])) -@pytest.mark.rhv3 def test_cluster_relationships(appliance, request, soft_assert, setup_provider): """Tests vm power options from on @@ -131,7 +129,6 @@ def test_cluster_relationships(appliance, request, soft_assert, setup_provider): soft_assert(False, f"Hostname {host_name} not found in {provider_name}") -@pytest.mark.rhv2 def test_operations_vm_on( soft_assert, temp_appliance_preconfig_funcscope, request, setup_provider_temp_appliance ): @@ -189,7 +186,6 @@ def test_operations_vm_on( assert compare(vm.vm_last_scan, item['Last Analysis Time']) -@pytest.mark.rhv3 def test_datastores_summary( soft_assert, temp_appliance_preconfig_funcscope, request, setup_provider_temp_appliance ): diff --git a/cfme/tests/intelligence/reports/test_validate_chargeback_report.py b/cfme/tests/intelligence/reports/test_validate_chargeback_report.py index a3edc10721..745f5877bb 100644 --- a/cfme/tests/intelligence/reports/test_validate_chargeback_report.py +++ b/cfme/tests/intelligence/reports/test_validate_chargeback_report.py @@ -509,7 +509,6 @@ def new_compute_rate(appliance): ) -@pytest.mark.rhv3 # Tests to validate costs reported in the Chargeback report for various metrics. # The costs reported in the Chargeback report should be approximately equal to the # costs estimated in the chargeback_costs_default/chargeback_costs_custom fixtures. @@ -535,7 +534,6 @@ def test_validate_default_rate_cpu_usage_cost(chargeback_costs_default, chargeba break -@pytest.mark.rhv2 @pytest.mark.provider(gen_func=providers, filters=[cloud_and_infra, not_scvmm, not_ec2_gce], scope='module') @@ -559,7 +557,6 @@ def test_validate_default_rate_memory_usage_cost(chargeback_costs_default, break -@pytest.mark.rhv3 def test_validate_default_rate_network_usage_cost(chargeback_costs_default, chargeback_report_default): """Test to validate network usage cost. @@ -580,7 +577,6 @@ def test_validate_default_rate_network_usage_cost(chargeback_costs_default, break -@pytest.mark.rhv3 def test_validate_default_rate_disk_usage_cost(chargeback_costs_default, chargeback_report_default): """Test to validate disk usage cost. Calculation is based on default Chargeback rate. @@ -599,7 +595,6 @@ def test_validate_default_rate_disk_usage_cost(chargeback_costs_default, chargeb break -@pytest.mark.rhv3 def test_validate_default_rate_storage_usage_cost(chargeback_costs_default, chargeback_report_default): """Test to validate stoarge usage cost. @@ -618,7 +613,6 @@ def test_validate_default_rate_storage_usage_cost(chargeback_costs_default, break -@pytest.mark.rhv3 @pytest.mark.provider(gen_func=providers, filters=[cloud_and_infra, not_scvmm, not_cloud], scope='module') @@ -641,7 +635,6 @@ def test_validate_custom_rate_cpu_usage_cost(chargeback_costs_custom, chargeback break -@pytest.mark.rhv1 @pytest.mark.provider(gen_func=providers, filters=[cloud_and_infra, not_scvmm, not_ec2_gce], scope='module') @@ -663,7 +656,6 @@ def test_validate_custom_rate_memory_usage_cost(chargeback_costs_custom, chargeb break -@pytest.mark.rhv3 def test_validate_custom_rate_network_usage_cost(chargeback_costs_custom, chargeback_report_custom): """Test to validate network usage cost. Calculation is based on custom Chargeback rate. @@ -682,7 +674,6 @@ def test_validate_custom_rate_network_usage_cost(chargeback_costs_custom, charge break -@pytest.mark.rhv3 def test_validate_custom_rate_disk_usage_cost(chargeback_costs_custom, chargeback_report_custom): """Test to validate disk usage cost. Calculation is based on custom Chargeback rate. @@ -701,7 +692,6 @@ def test_validate_custom_rate_disk_usage_cost(chargeback_costs_custom, chargebac break -@pytest.mark.rhv3 def test_validate_custom_rate_storage_usage_cost(chargeback_costs_custom, chargeback_report_custom): """Test to validate stoarge usage cost. Calculation is based on custom Chargeback rate. diff --git a/cfme/tests/intelligence/reports/test_views.py b/cfme/tests/intelligence/reports/test_views.py index 32259f88c0..c0714ce1a0 100644 --- a/cfme/tests/intelligence/reports/test_views.py +++ b/cfme/tests/intelligence/reports/test_views.py @@ -25,7 +25,6 @@ def report(appliance): report.delete_if_exists() -@pytest.mark.rhv3 @pytest.mark.parametrize( "view_mode", ["Hybrid View", "Graph View", "Tabular View"], diff --git a/cfme/tests/networks/test_provision_to_virtual_network.py b/cfme/tests/networks/test_provision_to_virtual_network.py index a9cd1bcad5..9f09227feb 100644 --- a/cfme/tests/networks/test_provision_to_virtual_network.py +++ b/cfme/tests/networks/test_provision_to_virtual_network.py @@ -38,7 +38,6 @@ def network(provider, appliance): ovn_network.delete() -@pytest.mark.rhv1 @test_requirements.rhev @pytest.mark.meta( blockers=[ diff --git a/cfme/tests/services/test_different_dialogs_in_catalogs.py b/cfme/tests/services/test_different_dialogs_in_catalogs.py index d372ddc904..563cf83d5b 100644 --- a/cfme/tests/services/test_different_dialogs_in_catalogs.py +++ b/cfme/tests/services/test_different_dialogs_in_catalogs.py @@ -106,7 +106,6 @@ def generic_catalog_item(appliance, service_dialog, catalog): catalog_item.delete_if_exists() -@pytest.mark.rhv2 @pytest.mark.tier(2) @pytest.mark.provider( [InfraProvider], diff --git a/cfme/tests/services/test_iso_service_catalogs.py b/cfme/tests/services/test_iso_service_catalogs.py index f638aa0e97..10f72eb913 100644 --- a/cfme/tests/services/test_iso_service_catalogs.py +++ b/cfme/tests/services/test_iso_service_catalogs.py @@ -93,7 +93,6 @@ def catalog_item(appliance, provider, dialog, catalog, provisioning): ) -@pytest.mark.rhv1 @test_requirements.rhev def test_rhev_iso_servicecatalog(appliance, provider, setup_provider, setup_iso_datastore, catalog_item, request): diff --git a/cfme/tests/services/test_pxe_service_catalogs.py b/cfme/tests/services/test_pxe_service_catalogs.py index 91c9da5134..a1995133fb 100644 --- a/cfme/tests/services/test_pxe_service_catalogs.py +++ b/cfme/tests/services/test_pxe_service_catalogs.py @@ -116,7 +116,6 @@ def catalog_item(appliance, provider, dialog, catalog, provisioning, dialog=dialog, prov_data=provisioning_data) -@pytest.mark.rhv1 @pytest.mark.meta(blockers=[BZ(1633516, forced_streams=['5.10'], unblock=lambda provider: not provider.one_of(RHEVMProvider))]) @pytest.mark.usefixtures('setup_pxe_servers_vm_prov') diff --git a/cfme/tests/services/test_service_catalogs.py b/cfme/tests/services/test_service_catalogs.py index db4414ae16..e9cb8a1bba 100644 --- a/cfme/tests/services/test_service_catalogs.py +++ b/cfme/tests/services/test_service_catalogs.py @@ -27,7 +27,6 @@ ] -@pytest.mark.rhv1 @pytest.mark.tier(2) def test_order_catalog_item(appliance, provider, catalog_item, request, register_event): @@ -62,7 +61,6 @@ def test_order_catalog_item(appliance, provider, catalog_item, request, @test_requirements.rest -@pytest.mark.rhv3 @pytest.mark.tier(2) def test_order_catalog_item_via_rest( request, appliance, provider, catalog_item, catalog): @@ -100,7 +98,6 @@ def request_finished(): return req.status.lower() == "ok" and req.request_state.lower() == "finished" -@pytest.mark.rhv3 @pytest.mark.tier(2) def test_order_catalog_bundle(appliance, provider, catalog_item, request): """Tests ordering a catalog bundle @@ -136,7 +133,6 @@ def test_order_catalog_bundle(appliance, provider, catalog_item, request): @pytest.mark.skip('Catalog items are converted to collections. Refactoring is required') -@pytest.mark.rhv3 # Note here this needs to be reduced, doesn't need to test against all providers @pytest.mark.usefixtures('has_no_infra_providers') @pytest.mark.tier(3) @@ -160,7 +156,6 @@ def test_no_template_catalog_item(provider, provisioning, dialog, catalog, appli catalog_item.create() -@pytest.mark.rhv3 @pytest.mark.tier(3) def test_request_with_orphaned_template(appliance, provider, catalog_item): """Tests edit catalog item after deleting provider @@ -185,7 +180,6 @@ def test_request_with_orphaned_template(appliance, provider, catalog_item): assert provision_request.row.status.text == 'Error' -@pytest.mark.rhv3 @test_requirements.filtering @pytest.mark.tier(3) def test_advanced_search_registry_element(request, appliance): diff --git a/cfme/tests/services/test_service_customer_bz.py b/cfme/tests/services/test_service_customer_bz.py index 3cacafb968..22e9b53715 100644 --- a/cfme/tests/services/test_service_customer_bz.py +++ b/cfme/tests/services/test_service_customer_bz.py @@ -27,7 +27,6 @@ ] -@pytest.mark.rhv3 @pytest.mark.tier(2) def test_edit_bundle_entry_point(appliance, provider, catalog_item, request): """Tests editing a catalog bundle enrty point and check if the value is saved. diff --git a/cfme/tests/services/test_service_manual_approval.py b/cfme/tests/services/test_service_manual_approval.py index 7d0cacbcc4..97ebfe6980 100644 --- a/cfme/tests/services/test_service_manual_approval.py +++ b/cfme/tests/services/test_service_manual_approval.py @@ -81,7 +81,6 @@ def modify_instance(create_domain): instance.fields = {"approval_type": {"value": "manual"}} -@pytest.mark.rhv3 @pytest.mark.meta(blockers=[BZ(1633540, forced_streams=['5.10'], unblock=lambda provider: not provider.one_of(RHEVMProvider))]) @pytest.mark.ignore_stream("upstream") diff --git a/cfme/tests/ssui/test_ssui_myservice.py b/cfme/tests/ssui/test_ssui_myservice.py index 56a9eec143..1b8f09cd3c 100644 --- a/cfme/tests/ssui/test_ssui_myservice.py +++ b/cfme/tests/ssui/test_ssui_myservice.py @@ -35,7 +35,6 @@ ] -@pytest.mark.rhv1 @pytest.mark.long_running @pytest.mark.parametrize('context', [ViaSSUI]) def test_myservice_crud(appliance, setup_provider, context, order_service): @@ -84,7 +83,6 @@ def _finalize(): my_service.delete() -@pytest.mark.rhv3 @pytest.mark.long_running @pytest.mark.parametrize('context', [ViaSSUI]) def test_service_start(appliance, setup_provider, context, diff --git a/cfme/tests/ssui/test_ssui_service_catalogs.py b/cfme/tests/ssui/test_ssui_service_catalogs.py index 2f237d0d2e..db00a1b298 100644 --- a/cfme/tests/ssui/test_ssui_service_catalogs.py +++ b/cfme/tests/ssui/test_ssui_service_catalogs.py @@ -26,7 +26,6 @@ ] -@pytest.mark.rhv2 @pytest.mark.parametrize('context', [ViaSSUI]) def test_service_catalog_crud_ssui(appliance, setup_provider, context, order_service): diff --git a/cfme/utils/tests/test_vm_name_assignee.py b/cfme/utils/tests/test_vm_name_assignee.py index 74c9dec53d..00ddafb8be 100644 --- a/cfme/utils/tests/test_vm_name_assignee.py +++ b/cfme/utils/tests/test_vm_name_assignee.py @@ -19,7 +19,6 @@ ] -@pytest.mark.rhv1 def test_vm_name_postfix_1(appliance, create_vm_modscope, provider): """ Test the HTML5 console support for a particular provider. @@ -45,7 +44,6 @@ def test_vm_name_postfix_1(appliance, create_vm_modscope, provider): provider.appliance.provider_based_collection(provider) -@pytest.mark.rhv1 def test_vm_name_postfix_2(appliance, create_vm_modscope, provider): """ Test the HTML5 console support for a particular provider. diff --git a/cfme/utils/tests/test_vm_name_assignee_func_scope.py b/cfme/utils/tests/test_vm_name_assignee_func_scope.py index 1dd7b62b71..906203ddb9 100644 --- a/cfme/utils/tests/test_vm_name_assignee_func_scope.py +++ b/cfme/utils/tests/test_vm_name_assignee_func_scope.py @@ -17,7 +17,6 @@ ] -@pytest.mark.rhv1 @pytest.mark.parametrize('create_vm', ['small_template'], indirect=True) def test_vm_name_postfix_1(appliance, create_vm, provider): """ @@ -44,7 +43,6 @@ def test_vm_name_postfix_1(appliance, create_vm, provider): provider.appliance.provider_based_collection(provider) -@pytest.mark.rhv1 @pytest.mark.parametrize('create_vm', ['small_template'], indirect=True) def test_vm_name_postfix_2(appliance, create_vm, provider): """ diff --git a/conftest.py b/conftest.py index 27ccd124d3..9e4c8cfc2c 100644 --- a/conftest.py +++ b/conftest.py @@ -15,7 +15,6 @@ "cfme.markers.regression", "cfme.markers.requires", "cfme.markers.rhel_tests", - "cfme.markers.rhv", "cfme.markers.sauce", "cfme.markers.serial", "cfme.markers.skipper", diff --git a/scripts/tier_analyzer.py b/scripts/tier_analyzer.py deleted file mode 100755 index cc883cde43..0000000000 --- a/scripts/tier_analyzer.py +++ /dev/null @@ -1,107 +0,0 @@ -#!/usr/bin/env python3 -"""This simple script lists all tests generated for the given provider. Then it lists all the tests -marked with given tier marker(s). In the end it simply compares those two list, showing you tests -that are generated for provider but NOT marked with the tier(s).""" -import argparse -import re -import subprocess -import sys - - -def check_virtualenv(): - """Check if we are in virtualenv and if not, raise an error.""" - if not hasattr(sys, 'real_prefix'): - raise OSError('You must activate CFME virtualenv in oder to run this script.') - - -def get_pytest_collect_only_output(args, use_tier_marker=False): - """ - Get a string that is returned by pytest after invoking it with --collect-only argument. - If use_tier_marker is set to False (default), all the tests for given provider are collected. - If use_tier_marker is set to True, only the marked tests are collected. - """ - print('Getting pytest --collect-only output for provider {} {} tier marker {}.' - .format( - args.provider, - 'with' if use_tier_marker else 'without', - args.tier_marker)) - pytest_args = ['pytest', - args.test_path, - '--collect-only', - '--long-running', - '--use-provider', - args.provider, - '-m'] - if use_tier_marker: - pytest_args.append(args.tier_marker) - else: - pytest_args.append('uses_testgen') - - return subprocess.check_output(pytest_args) - - -def get_testcases_from_pytest_output(output): - """Parse raw pytest --collect-only output to get list of parametrized test cases.""" - test_cases = [] - testcase_regex = \ - re.compile(r"\s*test_\w+)(?P\[.+\])?'>") - for line in output.splitlines(): - match = re.match(pattern=testcase_regex, string=line) - if match: - test_cases.append('{}{}'.format( - match.group('test_case_name'), - match.group('parameters') if match.group('parameters') else '')) - - return test_cases - - -def get_diff_from_lists(all, tiers): - """Get sorted list of test cases that are not marked with tiers.""" - diff = set(all).difference(set(tiers)) - return sorted(diff) - - -def print_message(args, diff, all_parsed, all_count, tiers_parsed, tiers_count): - """Human-readable output.""" - def sep(): - print('*' * 60) - - if args.verbose: - sep() - print(f'There are {all_count} test_cases run for {args.provider} provider:\n') - for test_case in all_parsed: - print(test_case) - sep() - print(f'There are {tiers_count} test_cases marked with "{args.tier_marker}":\n') - for test_case in tiers_parsed: - print(test_case) - - sep() - print('There are {} test cases not marked with "{}":\n'.format(len(diff), args.tier_marker)) - for test_case in diff: - print(test_case) - sep() - - -if __name__ == '__main__': - - parser = argparse.ArgumentParser(description=__doc__) - parser.add_argument('-v', '--verbose', action='store_true') - parser.add_argument('-p', '--provider', action='store', default='rhv_cfme_integration') - parser.add_argument('-t', '--test-path', action='store', default='cfme/tests') - parser.add_argument('-m', '--tier-marker', action='store', default='rhv1 or rhv2 or rhv3') - args = parser.parse_args() - - check_virtualenv() - - output_with_tiers = get_pytest_collect_only_output(args, use_tier_marker=True) - output_without_tiers = get_pytest_collect_only_output(args, use_tier_marker=False) - tiers_parsed = get_testcases_from_pytest_output(output_with_tiers) - all_parsed = get_testcases_from_pytest_output(output_without_tiers) - - tiers_count = len(tiers_parsed) - all_count = len(all_parsed) - - final_diff = get_diff_from_lists(all_parsed, tiers_parsed) - - print_message(args, final_diff, all_parsed, all_count, tiers_parsed, tiers_count)