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

[1LP][RFR]Fixing dual_nic_migration Test #9880

Merged
merged 1 commit into from
Jan 30, 2020

Conversation

mnadeem92
Copy link
Contributor

Signed-off-by: mnadeem92 [email protected]

{{ pytest: cfme/tests/v2v/test_v2v_migrations.py -k "test_dual_nics_migration" --use-provider rhv43 --use-provider vsphere67-ims --provider-limit 2 -v }}

@mnadeem92 mnadeem92 changed the title [WIPTEST]Fixing dual_nic_migration Test [RFR]Fixing dual_nic_migration Test Jan 27, 2020
@mnadeem92 mnadeem92 requested a review from sshveta January 27, 2020 16:41
Copy link
Contributor

@sshveta sshveta left a comment

Choose a reason for hiding this comment

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

@mnadeem92 : I am trying to understand the need of this change . Why are we removing parameters from test and giving values in fixture ?

@mnadeem92
Copy link
Contributor Author

@mnadeem92 : I am trying to understand the need of this change . Why are we removing parameters from test and giving values in fixture ?

@mnadeem92 : I am trying to understand the need of this change . Why are we removing parameters from test and giving values in fixture ?

The Test case failed as the created VM was not visible in migration plan, the reason was in mapping it select only 1 network map as we passes the parameterized value from Test case ["VM Network", "ovirtmgmt", Templates.DUAL_NETWORK_TEMPLATE], where as the instance gets created using "DUAL_NETWORK_TEMPLATE", so we need to add both network at the same time to the migration mapping. So i just take examples from other similar test cases and their fixture like "mapping_data_dual_vm_obj_dual_datastore" where we set input directly in fixture only, IMO it is good to keep same pattern and it is the easy way to fix the issue.

source_provider.one_of(VMwareProvider) and source_provider.version != 6.5 and
"DPortGroup" in source_type,
reason='Dual network of DPortGroup only supported on source provider version 6.5'
)
def test_dual_nics_migration(request, appliance, provider,
Copy link
Contributor

Choose a reason for hiding this comment

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

It will still not apply for Vmware67-ims and vmware6.0 I think . Please check , else you will have to add this uncollect code again

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sshveta DPortGroup is now available in Vsphere67-ims , So we are good to go with it and AFAIK we are not executing our suits on vsphere6.0, So we are good to remove this uncollected.

@sshveta sshveta changed the title [RFR]Fixing dual_nic_migration Test [1LP][RFR]Fixing dual_nic_migration Test Jan 29, 2020
Copy link
Contributor

@digitronik digitronik left a comment

Choose a reason for hiding this comment

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

I'm suspect about default value to fixture parameter. please recheck it one time.
Else LGTM

@@ -523,7 +523,10 @@ def mapping_data_dual_vm_obj_dual_datastore(request, appliance, source_provider,

@pytest.fixture(scope="function")
def mapping_data_vm_obj_dual_nics(request, appliance, source_provider, provider,
source_type, dest_type, template_type):
template_type=Templates.DUAL_NETWORK_TEMPLATE):
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think this is good practice i.e. providing default value to fixture.
pytest doesn't consider arguments with default values as targets for fixtures/parameterization.

@digitronik digitronik changed the title [1LP][RFR]Fixing dual_nic_migration Test [1LP][WIPTEST]Fixing dual_nic_migration Test Jan 30, 2020
@mnadeem92 mnadeem92 force-pushed the fix_dual_nic_migration branch from 2051e48 to 2daf6e1 Compare January 30, 2020 08:33
@mnadeem92 mnadeem92 changed the title [1LP][WIPTEST]Fixing dual_nic_migration Test [1LP][RFR]Fixing dual_nic_migration Test Jan 30, 2020
@dajoRH
Copy link
Contributor

dajoRH commented Jan 30, 2020

I detected some fixture changes in commit 2daf6e1

The global fixture mapping_data_vm_obj_dual_nics is used in the following files:

  • cfme/tests/v2v/test_v2v_migrations.py

Please, consider creating a PRT run to make sure your fixture changes do not break existing usage 😃

@digitronik digitronik merged commit 5c77c11 into ManageIQ:master Jan 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants