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

[1LP][WIP] Fix preemtivity in test_gce_preemptible_provision. #7674

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
3 changes: 2 additions & 1 deletion cfme/cloud/instance/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,8 @@ def vm_default_args(self):
},
'properties': {
'instance_type': partial_match(provisioning.get('instance_type')),
'guest_keypair': provisioning.get('guest_keypair')
'guest_keypair': provisioning.get('guest_keypair'),
'is_preemptible': provisioning.get('is_preemptible')
}
}

Expand Down
4 changes: 3 additions & 1 deletion cfme/tests/cloud_infra_common/test_provisioning.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ def test_provision_from_template(provider, provisioned_instance):

@pytest.mark.provider([GCEProvider], required_fields=[['provisioning', 'image']])
@pytest.mark.usefixtures('setup_provider')
@pytest.mark.meta(blockers=[GH('ManageIQ/integration_tests:7661')])
@pytest.mark.meta(blockers=[BZ(1619298, forced_streams=['5.9', '5.10'])])
Copy link
Member

Choose a reason for hiding this comment

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

This isn't blocking on 59 in PRT, and the test fails with GCE Instance isn't Preemptible (cfme/tests/cloud_infra_common/test_provisioning.py:110)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The problem is caused by #7661

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mshriver could you please fix the #7661 to unblock this PR? Thanks.

def test_gce_preemptible_provision(appliance, provider, instance_args, soft_assert):
"""
Polarion:
Expand All @@ -114,7 +116,7 @@ def test_gce_preemptible_provision(appliance, provider, instance_args, soft_asse
initialEstimate: 1/6h
"""
vm_name, inst_args = instance_args
inst_args['properties']['is_preemptible'] = True
inst_args.setdefault('properties', {})['is_preemptible'] = True
instance = appliance.collections.cloud_instances.create(vm_name,
provider,
form_values=inst_args)
Expand Down