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

[1LP][RFR] Adding stack bundle retire test #9989

Merged
merged 1 commit into from
Mar 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 0 additions & 29 deletions cfme/tests/services/test_dialog_element_in_catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,35 +491,6 @@ def test_service_dd_dialog_load_values_on_init(appliance, import_datastore, impo
assert not view.fields("text_box").read()


@pytest.mark.meta(coverage=[1684092])
@pytest.mark.manual
@pytest.mark.tier(2)
def test_retire_catalog_bundle_service_orchestration_item():
"""

Bugzilla:
1684092

Polarion:
assignee: nansari
startsin: 5.10
casecomponent: Services
initialEstimate: 1/6h
testSteps:
1. Add ec2 provider
2. Provisioned the catalog bundle with ServiceOrchestration item
3. Navigate to My service page
4. Retired the bundle
expectedResults:
1.
2.
3.
4. Catalog bundle should retire with no error

"""
pass


@pytest.mark.meta(coverage=[1656351])
@pytest.mark.manual
@pytest.mark.tier(2)
Expand Down
70 changes: 70 additions & 0 deletions cfme/tests/services/test_provision_stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,3 +395,73 @@ def test_stack_template_azure():
upstream: yes
"""
pass


@pytest.mark.meta(blockers=[BZ(1754543, forced_streams=["5.11"])], automates=[1684092])
@pytest.mark.customer_scenario
Copy link
Member

Choose a reason for hiding this comment

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

Add both In oneline.


@pytest.mark.meta(automates=[1684092])
@pytest.mark.meta(blockers=[BZ(1754543)])```

@pytest.mark.tier(2)
@pytest.mark.provider([EC2Provider], selector=ONE, scope='module')
def test_retire_catalog_bundle_service_orchestration_item(appliance, request, catalog_item,
stack_data):
"""
Bugzilla:
Copy link
Member

Choose a reason for hiding this comment

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

remove blank line

1684092
Polarion:
assignee: nansari
startsin: 5.10
casecomponent: Services
initialEstimate: 1/6h
testSteps:
1. Add ec2 provider
2. Provisioned the catalog bundle with ServiceOrchestration item
3. Navigate to My service page
4. Retired the bundle
expectedResults:
1.
2.
3.
4. Catalog bundle should retire with no error
"""
bundle_name = fauxfactory.gen_alphanumeric(15, start="cat_bundle_")
catalog_bundle = appliance.collections.catalog_bundles.create(
bundle_name, description="catalog_bundle",
display_in=True, catalog=catalog_item.catalog,
dialog=catalog_item.dialog,
catalog_items=[catalog_item.name])
request.addfinalizer(catalog_bundle.delete_if_exists)

# Ordering service catalog bundle
service_catalogs = ServiceCatalogs(
appliance, catalog_bundle.catalog, catalog_bundle.name, stack_data)

provision_request = service_catalogs.order()
provision_request.wait_for_request(method='ui')
provision_request.is_succeeded(method="ui")

last_message = provision_request.get_request_row_from_ui()['Last Message'].text
service_name = last_message.split()[2].strip('[]')
service = MyService(appliance, service_name)

@request.addfinalizer
def _clear_request_service():
if provision_request.exists():
provision_request.remove_request(method="rest")
if service.exists:
service.delete()

assert service.exists

# Retire service
retire_request = service.retire()

@request.addfinalizer
def _clear_retire_request():
if retire_request.exists():
retire_request.remove_request()

wait_for(
lambda: service.is_retired,
delay=5, num_sec=120,
fail_func=service.browser.refresh,
message="waiting for service retire"
)