-
Notifications
You must be signed in to change notification settings - Fork 165
[WIP]Implemented automated test for add_provider_with_instance_without_name #9826
base: master
Are you sure you want to change the base?
[WIP]Implemented automated test for add_provider_with_instance_without_name #9826
Conversation
050b4cc
to
00e1991
Compare
00e1991
to
1ef9180
Compare
I detected some fixture changes in commit 1ef9180 The local fixture
Please, consider creating a PRT run to make sure your fixture changes do not break existing usage 😃 |
def instance_without_name(provider): | ||
template_id = provider.mgmt.get_template( | ||
provider.data.templates.get('small_template').name).uuid | ||
instance = provider.mgmt.create_vm(template_id) | ||
wait_for(lambda: instance.state == VmState.RUNNING, delay=15, timeout=900) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Q: Can you use the create_vm
fixture?
integration_tests/cfme/fixtures/vm.py
Lines 111 to 118 in 950033f
@pytest.fixture(scope="function") | |
def create_vm(setup_provider, request, provider): | |
if request.param: | |
template_type = request.param | |
else: | |
pytest.error('Any appropriate Template was not passed to the fixture.') | |
vm_name = _get_vm_name(request) | |
return _create_vm(request, template_type, provider, vm_name) |
Or just the _create_vm
method? That way you can specify the template and name.
Would you mind rebasing this Pull Request against latest master, please? |
@kedark3 @john-dupuy @mshriver |
{{ pytest: -k "test_add_provider_with_instance_without_name" -v }}