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

Commit 1ef9180

Browse files
author
Matous Mojzis
committed
Implemented automated test for add_provider_with_instance_without_name
1 parent c0e5529 commit 1ef9180

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

cfme/tests/cloud/test_providers.py

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,17 @@ def ec2_provider_with_sts_creds(appliance):
208208
prov.delete()
209209

210210

211+
@pytest.fixture
212+
def instance_without_name(provider):
213+
template_id = provider.mgmt.get_template(
214+
provider.data.templates.get('small_template').name).uuid
215+
instance = provider.mgmt.create_vm(template_id)
216+
wait_for(lambda: instance.state == VmState.RUNNING, delay=15, timeout=900)
217+
218+
yield instance
219+
instance.cleanup()
220+
221+
211222
@pytest.mark.tier(3)
212223
@test_requirements.discovery
213224
def test_add_cancelled_validation_cloud(request, appliance):
@@ -1296,8 +1307,9 @@ def test_ec2_deploy_instance_with_ssh_addition_template():
12961307

12971308

12981309
@test_requirements.ec2
1299-
@pytest.mark.manual
1300-
def test_add_ec2_provider_with_instance_without_name():
1310+
@pytest.mark.provider([EC2Provider], scope="function", override=True, selector=ONE)
1311+
@pytest.mark.usefixtures('has_no_cloud_providers')
1312+
def test_add_provider_with_instance_without_name(provider, request, instance_without_name):
13011313
"""
13021314
Polarion:
13031315
assignee: mmojzis
@@ -1311,7 +1323,9 @@ def test_add_ec2_provider_with_instance_without_name():
13111323
1.
13121324
2. Refresh should complete without errors
13131325
"""
1314-
pass
1326+
provider.create()
1327+
request.addfinalizer(provider.delete_if_exists)
1328+
provider.validate_stats(ui=True)
13151329

13161330

13171331
@test_requirements.ec2

requirements/frozen.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ Werkzeug==0.16.0
339339
widgetastic.core==0.51
340340
widgetastic.patternfly==1.2.0
341341
widgetsnbextension==3.4.2
342-
wrapanapi==3.5.2
342+
wrapanapi==3.5.4
343343
wrapt==1.11.1
344344
xmltodict==0.12.0
345345
yaycl==0.3.0

0 commit comments

Comments
 (0)