Skip to content
This repository has been archived by the owner on Apr 7, 2022. It is now read-only.

[1LP][RFR][NOTEST] Add tests for resolved bugs #9786

Merged
merged 11 commits into from
Jan 7, 2020
7 changes: 7 additions & 0 deletions cfme/tests/cli/test_appliance_console_db_restore.py
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,7 @@ def test_appliance_console_restore_db_replicated(

@pytest.mark.tier(2)
@pytest.mark.ignore_stream('upstream')
@pytest.mark.meta(automates=[1740515])
def test_appliance_console_restore_db_ha(request, unconfigured_appliances, app_creds):
"""Configure HA environment with providers, run backup/restore on configuration,
Confirm that ha failover continues to work correctly and providers still exist.
Expand All @@ -518,6 +519,8 @@ def test_appliance_console_restore_db_ha(request, unconfigured_appliances, app_c
caseimportance: high
casecomponent: Appliance
initialEstimate: 1/4h
Bugzilla:
1740515
"""
pwd = app_creds["password"]
appl1, appl2, appl3 = configure_appliances_ha(unconfigured_appliances, pwd)
Expand Down Expand Up @@ -570,6 +573,7 @@ def test_appliance_console_restore_db_ha(request, unconfigured_appliances, app_c

@pytest.mark.tier(2)
@pytest.mark.ignore_stream('upstream')
@pytest.mark.meta(automates=[1633573])
def test_appliance_console_restore_db_nfs(request, two_appliances_one_with_providers,
utility_vm, utility_vm_nfs_ip):
""" Test single appliance backup and restore through nfs, configures appliance with providers,
Expand All @@ -580,6 +584,9 @@ def test_appliance_console_restore_db_nfs(request, two_appliances_one_with_provi
casecomponent: Configuration
caseimportance: critical
initialEstimate: 1h

Bugzilla:
1633573
"""
appl1, appl2 = two_appliances_one_with_providers
vm, _, data = utility_vm
Expand Down
26 changes: 26 additions & 0 deletions cfme/tests/cli/test_appliance_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,32 @@ def test_update_yum(appliance_preupdate, appliance):
assert result.output in appliance.version


@pytest.mark.manual
@pytest.mark.meta(coverage=[1674055])
def test_update_yum_no_errors(old_version):
""" Test that the yum update doesn't spill any erros or warnings.

Polarion:
assignee: jhenner
caseimportance: high
casecomponent: Appliance
initialEstimate: 1/4h
testSteps:
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add expectedResults?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

1. Boot preupdate CFME
2. Add repos to update to.
3. Do the yum update, check there are no errors in the stderr and
perhaps also in stdout.
expectedResults:
1.
2.
3. No erros in the stderr and stdout, yum exit status is 0

ganeshhubale marked this conversation as resolved.
Show resolved Hide resolved
Bugzilla:
1674055
"""
pass

Copy link
Contributor

Choose a reason for hiding this comment

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

Though not functionally necessary, we always have pass in manual case definitions

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done


@pytest.mark.ignore_stream("upstream")
def test_update_webui(appliance_with_providers, appliance, request, old_version):
""" Tests updating an appliance with providers, also confirms that the
Expand Down
5 changes: 4 additions & 1 deletion cfme/tests/cloud_infra_common/test_provisioning.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ def copy_domains(original_request_class, domain):


# Not collected for EC2 in generate_tests above
@pytest.mark.meta(blockers=[BZ(1713632)])
@pytest.mark.meta(automates=[BZ(1713632)])
@pytest.mark.parametrize("disks", [1, 2])
Copy link
Member

Choose a reason for hiding this comment

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

💯

@pytest.mark.provider([OpenStackProvider], required_fields=[['provisioning', 'image']])
def test_cloud_provision_from_template_with_attached_disks(
Expand All @@ -400,6 +400,9 @@ def test_cloud_provision_from_template_with_attached_disks(
caseimportance: high
casecomponent: Provisioning
initialEstimate: 1/4h

Bugzilla:
1713632
"""
vm_name, inst_args = instance_args
# Modify availiability_zone for Azure provider
Expand Down
78 changes: 78 additions & 0 deletions cfme/tests/configure/test_config_manual.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,3 +336,81 @@ def test_subscription_region_unavailable():
7. Replication tab is being opened for long time and finally displays 502 error alert
"""
pass


@pytest.mark.manual
@test_requirements.settings
@pytest.mark.meta(coverage=[1715633])
def test_memory_thresholds_in_advanced_config():
"""
Test whether change made to thresholds in Advanced Config shows on the
workers page.

Polarion:
assignee: jhenner
casecomponent: Configuration
caseimportance: high
initialEstimate: 1/4h
testSteps:
1. Settings > Advanced
2. Change web_services worker to 1.5.gigabytes
3. Change the web_services worker to 2.gigabytes
expectedResults:
1.
2. UI shows 1.5GB for the web_services in the Workers tab.
3. UI shows 2GB for the web_services in the Workers tab.
Bugzilla:
1715633
"""
pass


@pytest.mark.manual
@test_requirements.settings
@pytest.mark.meta(coverage=[1658373])
@pytest.mark.meta(blocker=[1787350])
def test_memory_thresholds_workers_tab():
"""
Test whether change made to thresholds in the Workers tab affect the values in
the advanced config

Polarion:
assignee: jhenner
casecomponent: Configuration
caseimportance: high
initialEstimate: 1/4h
testSteps:
1. Settings > [pick server in zone] > Workers
2. Change Generic workers to 1.1 GB
3. Change the Priority Workers to 1.1 GB
expectedResults:
Copy link
Member

Choose a reason for hiding this comment

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

  • Remove extra line(357)
  • Also we do not have step 3 then expectedResults should be of step 2

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

1.
2. The memory_threshold field for the generic_worker shows value
1181116006.4 which is 1.1 * (1024**3)
(BZ 1787350)
3. The memory_threshold field for the priority_worker shows value
1181116006.4 which is 1.1 * (1024**3)
(BZ 1787350)
Bugzilla:
1658373
"""
pass


@pytest.mark.manual
@pytest.mark.meta(coverage=[1625788])
def test_default_miq_group_is_tenant_group():
"""
Test whether the
Tenant.root_tenant.default_miq_group.tenant_group? == true

Polarion:
assignee: jhenner
casecomponent: Configuration
initialEstimate: 1/8h
startsin: 5.10.0.18
caseimportance: high
Bugzilla:
1625788
"""
pass
53 changes: 52 additions & 1 deletion cfme/tests/test_db_migrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@


def pytest_generate_tests(metafunc):
if metafunc.function in {test_upgrade_single_inplace, test_db_migrate_replication}:
if metafunc.function in {test_upgrade_single_inplace,
test_db_migrate_replication,
test_upgrade_single_sidebyside}:
return

argnames, argvalues, idlist = ['db_url', 'db_version', 'db_desc'], [], []
Expand Down Expand Up @@ -114,12 +116,15 @@ def download_and_migrate_db(app, db_url):

@pytest.mark.ignore_stream('upstream')
@pytest.mark.tier(2)
@pytest.mark.meta(automates=[1734076])
def test_db_migrate(temp_appliance_extended_db, db_url, db_version, db_desc):
"""
Polarion:
assignee: jhenner
initialEstimate: 1/4h
casecomponent: Appliance
Bugzilla:
1734076
"""
download_and_migrate_db(temp_appliance_extended_db, db_url)

Expand Down Expand Up @@ -210,3 +215,49 @@ def test_upgrade_single_inplace(appliance_preupdate, appliance):
appliance_preupdate.wait_for_web_ui()
result = appliance_preupdate.ssh_client.run_command('cat /var/www/miq/vmdb/VERSION')
assert result.output in appliance.version


@pytest.mark.manual
@test_requirements.update
@test_requirements.db_migration
@pytest.mark.meta(coverage=[1749694, 1735114, 1655794])
def test_upgrade_single_sidebyside():
""" Test whether an upgrade procedure from CFME 5.x to CFME 5.11 results in
working environment.

Note that only the sidebyside upgrade to to CFME 5.11 is supported.

Note this test is quite similar test_db_migrate and perhaps can be removed
after the zone checking and ansible checking is implemented there.

Polarion:
assignee: jhenner
casecomponent: Appliance
caseimportance: critical
initialEstimate: 1/3h
startsin: 5.11
testSteps:
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add expectedResults

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

1. Get CFME VMs of preupgrade and target version.
2. Make sure the ansible is enabled and create an ansible playbook
service (for testing the 1735114).
3. Turn off the evmserverd processes on both.
4. Dump the DB of the preupgrade appliance.
5. Restore it on the target version appliance.
6. Migrate the database.
7. Check that a zone exists on the target appliance (as there was a bug 1749694)
8. Check that the service provisioning tab doesn't
expectedResults:
1.
2.
3.
4.
5.
6.
7. Zone exists on the target appliance.
8. An empty section or a friendly message such as "No Output available"
Bugzila:
1749694
1735114
1655794
"""
ganeshhubale marked this conversation as resolved.
Show resolved Hide resolved
pass