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

Commit af563c9

Browse files
authored
Merge pull request #8989 from izapolsk/multi-region-tests
[1LP][RFR] Adding Multi-Region FA requirement and appropriate tests
2 parents 741dade + 6c47555 commit af563c9

File tree

9 files changed

+183
-91
lines changed

9 files changed

+183
-91
lines changed

cfme/test_requirements.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,6 @@ def test_quota_alert():
120120
assignee_id='ndhandre',
121121
)
122122

123-
multi_tenancy = pytest.mark.requirement(
124-
"MIQ Multi-Tenancy",
125-
description='Support for Tenants in MIQ/CFME',
126-
assignee_id='nachandr',
127-
)
128-
129123
chargeback = pytest.mark.requirement(
130124
"Chargeback",
131125
description='Chargeback rates, calculations, and reports',
@@ -234,6 +228,18 @@ def test_quota_alert():
234228
assignee_id='anikifor',
235229
)
236230

231+
multi_region = pytest.mark.requirement(
232+
"MIQ Multi-Region deployments",
233+
description='Multi-Region deployment and Central Administration',
234+
assignee_id='izapolsk',
235+
)
236+
237+
multi_tenancy = pytest.mark.requirement(
238+
"MIQ Multi-Tenancy",
239+
description='Support for Tenants in MIQ/CFME',
240+
assignee_id='nachandr',
241+
)
242+
237243
ownership = pytest.mark.requirement(
238244
"VM/Instance Ownership",
239245
description='Ownership settings for VM/Instances',

cfme/tests/cloud_infra_common/test_power_control_manual.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
import pytest
33

44
from cfme import test_requirements
5+
from cfme.utils.appliance import ViaREST
6+
from cfme.utils.appliance import ViaUI
7+
58

69
pytestmark = [test_requirements.power, pytest.mark.manual]
710

@@ -221,16 +224,19 @@ def test_power_controls_on_vm_in_stack_cloud():
221224
pass
222225

223226

227+
@pytest.mark.manual
224228
@pytest.mark.tier(2)
225-
@pytest.mark.manual('manualonly')
226-
def test_power_operations_from_global_region():
229+
@pytest.mark.parametrize('context', [ViaREST, ViaUI])
230+
@test_requirements.multi_region
231+
@test_requirements.power
232+
def test_power_operations_from_global_region(context):
227233
"""
228234
This test case is to check power operations from Global region
229235
Setup is 2 or more appliances(DB should be configured manually). One
230236
is Global region, others are Remote. To get this working enable Central Admin.
231237
232238
Polarion:
233-
assignee: ghubale
239+
assignee: izapolsk
234240
initialEstimate: 1/2h
235241
caseimportance: medium
236242
caseposneg: positive

cfme/tests/cloud_infra_common/test_provisioning.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
from cfme.infrastructure.provider.scvmm import SCVMMProvider
1818
from cfme.markers.env_markers.provider import providers
1919
from cfme.utils import normalize_text
20+
from cfme.utils.appliance import ViaREST
21+
from cfme.utils.appliance import ViaUI
2022
from cfme.utils.appliance.implementations.ui import navigate_to
2123
from cfme.utils.blockers import BZ
2224
from cfme.utils.generators import random_vm_name
@@ -616,3 +618,19 @@ def test_provision_with_tag(appliance, vm_name, tag, provider, request):
616618
instance_tag.category.display_name == tag.category.display_name and
617619
instance_tag.display_name == tag.display_name for instance_tag in tags), (
618620
"{}: {} not in ({})".format(tag.category.display_name, tag.display_name, str(tags)))
621+
622+
623+
@pytest.mark.manual
624+
@pytest.mark.tier(2)
625+
@pytest.mark.parametrize('context', [ViaREST, ViaUI])
626+
@test_requirements.multi_region
627+
@test_requirements.provision
628+
def test_provision_from_template_from_global_region(context):
629+
"""
630+
Polarion:
631+
assignee: izapolsk
632+
caseimportance: medium
633+
casecomponent: Provisioning
634+
initialEstimate: 1/3h
635+
"""
636+
pass

cfme/tests/cloud_infra_common/test_retirement.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
from cfme.cloud.provider.ec2 import EC2Provider
1212
from cfme.infrastructure.provider import InfraProvider
1313
from cfme.markers.env_markers.provider import providers
14+
from cfme.utils.appliance import ViaREST
15+
from cfme.utils.appliance import ViaUI
1416
from cfme.utils.appliance.implementations.ui import navigate_to
1517
from cfme.utils.appliance.implementations.ui import navigator
1618
from cfme.utils.generators import random_vm_name
@@ -294,3 +296,28 @@ def test_resume_retired_instance(retire_vm, provider, remove_date):
294296

295297
verify_retirement_date(retire_vm, expected_date=retire_date if retire_date else 'Never')
296298
assert retire_vm.is_retired is False
299+
300+
301+
@pytest.mark.manual
302+
@pytest.mark.tier(2)
303+
@pytest.mark.parametrize('context', [ViaREST, ViaUI])
304+
@test_requirements.multi_region
305+
@test_requirements.retirement
306+
def test_vm_retirement_from_global_region(context):
307+
"""
308+
retire a vm via CA
309+
310+
Polarion:
311+
assignee: izapolsk
312+
casecomponent: Provisioning
313+
initialEstimate: 1/3h
314+
testSteps:
315+
1. Have a VM created in the provider in the Remote region
316+
subscribed to Global.
317+
2. Retire the VM using the Global appliance.
318+
expectedResults:
319+
1.
320+
2. VM transitions to Retired state in the Global and Remote region.
321+
322+
"""
323+
pass

cfme/tests/distributed/test_appliance_replication.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -370,16 +370,3 @@ def finalize():
370370
soft_assert(
371371
not vm_obj.mgmt.is_running,
372372
"vm running")
373-
374-
375-
@pytest.mark.manual
376-
@pytest.mark.tier(1)
377-
def test_replication_central_admin_adhoc_provision_template():
378-
"""
379-
Polarion:
380-
assignee: jhenner
381-
caseimportance: medium
382-
casecomponent: Replication
383-
initialEstimate: 1/6h
384-
"""
385-
pass

cfme/tests/infrastructure/test_vm_reconfigure.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
from cfme import test_requirements
55
from cfme.infrastructure.provider.rhevm import RHEVMProvider
66
from cfme.infrastructure.provider.virtualcenter import VMwareProvider
7+
from cfme.utils.appliance import ViaREST
8+
from cfme.utils.appliance import ViaUI
79
from cfme.utils.blockers import BZ
810
from cfme.utils.generators import random_vm_name
911
from cfme.utils.rest import assert_response
@@ -615,3 +617,28 @@ def test_vm_disk_reconfig_via_rest(appliance, full_vm):
615617
), "Number of disks expected was {expected}, found {actual}".format(
616618
expected=len(initial_disks), actual=full_vm.configuration.num_disks
617619
)
620+
621+
622+
@pytest.mark.manual
623+
@pytest.mark.tier(2)
624+
@pytest.mark.parametrize('context', [ViaREST, ViaUI])
625+
@test_requirements.multi_region
626+
@test_requirements.reconfigure
627+
def test_vm_reconfigure_from_global_region(context):
628+
"""
629+
reconfigure a VM via CA
630+
631+
Polarion:
632+
assignee: izapolsk
633+
casecomponent: Infra
634+
initialEstimate: 1/3h
635+
testSteps:
636+
1. Have a VM created in the provider in the Remote region which is
637+
subscribed to Global.
638+
2. Reconfigure the VM using the Global appliance.
639+
expectedResults:
640+
1.
641+
2.
642+
3. VM reconfigured, no errors.
643+
"""
644+
pass

cfme/tests/intelligence/reports/test_reports_manual.py

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
import pytest
44

55
from cfme import test_requirements
6+
from cfme.utils.appliance import ViaREST
7+
from cfme.utils.appliance import ViaUI
68

79

810
@pytest.mark.manual
@@ -413,3 +415,56 @@ def test_report_new_tags():
413415
1504155
414416
"""
415417
pass
418+
419+
420+
@pytest.mark.manual
421+
@test_requirements.report
422+
@test_requirements.multi_region
423+
@pytest.mark.tier(2)
424+
@pytest.mark.parametrize('context', [ViaREST, ViaUI])
425+
def test_reports_create_in_global_region(context):
426+
"""
427+
This test case tests report creation and rendering from global region
428+
based on data from remote regions.
429+
430+
Polarion:
431+
assignee: izapolsk
432+
casecomponent: Reporting
433+
caseimportance: medium
434+
initialEstimate: 1/2h
435+
testSteps:
436+
1. Set up Multi-Region deployment
437+
2. Add provider to remote appliance
438+
3. Create and render report in global region
439+
expectedResults:
440+
1. Report should be created and rendered successfully.
441+
442+
"""
443+
pass
444+
445+
446+
@pytest.mark.manual
447+
@test_requirements.report
448+
@test_requirements.multi_region
449+
@pytest.mark.tier(2)
450+
@pytest.mark.parametrize('context', [ViaREST, ViaUI])
451+
def test_reports_use_remote_in_global_region(context):
452+
"""
453+
This test case tests report creation in remote region and rendering it in global region
454+
based on data from remote regions.
455+
456+
Polarion:
457+
assignee: izapolsk
458+
casecomponent: Reporting
459+
caseimportance: medium
460+
initialEstimate: 1/2h
461+
testSteps:
462+
1. Set up Multi-Region deployment
463+
2. Add provider to remote appliance
464+
3. Create report in remote region
465+
4. Render report in global region
466+
expectedResults:
467+
1. Report should be created and rendered successfully.
468+
469+
"""
470+
pass

cfme/tests/services/test_service_catalogs.py

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
from cfme.markers.env_markers.provider import ONE_PER_TYPE
88
from cfme.services.service_catalogs import ServiceCatalogs
99
from cfme.services.workloads import VmsInstances
10+
from cfme.utils.appliance import ViaREST
11+
from cfme.utils.appliance import ViaUI
1012
from cfme.utils.appliance.implementations.ui import navigate_to
1113
from cfme.utils.log import logger
1214
from cfme.utils.rest import assert_response
@@ -545,3 +547,35 @@ def test_generic_object_details_displayed_from_a_service_do_not_include_associat
545547
1576828
546548
"""
547549
pass
550+
551+
552+
@pytest.mark.manual
553+
@pytest.mark.tier(2)
554+
@pytest.mark.parametrize('context', [ViaREST, ViaUI])
555+
@test_requirements.multi_region
556+
@test_requirements.service
557+
def test_service_provisioning_from_global_region(context):
558+
"""
559+
Polarion:
560+
assignee: izapolsk
561+
caseimportance: medium
562+
casecomponent: Services
563+
initialEstimate: 1/4h
564+
"""
565+
pass
566+
567+
568+
@pytest.mark.manual
569+
@pytest.mark.tier(2)
570+
@pytest.mark.parametrize('context', [ViaREST, ViaUI])
571+
@test_requirements.multi_region
572+
@test_requirements.service
573+
def test_service_retirement_from_global_region(context):
574+
"""
575+
Polarion:
576+
assignee: izapolsk
577+
caseimportance: medium
578+
casecomponent: Services
579+
initialEstimate: 1/4h
580+
"""
581+
pass

cfme/tests/test_replication.py

Lines changed: 1 addition & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -29,40 +29,6 @@ def test_replication_powertoggle():
2929
pass
3030

3131

32-
@pytest.mark.manual
33-
def test_replication_central_admin_vm_retirement():
34-
"""
35-
retire a vm via CA
36-
37-
Polarion:
38-
assignee: mnadeem
39-
casecomponent: Replication
40-
initialEstimate: 1/12h
41-
testSteps:
42-
1. Have a VM created in the provider in the Remote region
43-
subscribed to Global.
44-
2. Retire the VM using the Global appliance.
45-
expectedResults:
46-
1.
47-
2. VM transitions to Retired state in the Global and Remote region.
48-
49-
"""
50-
pass
51-
52-
53-
@pytest.mark.manual
54-
@pytest.mark.tier(1)
55-
def test_replication_central_admin_service_provisioning():
56-
"""
57-
Polarion:
58-
assignee: mnadeem
59-
caseimportance: medium
60-
casecomponent: Replication
61-
initialEstimate: 1/4h
62-
"""
63-
pass
64-
65-
6632
@pytest.mark.manual
6733
@pytest.mark.tier(2)
6834
def test_replication_appliance_add_single_subscription():
@@ -147,7 +113,7 @@ def test_replication_central_admin_ansible_playbook_service_from_global():
147113
Playbook service is ordered from the master region catalog.
148114
149115
Polarion:
150-
assignee: mnadeem
116+
assignee: izapolsk
151117
casecomponent: Replication
152118
subcomponent: Ansible
153119
caseimportance: medium
@@ -284,40 +250,6 @@ def test_replication_global_to_remote_new_vm_from_template():
284250
pass
285251

286252

287-
@pytest.mark.manual
288-
def test_replication_central_admin_vm_reconfigure():
289-
"""
290-
reconfigure a VM via CA
291-
292-
Polarion:
293-
assignee: mnadeem
294-
casecomponent: Replication
295-
initialEstimate: 1/12h
296-
testSteps:
297-
1. Have a VM created in the provider in the Remote region which is
298-
subscribed to Global.
299-
2. Reconfigure the VM using the Global appliance.
300-
expectedResults:
301-
1.
302-
2.
303-
3. VM reconfigured, no errors.
304-
"""
305-
pass
306-
307-
308-
@pytest.mark.manual
309-
@pytest.mark.tier(1)
310-
def test_replication_central_admin_adhoc_provision_template():
311-
"""
312-
Polarion:
313-
assignee: mnadeem
314-
caseimportance: medium
315-
initialEstimate: 1/6h
316-
casecomponent: Replication
317-
"""
318-
pass
319-
320-
321253
@pytest.mark.manual
322254
@pytest.mark.tier(1)
323255
def test_replication_subscription_revalidation_pglogical():

0 commit comments

Comments
 (0)