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

[1LP][RFR]Implemented automated test for test_deploy_instance_with_ssh_addition_template #9828

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
18 changes: 15 additions & 3 deletions cfme/tests/cloud/test_providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,16 @@ def vm_ip(cfme_vhd, pwsh_ssh):
pwsh_ssh.run_command("pwsh {}".format(path_script), timeout=180)


@pytest.fixture
def instance_with_ssh_addition_template(appliance, provider):
form_values = {'customize': {'custom_template': {'name': "SSH key addition template"}}}
instance = appliance.collections.cloud_instances.create(random_vm_name('prov'), provider,
form_values=form_values)

yield instance
instance.delete()


@pytest.fixture
def ec2_provider_with_sts_creds(appliance):
collection = appliance.collections.cloud_providers
Expand Down Expand Up @@ -1271,8 +1281,9 @@ def test_ec2_add_delete_add_provider():


@test_requirements.ec2
@pytest.mark.manual
def test_ec2_deploy_instance_with_ssh_addition_template():
@pytest.mark.provider([EC2Provider], scope="function", override=True, selector=ONE)
def test_deploy_instance_with_ssh_addition_template(setup_provider,
instance_with_ssh_addition_template):
"""
Requirement: EC2 provider

Expand All @@ -1292,7 +1303,8 @@ def test_ec2_deploy_instance_with_ssh_addition_template():
3.
4. Instance should be provisioned without any errors
"""
pass
if not instance_with_ssh_addition_template.exists:
pytest.fail('Instance with ssh addition template was not created successfully!')


@test_requirements.ec2
Expand Down