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

[1LP][RFR] Fixing rest_mapping related TC for OSP #10013

Merged
merged 1 commit into from
Mar 27, 2020

Conversation

mnadeem92
Copy link
Contributor

@mnadeem92 mnadeem92 commented Mar 24, 2020

Signed-off-by: mnadeem92 [email protected]

{{ pytest: cfme/tests/v2v/test_rest_migrations.py -k "test_rest_mapping_create" --use-provider={osp13-ims,rhv-ims} --use-provider vsphere67-ims --provider-limit 2 -v }}

5.11 - Passed
5.10 - Failed due to TimedOutError at fixture function( _start_event_workers_for_osp) which need to address in a separate PR.

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.

Looks Good @mnadeem92

@sshveta
Copy link
Contributor

sshveta commented Mar 24, 2020

Please address one failure in 5.10

@mnadeem92 mnadeem92 changed the title [WIPTEST] Fixing TC for OSP [RFR] Fixing TC for OSP Mar 25, 2020
@mnadeem92 mnadeem92 changed the title [RFR] Fixing TC for OSP [RFR] Fixing rest_mapping related TC for OSP Mar 25, 2020
@mnadeem92
Copy link
Contributor Author

@sshveta The failure on 5.10 is at the fixture level( _start_event_workers_for_osp ) that need to debug and address in a separate PR, As the changes in this PR is not directly related with this issue. IMO lets do not hold this PR as it is passing with 5.11 and we need it for upcoming 5.11.5 build and upstream testing now.

@sshveta sshveta changed the title [RFR] Fixing rest_mapping related TC for OSP [1LP][RFR] Fixing rest_mapping related TC for OSP Mar 25, 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.

Nice PR...
Thanks for mixing test @mnadeem92

Please add inline/proper comments. with first look; I confused.


clusters_obj = appliance.rest_api.collections.clusters.all
if provider.one_of(OpenStackProvider):
clusters_obj += appliance.rest_api.collections.cloud_tenants.all
Copy link
Contributor

Choose a reason for hiding this comment

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

optional: I would use extend

@@ -42,8 +42,13 @@ def get_clusters(appliance, provider, source_provider):
target_cluster = provider.data.get("clusters")[0]
except IndexError:
pytest.skip("Cluster not found in given provider data")

clusters_obj = appliance.rest_api.collections.clusters.all
if provider.one_of(OpenStackProvider):
Copy link
Contributor

Choose a reason for hiding this comment

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

Required: Please Add one comment explaining why we combining clusters and cloud tenants for OpenStack provider.

@@ -65,15 +70,23 @@ def get_clusters(appliance, provider, source_provider):
@pytest.fixture(scope="function")
def get_datastores(appliance, provider, source_provider):
datastores = {}
datastores_obj = appliance.rest_api.collections.data_stores.all
if provider.one_of(OpenStackProvider):
Copy link
Contributor

Choose a reason for hiding this comment

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

^^ same

@mshriver mshriver changed the title [1LP][RFR] Fixing rest_mapping related TC for OSP [1LP][WIPTEST] Fixing rest_mapping related TC for OSP Mar 26, 2020
@mshriver mshriver added fix-test test-cleanup Test removal, collection changes, re-organization labels Mar 26, 2020
Signed-off-by: mnadeem92 <[email protected]>
@dajoRH
Copy link
Contributor

dajoRH commented Mar 27, 2020

I detected some fixture changes in commit a7c4a5e

The local fixture get_clusters is used in the following files:

  • cfme/tests/v2v/test_rest_migrations.py
    • test_rest_mapping_create
    • test_rest_plan_create

The local fixture get_datastores is used in the following files:

  • cfme/tests/v2v/test_rest_migrations.py
    • test_rest_mapping_create
    • test_rest_plan_create

The local fixture get_networks is used in the following files:

  • cfme/tests/v2v/test_rest_migrations.py
    • test_rest_mapping_create
    • test_rest_plan_create

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

@mnadeem92 mnadeem92 changed the title [1LP][WIPTEST] Fixing rest_mapping related TC for OSP [1LP][RFR] Fixing rest_mapping related TC for OSP Mar 27, 2020
@digitronik digitronik merged commit 3bececc into ManageIQ:master Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
fix-test lint-ok test-cleanup Test removal, collection changes, re-organization WIP-testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants