:TestType: nonfunctional :CaseImportance: High :SubType1: installability :Upstream: No """ import pytest from upgrade_tests.helpers.common import existence from upgrade_tests.helpers.existence import compare_postupgrade from upgrade_tests.helpers.existence import pytest_ids # Required Data component = 'architecture' arc_name = compare_postupgrade(component, 'name') # Tests @pytest.mark.parametrize("pre,post", arc_name, ids=pytest_ids(arc_name)) def test_positive_architectures_by_name(pre, post): """Test all architectures are existing after upgrade by names :id: upgrade-eb6d3728-6b0b-4cb7-888e-8d64a46e7beb :expectedresults: All architectures should be retained post upgrade by names """ assert existence(pre, post)
import pytest from upgrade_tests.helpers.common import existence from upgrade_tests.helpers.existence import compare_postupgrade, pytest_ids # Required Data component = 'activation-key' aks_cv = compare_postupgrade(component, 'content view') aks_lc = compare_postupgrade(component, 'lifecycle environment') aks_name = compare_postupgrade(component, 'name') aks_hl = compare_postupgrade(component, ('consumed', 'host limit', 'host limit', 'host limit', 'host limit', 'host limit')) # Tests @pytest.mark.parametrize("pre,post", aks_cv, ids=pytest_ids(aks_cv)) def test_positive_aks_by_content_view(pre, post): """Test CV association of all AKs post upgrade :id: upgrade-37804d7c-3667-45f3-8039-891908372ce7 :expectedresults: CV of all AKs should be retained post upgrade """ assert existence(pre, post) @pytest.mark.parametrize("pre,post", aks_lc, ids=pytest_ids(aks_lc)) def test_positive_aks_by_lc(pre, post): """Test LC association of all AKs post upgrade :id: upgrade-16dc1ae8-f30d-45c3-8289-f0f0736ca603
""" import pytest from upgrade_tests.helpers.common import existence from upgrade_tests.helpers.existence import compare_postupgrade from upgrade_tests.helpers.existence import pytest_ids # Required Data component = 'virt-who-config' virtwho_name = compare_postupgrade(component, 'name') virtwho_interval = compare_postupgrade(component, 'interval') virtwho_status = compare_postupgrade(component, 'status') # Tests @pytest.mark.parametrize("pre,post", virtwho_name, ids=pytest_ids(virtwho_name)) def test_positive_virt_who_by_name(pre, post): """Test all virt-who configs are existing post upgrade by their name :id: upgrade-68e6a1dd-9b65-41ee-983b-0f2101300cd8 :expectedresults: All virt-who configs should be retained post upgrade """ assert existence(pre, post) @pytest.mark.parametrize("pre,post", virtwho_interval, ids=pytest_ids(virtwho_interval)) def test_positive_virt_who_by_interval(pre, post): """Test all virt-who configs interval are existing post upgrade :id: upgrade-84702862-aef1-4b19-9007-dbb4e65a78c2
from upgrade_tests.helpers.existence import compare_postupgrade from upgrade_tests.helpers.existence import pytest_ids # Required Data component = 'hostgroup' hg_name = compare_postupgrade(component, 'name') hg_os = compare_postupgrade(component, 'operating system') hg_lc = compare_postupgrade( component, ('environment', 'environment', 'environment', 'puppet environment', 'puppet environment', 'puppet environment', 'puppet environment', 'puppet environment')) # Tests @pytest.mark.parametrize("pre,post", hg_name, ids=pytest_ids(hg_name)) def test_positive_hostgroups_by_name(pre, post): """Test all hostgroups are existing post upgrade by their names :id: upgrade-61739c36-30da-4f52-957c-abb1d0e728c7 :expectedresults: All hostgroups should be retained post upgrade """ assert existence(pre, post) @pytest.mark.parametrize("pre,post", hg_os, ids=pytest_ids(hg_os)) def test_positive_hostgroups_by_os(pre, post): """Test OS associations of all hostgroups post upgrade :id: upgrade-b2af5ad8-f7c8-49e6-9a9a-b31defb31e98
:TestType: nonfunctional :CaseImportance: High :SubType1: installability :Upstream: No """ import pytest from upgrade_tests.helpers.common import existence from upgrade_tests.helpers.existence import compare_postupgrade from upgrade_tests.helpers.existence import pytest_ids # Required Data component = 'medium' med_name = compare_postupgrade(component, 'name') # Tests @pytest.mark.parametrize("pre,post", med_name, ids=pytest_ids(med_name)) def test_positive_mediums_by_name(pre, post): """Test all OS mediums are existing after upgrade by names :id: upgrade-fe7786be-61ea-4276-81c7-6228389c4b84 :expectedresults: All OS mediums should be retained post upgrade by names """ assert existence(pre, post)
:Upstream: No """ import pytest from upgrade_tests.helpers.common import existence from upgrade_tests.helpers.existence import compare_postupgrade, pytest_ids # Required Data component = 'filter' fil_rtype = compare_postupgrade(component, 'resource type') fil_search = compare_postupgrade(component, 'search') fil_unlimited = compare_postupgrade(component, 'unlimited?') fil_role = compare_postupgrade(component, 'role') fil_perm = compare_postupgrade(component, 'permissions') @pytest.mark.parametrize("pre,post", fil_rtype, ids=pytest_ids(fil_rtype)) def test_positive_filters_by_resource_type(pre, post): """Test all filters of all roles are existing after upgrade by resource types :id: upgrade-362f4b0c-49bb-424d-92e4-446ec59b8c5c :expectedresults: All filters of all roles should be retained post upgrade by resource types """ assert existence(pre, post, component) @pytest.mark.parametrize("pre,post", fil_search, ids=pytest_ids(fil_search)) def test_positive_filters_by_search(pre, post): """Test all filters search criteria is existing after upgrade
:Upstream: No """ import pytest from upgrade_tests.helpers.common import run_to_upgrade from upgrade_tests.helpers.existence import compare_postupgrade, pytest_ids # Required Data component = 'sc-param' scp_names = compare_postupgrade(component, 'parameter') scp_dval = compare_postupgrade(component, 'default value') scp_ovrde = compare_postupgrade(component, 'override') scp_pclass = compare_postupgrade(component, 'puppet class') # Tests @pytest.mark.parametrize("pre,post", scp_names, ids=pytest_ids(scp_names)) def test_positive_smart_params_by_name(pre, post): """Test all smart parameters are existing after upgrade by names :id: upgrade-44113fb7-eab2-439b-986c-6110a1c15d54 :expectedresults: All smart parameters should be retained post upgrade by names """ assert pre == post @pytest.mark.parametrize("pre,post", scp_dval, ids=pytest_ids(scp_dval)) def test_positive_smart_params_by_default_value(pre, post): """Test all smart parameters default values are retained after upgrade
:Upstream: No """ import pytest from upgrade_tests.helpers.common import dont_run_to_upgrade, existence from robozilla.decorators import pytest_skip_if_bug_open from upgrade_tests.helpers.existence import compare_postupgrade, pytest_ids # Required Data component = 'content-host' ch_name = compare_postupgrade(component, 'name') ch_errata = compare_postupgrade(component, 'installable errata') # Tests @dont_run_to_upgrade('6.3') @pytest.mark.parametrize("pre,post", ch_name, ids=pytest_ids(ch_name)) def test_positive_contenthosts_by_name(pre, post): """Test all content hosts are existing after upgrade by names :id: upgrade-aa92463b-e693-4c30-b0cb-e2cafdab1c7f :expectedresults: All content hosts should be retained post upgrade by names """ assert existence(pre, post) @dont_run_to_upgrade('6.3') @pytest_skip_if_bug_open('bugzilla', 1461397) @pytest.mark.parametrize("pre,post", ch_errata, ids=pytest_ids(ch_errata)) def test_positive_installable_erratas_by_name(pre, post):
""" import pytest from upgrade_tests.helpers.common import run_to_upgrade from upgrade_tests.helpers.existence import compare_postupgrade, pytest_ids # Required Data component = 'capsule' cap_features = compare_postupgrade(component, 'features') cap_name = compare_postupgrade(component, 'name') cap_url = compare_postupgrade(component, 'url') # Tests @run_to_upgrade('6.2') @pytest.mark.parametrize( "pre,post", cap_features, ids=pytest_ids(cap_features)) def test_positive_capsules_by_features(pre, post): """Test all features of each capsule are existing post upgrade :id: upgrade-6d3b8f24-2d51-465c-8d01-5a159aa89f2f :expectedresults: All features of all capsules should be retained post upgrade """ assert pre == post @pytest.mark.parametrize("pre,post", cap_name, ids=pytest_ids(cap_name)) def test_positive_capsules_by_name(pre, post): """Test all capsules are existing after upgrade by their names
:Upstream: No """ import pytest from upgrade_tests.helpers.common import existence from upgrade_tests.helpers.existence import compare_postupgrade from upgrade_tests.helpers.existence import pytest_ids # Required Data component = 'policy' policy_id = compare_postupgrade(component, 'id') policy_name = compare_postupgrade(component, 'name') # Tests @pytest.mark.parametrize("pre,post", policy_name, ids=pytest_ids(policy_name)) def test_positive_policy_by_name(pre, post): """Test all policies existence by name after post upgrade :id: upgrade-3b733e91-f593-49f4-87bf-2eb6b1a0ccf5 :expectedresults: All policies name should be retained after post upgrade """ assert existence(pre, post) @pytest.mark.parametrize("pre,post", policy_id, ids=pytest_ids(policy_id)) def test_positive_policy_id(pre, post): """Test all policies id's existence after post upgrade" :id: upgrade-9974fbf6-df36-417d-a024-bfa27ee99407
:CaseImportance: High :Upstream: No """ import pytest from upgrade_tests.helpers.existence import compare_postupgrade, pytest_ids # Required Data component_class = 'puppet-class' pc_name = compare_postupgrade(component_class, 'name') component_module = 'puppet-module' pm_name = compare_postupgrade(component_module, 'name') # Tests @pytest.mark.parametrize("pre,post", pc_name, ids=pytest_ids(pc_name)) def test_positive_puppet_classes_by_name(pre, post): """Test all puppet classes are existing after upgrade by names :id: 44e7617c-4092-42bd-9b28-907c034966f7 :expectedresults: All puppet classes should be retained post upgrade by names """ assert pre == post @pytest.mark.parametrize("pre,post", pm_name, ids=pytest_ids(pm_name)) def test_positive_puppet_modules_by_name(pre, post): """Test all puppet modules are existing after upgrade by names
""" import pytest from upgrade_tests.helpers.common import existence from upgrade_tests.helpers.existence import compare_postupgrade, pytest_ids # Required Data component = 'virt-who-config' virtwho_name = compare_postupgrade(component, 'name') virtwho_interval = compare_postupgrade(component, 'interval') virtwho_status = compare_postupgrade(component, 'status') # Tests @pytest.mark.parametrize("pre,post", virtwho_name, ids=pytest_ids(virtwho_name)) def test_positive_virt_who_by_name(pre, post): """Test all virt-who configs are existing post upgrade by their name :id: upgrade-68e6a1dd-9b65-41ee-983b-0f2101300cd8 :expectedresults: All virt-who configs should be retained post upgrade """ assert existence(pre, post) @pytest.mark.parametrize("pre,post", virtwho_interval, ids=pytest_ids(virtwho_interval)) def test_positive_virt_who_by_interval(pre, post): """Test all virt-who configs interval are existing post upgrade
:Upstream: No """ import pytest from upgrade_tests.helpers.common import existence from upgrade_tests.helpers.existence import compare_postupgrade, compare_templates, pytest_ids # Required Data component = 'template' temp_name = compare_postupgrade(component, 'name') ptables_templates = compare_templates('partition-table') job_templates = compare_templates('job-template') provi_templates = compare_templates('template') # Tests @pytest.mark.parametrize("pre,post", temp_name, ids=pytest_ids(temp_name)) def test_positive_templates_by_name(pre, post): """Test all templates are existing after upgrade by names :id: upgrade-fce33637-8e7b-4ccf-a9fb-47f0e0607f83 :expectedresults: All templates should be retained post upgrade by names """ assert existence(pre, post, component) @pytest.mark.parametrize("pre, post", ptables_templates, ids=pytest_ids(ptables_templates)) def test_positive_partitiontable_templates(pre, post): """Test all ptable templates contents are migrated as expected :id: upgrade-33f1b9ce-5c18-41eb-a41f-dad2ff0429f6
""" import pytest from upgrade_tests.helpers.common import existence from robozilla.decorators import pytest_skip_if_bug_open from upgrade_tests.helpers.existence import compare_postupgrade, pytest_ids # Required Data component = 'organization' org_id = compare_postupgrade(component, 'id') org_name = compare_postupgrade(component, 'name') org_label = compare_postupgrade(component, 'label') org_desc = compare_postupgrade(component, 'description') # Tests @pytest.mark.parametrize("pre,post", org_id, ids=pytest_ids(org_id)) def test_positive_organizations_by_id(pre, post): """Test all organizations are existing after upgrade by id's :id: upgrade-d7eceba4-8076-4d46-aeaf-0679ea38586c :expectedresults: All organizations should be retained post upgrade by id's """ assert existence(pre, post) @pytest.mark.parametrize("pre,post", org_name, ids=pytest_ids(org_name)) def test_positive_organizations_by_name(pre, post): """Test all organizations are existing after upgrade by names :id: upgrade-361414af-fb7f-4b7b-bf5a-9b3d9cc82d03
:Upstream: No """ import pytest from upgrade_tests.helpers.common import existence from upgrade_tests.helpers.existence import compare_postupgrade, pytest_ids # Required Data component = 'user' user_name = compare_postupgrade(component, 'name') user_login = compare_postupgrade(component, 'login') user_email = compare_postupgrade(component, 'email') # Tests @pytest.mark.parametrize("pre,post", user_name, ids=pytest_ids(user_name)) def test_positive_users_by_name(pre, post): """Test all users are existing post upgrade by their name :id: upgrade-1accdb79-7dd6-4cf7-904a-b179e108ba2d :expectedresults: All users should be retained post upgrade """ assert existence(pre, post) @pytest.mark.parametrize("pre,post", user_login, ids=pytest_ids(user_login)) def test_positive_users_by_login(pre, post): """Test all users login name are existing post upgrade :id: upgrade-1b8cba29-38e7-4d65-a8b2-4f5abab511dd
# Required Data component = 'discovery' dis_name = compare_postupgrade(component, 'name') dis_mac = compare_postupgrade(component, 'mac') dis_cpus = compare_postupgrade(component, 'cpus') dis_mem = compare_postupgrade(component, 'memory') dis_disks = compare_postupgrade(component, 'disk count') dis_size = compare_postupgrade(component, 'disks size') dis_subnet = compare_postupgrade(component, 'subnet') to_version = os.environ.get('TO_VERSION') from_version = os.environ.get('FROM_VERSION') # Tests @pytest.mark.parametrize("pre,post", dis_name, ids=pytest_ids(dis_name)) def test_positive_discovery_by_name(pre, post): """Test all architectures are existing after upgrade by names :id: upgrade-2322766f-0731-4e80-bf54-d48a8756406d :expectedresults: All architectures should be retained post upgrade by names """ assert existence(pre, post) @pytest.mark.parametrize("pre,post", dis_mac, ids=pytest_ids(dis_mac)) def test_positive_discovery_by_mac(pre, post): """Test discovered hosts mac is retained after upgrade
# Required Data if float(os.environ.get('TO_VERSION')) >= 6.3: component = 'discovery-rule' else: component = 'discovery_rule' drule_name = compare_postupgrade(component, 'name') drule_prio = compare_postupgrade(component, 'priority') drule_search = compare_postupgrade(component, 'search') drule_hg = compare_postupgrade(component, 'host group') drule_hl = compare_postupgrade(component, 'hosts limit') drule_enable = compare_postupgrade(component, 'enabled') # Tests @pytest.mark.parametrize("pre,post", drule_name, ids=pytest_ids(drule_name)) def test_positive_discovery_rules_by_name(pre, post): """Test all discovery rules are existing after upgrade by name :id: upgrade-0d7e8920-5717-4196-af8a-977cfba33184 :expectedresults: All discovery rules should be retained post upgrade by names """ assert existence(pre, post) @pytest.mark.parametrize("pre,post", drule_prio, ids=pytest_ids(drule_prio)) def test_positive_discovery_rules_by_priority(pre, post): """Test all discovery rules priorities are existing after upgrade
:CaseComponent: Hosts :TestType: nonfunctional :CaseImportance: High :SubType1: installability :Upstream: No """ import pytest from upgrade_tests.helpers.common import existence from upgrade_tests.helpers.existence import compare_postupgrade, pytest_ids # Required Data component = 'partition-table' ptable_name = compare_postupgrade(component, 'name') # Tests @pytest.mark.parametrize("pre,post", ptable_name, ids=pytest_ids(ptable_name)) def test_positive_partition_tables_by_name(pre, post): """Test all partition tables are existing after upgrade by names :id: upgrade-7832ab52-75e5-4451-aee3-5b208ced0e67 :expectedresults: All architectures should be retained post upgrade by names """ assert existence(pre, post)
:SubType1: installability :Upstream: No """ import pytest from upgrade_tests.helpers.existence import compare_postupgrade, pytest_ids # Required Data component = 'product' prod_name = compare_postupgrade(component, 'name') prod_repo = compare_postupgrade(component, 'repositories') # Tests @pytest.mark.parametrize("pre,post", prod_name, ids=pytest_ids(prod_name)) def test_positive_products_by_name(pre, post): """Test all products are existing after upgrade by names :id: upgrade-3dea1ee4-ed57-4341-957a-d9b1813ff4db :expectedresults: All products should be retained post upgrade by names """ assert pre == post @pytest.mark.parametrize("pre,post", prod_repo, ids=pytest_ids(prod_repo)) def test_positive_products_by_repositories(pre, post): """Test all products association with their repositories are existing after upgrade
:TestType: nonfunctional :CaseImportance: High :SubType1: installability :Upstream: No """ import pytest from upgrade_tests.helpers.common import existence from upgrade_tests.helpers.existence import compare_postupgrade from upgrade_tests.helpers.existence import pytest_ids # Required Data component = 'contentview' cv_chosts = compare_postupgrade(component, 'content_host_count') # Tests @pytest.mark.parametrize("pre,post", cv_chosts, ids=pytest_ids(cv_chosts)) def test_positive_cv_by_chosts_count(pre, post): """Test Contents hosts association is retained with CVs post upgrade :id: upgrade-3bd14640-89c6-4463-af57-06b822c8eff6 :expectedresults: Content Hosts of all CVs should be retained post upgrade """ assert existence(pre, post)
import pytest from robozilla.decorators import pytest_skip_if_bug_open from upgrade_tests.helpers.common import existence from upgrade_tests.helpers.existence import compare_postupgrade, pytest_ids # Required Data component = 'host' host_ip = compare_postupgrade(component, 'ip') host_mac = compare_postupgrade(component, 'mac') host_hg = compare_postupgrade(component, 'host group') host_os = compare_postupgrade(component, 'operating system') host_name = compare_postupgrade(component, 'name') # Tests @pytest.mark.parametrize("pre,post", host_ip, ids=pytest_ids(host_ip)) def test_positive_hosts_by_ip(pre, post): """Test ip associations of all hosts post upgrade :id: upgrade-3b4f8315-8490-42bc-8afa-4a6c267558d7 :expectedresults: IP of each host should be associated to its respective host post upgrade """ assert existence(pre, post) @pytest_skip_if_bug_open('bugzilla', 1289510) @pytest.mark.parametrize("pre,post", host_mac, ids=pytest_ids(host_mac)) def test_positive_hosts_by_mac(pre, post): """Test mac associations of all hosts post upgrade
:Upstream: No """ import pytest from upgrade_tests.helpers.common import dont_run_to_upgrade, existence from upgrade_tests.helpers.existence import compare_postupgrade, pytest_ids # Required Data component = 'settings' sett_name = compare_postupgrade(component, 'name') sett_value = compare_postupgrade(component, 'value') sett_desc = compare_postupgrade(component, 'description') # Tests @dont_run_to_upgrade('6.1') @pytest.mark.parametrize("pre,post", sett_name, ids=pytest_ids(sett_name)) def test_positive_settings_by_name(pre, post): """Test all settings are existing post upgrade by their names :id: upgrade-802b547a-d9b1-4537-ba38-65d67985a94f :expectedresults: All settings should be retained post upgrade """ assert existence(pre, post) @dont_run_to_upgrade('6.1') @pytest.mark.parametrize("pre,post", sett_value, ids=pytest_ids(sett_value)) def test_positive_settings_by_value(pre, post): """Test all settings value are preserved post upgrade
:CaseImportance: High :Upstream: No """ import pytest from upgrade_tests.helpers.existence import compare_postupgrade, pytest_ids # Required Data component = 'subnet' sub_name = compare_postupgrade(component, 'name') sub_network = compare_postupgrade(component, 'network') sub_mask = compare_postupgrade(component, 'mask') # Tests @pytest.mark.parametrize("pre,post", sub_name, ids=pytest_ids(sub_name)) def test_positive_subnets_by_name(pre, post): """Test all subnets are existing post upgrade by their name :id: 07b32bf4-2205-4b9c-8af0-69c801058785 :expectedresults: All subnets should be retained post upgrade """ assert pre == post @pytest.mark.parametrize("pre,post", sub_network, ids=pytest_ids(sub_network)) def test_positive_subnets_by_network(pre, post): """Test all subnets network ip's are existing post upgrade :id: 72d77821-15cd-4803-a7bd-623aeb7c692e
:Upstream: No """ import pytest from upgrade_tests.helpers.common import existence from upgrade_tests.helpers.existence import compare_postupgrade from upgrade_tests.helpers.existence import pytest_ids # Required Data component = 'compute-resource' comp_name = compare_postupgrade(component, 'name') comp_provider = compare_postupgrade(component, 'provider') @pytest.mark.parametrize("pre,post", comp_name, ids=pytest_ids(comp_name)) def test_positive_compute_resources_by_name(pre, post): """Test all compute resources are existing post upgrade by their name :id: upgrade-24f05707-4547-458c-bb7e-96be35d3f043 :expectedresults: All compute resources should be retained post upgrade """ assert existence(pre, post) @pytest.mark.parametrize("pre,post", comp_provider, ids=pytest_ids(comp_provider)) def test_positive_compute_resources_by_provider(pre, post): """Test all compute resources provider are existing post upgrade
:SubType1: installability :Upstream: No """ import pytest from upgrade_tests.helpers.existence import compare_postupgrade, pytest_ids # Required Data component = 'repository' repo_name = compare_postupgrade(component, 'name') repo_prod = compare_postupgrade(component, 'product') repo_ctype = compare_postupgrade(component, 'content type') # Tests @pytest.mark.parametrize("pre,post", repo_name, ids=pytest_ids(repo_name)) def test_positive_repositories_by_name(pre, post): """Test all repositories are existing after upgrade by names :id: upgrade-13811137-89f7-4dc7-b4b5-4aed91546bd5 :expectedresults: All repositories should be retained post upgrade by names """ assert pre == post @pytest.mark.parametrize("pre,post", repo_prod, ids=pytest_ids(repo_prod)) def test_positive_repositories_by_product(pre, post): """Test all repositories association with products are existing after upgrade
:CaseAutomation: Automated :CaseLevel: Acceptance :CaseComponent: CLI :TestType: NonFunctional :CaseImportance: High :Upstream: No """ import pytest from upgrade_tests.helpers.existence import compare_postupgrade, pytest_ids # Required Data component = 'role' role_name = compare_postupgrade(component, 'name') # Tests @pytest.mark.parametrize("pre,post", role_name, ids=pytest_ids(role_name)) def test_positive_roles_by_name(pre, post): """Test all roles are existing post upgrade by their name :id: 0ee07ffb-ae2b-4b98-ad0a-5a0db568fc1e :expectedresults: All roles should be retained post upgrade """ assert pre == post
from upgrade_tests.helpers.common import existence, dont_run_to_upgrade from upgrade_tests.helpers.existence import compare_postupgrade, pytest_ids # Required Data component = 'smart-variable' sv_name = compare_postupgrade( component, ('name', 'name', 'variable', 'variable', 'variable', 'variable')) sv_dv = compare_postupgrade(component, 'default value') sv_type = compare_postupgrade(component, 'type') sv_pclass = compare_postupgrade(component, 'puppet class') # Tests @dont_run_to_upgrade('6.1') @pytest.mark.parametrize("pre,post", sv_name, ids=pytest_ids(sv_name)) def test_positive_smart_variables_by_name(pre, post): """Test all smart variables are existing after upgrade by names :id: upgrade-d2543c28-135d-4e8f-8fe6-f510f74f51b9 :expectedresults: All smart variables should be retained post upgrade by names """ assert existence(pre, post) @dont_run_to_upgrade('6.1') @pytest.mark.parametrize("pre,post", sv_dv, ids=pytest_ids(sv_dv)) def test_positive_smart_variables_by_default_value(pre, post): """Test all smart variables default values are retained after upgrade
import pytest from upgrade_tests.helpers.common import existence from upgrade_tests.helpers.existence import compare_postupgrade, pytest_ids # Required Data component = 'subscription' sub_name = compare_postupgrade(component, 'name') sub_uuid = compare_postupgrade(component, ('id', 'uuid', 'uuid', 'uuid', 'uuid')) sub_support = compare_postupgrade(component, 'support') sub_qntity = compare_postupgrade(component, 'quantity') sub_consume = compare_postupgrade(component, 'consumed') sub_edate = compare_postupgrade(component, 'end date') # Tests @pytest.mark.parametrize("pre,post", sub_name, ids=pytest_ids(sub_name)) def test_positive_subscriptions_by_name(pre, post): """Test all subscriptions are existing after upgrade by names :id: upgrade-535d6529-27cb-4c6f-959e-6d0684e77aa6 :expectedresults: All subscriptions should be retained post upgrade by names """ assert existence(pre, post) @pytest.mark.parametrize("pre,post", sub_uuid, ids=pytest_ids(sub_uuid)) def test_positive_subscriptions_by_uuid(pre, post): """Test all subscriptions uuids are existing after upgrade
from upgrade_tests.helpers.common import dont_run_to_upgrade from upgrade_tests.helpers.common import existence from upgrade_tests.helpers.existence import compare_postupgrade from upgrade_tests.helpers.existence import pytest_ids # Required Data component = 'content-view' cvs_repo = compare_postupgrade(component, 'repository ids') cvs_label = compare_postupgrade(component, 'label') cvs_composite = compare_postupgrade(component, 'composite') cvs_name = compare_postupgrade(component, 'name') # Tests @pytest_skip_if_bug_open('bugzilla', 1461026) @pytest.mark.parametrize("pre,post", cvs_repo, ids=pytest_ids(cvs_repo)) def test_positive_cvs_by_repository_ids(pre, post): """Test repository associations of all CVs post upgrade :id: upgrade-c8da27df-7d96-44b7-ab2a-d23a56ea2b2b :expectedresults: Repositories associations of each CV should be retained post upgrade """ if ',' in pre: pre = sorted([num.strip() for num in pre.split(',')]) if ',' in post: post = sorted([num.strip() for num in post.split(',')]) assert existence(pre, post)
:SubType1: installability :Upstream: No """ import pytest from upgrade.helpers import settings from upgrade_tests.helpers.common import existence from upgrade_tests.helpers.existence import compare_postupgrade from upgrade_tests.helpers.existence import pytest_ids # Required Data component = 'domain' dom_subnets = compare_postupgrade(component, 'subnets') # Tests @pytest.mark.parametrize("pre,post", dom_subnets, ids=pytest_ids(dom_subnets)) def test_positive_domains_by_subnet(pre, post): """Test subnets of domains are existing post upgrade :id: upgrade-1cc40da2-b5fa-48ed-96c8-448781c8116f :expectedresults: Subnets of all domains should be retained post upgrade """ if settings.upgrade.to_version == '6.4': if post: [subnet.pop('description') for subnet in post] assert existence(pre, post)