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

[1LP][RFR] automate service fetch error after user delete #9739

Merged
merged 2 commits into from
Dec 18, 2019
Merged
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
46 changes: 40 additions & 6 deletions cfme/tests/ssui/test_ssui_myservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,19 +148,19 @@ def test_suspend_vm_service_details(context):
pass


@pytest.mark.meta(coverage=[1677744])
@pytest.mark.manual
@pytest.mark.ignore_stream('5.10')
@pytest.mark.meta(automates=[1677744])
@pytest.mark.customer_scenario
@pytest.mark.tier(2)
def test_no_error_while_fetching_the_service():
def test_no_error_while_fetching_the_service(request, appliance, user_self_service_role,
generic_catalog_item):
"""
Copy link
Member

Choose a reason for hiding this comment

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

Optional:

def test_no_error_while_fetching_the_service(request, appliance, user_self_service_role, 
                                             generic_catalog_item):


Bugzilla:
1677744

Polarion:
assignee: nansari
startsin: 5.11
startsin: 5.10
casecomponent: SelfServiceUI
initialEstimate: 1/6h
testSteps:
Expand All @@ -170,7 +170,41 @@ def test_no_error_while_fetching_the_service():
1.
2. In SUI click on provisioned service
"""
pass
user, _ = user_self_service_role

# login with user having self service role
with user:
with appliance.context.use(ViaUI):
appliance.server.login(user)
Copy link
Member

Choose a reason for hiding this comment

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


# Order service from catalog item
serv_cat = ServiceCatalogs(
appliance,
catalog=generic_catalog_item.catalog,
name=generic_catalog_item.name,
)
provision_request = serv_cat.order()
provision_request.wait_for_request()

# Check service with user
service = MyService(appliance, generic_catalog_item.dialog.label)
assert service.exists

@request.addfinalizer
def _clear_service():
if service.exists:
service.delete()

# Delete user
# Note: before deleting user need to clean respected user requests
provision_request.remove_request(method="rest")
user.delete()
assert not user.exists

# Check service exist without user or not
for context in [ViaUI, ViaSSUI]:
with appliance.context.use(context):
assert service.exists


@pytest.mark.meta(automates=[1628520])
Expand Down