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

[1LP][RFR] Fix the test for OSP #10115

Conversation

mnadeem92
Copy link
Contributor

Signed-off-by: mnadeem92 mnadeem@redhat.com

{{ pytest: cfme/tests/v2v/test_v2v_migrations_single_vcenter.py -k "test_single_vm_migration_power_state_tags_retirement" --use-provider osp13-ims --use-provider vsphere67-ims --provider-limit 2 }}

@mnadeem92 mnadeem92 force-pushed the fix_test_single_vm_migration_power_state_tags_retirement branch 3 times, most recently from 7736e3b to 249ccf0 Compare May 20, 2020 09:57
@mnadeem92 mnadeem92 changed the title [WIPTEST] Fix the test for OSP [RFRT] Fix the test for OSP May 20, 2020
@mnadeem92 mnadeem92 changed the title [RFRT] Fix the test for OSP [RFR] Fix the test for OSP May 20, 2020
migrated_vm = rhv_prov.mgmt.get_vm(src_vm.name)
assert power_state in migrated_vm.state
migrated_vm = get_migrated_vm(src_vm, provider)
vm_state = migrated_vm.state if provider.one_of(RHEVMProvider) else migrated_vm.mgmt.state
Copy link
Contributor

Choose a reason for hiding this comment

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

Can't you just take migrated_vm.mgmt.state for both the providers? It should give you the same value.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nice catch :)

assert power_state in migrated_vm.state
migrated_vm = get_migrated_vm(src_vm, provider)
vm_state = migrated_vm.state if provider.one_of(RHEVMProvider) else migrated_vm.mgmt.state
assert power_state in vm_state
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this be assert power_state == vm_state?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It wont return the exact string, the out put is like "'VmState.RUNNING'"

Signed-off-by: mnadeem92 <mnadeem@redhat.com>
@mnadeem92 mnadeem92 force-pushed the fix_test_single_vm_migration_power_state_tags_retirement branch from 249ccf0 to d538f07 Compare May 20, 2020 12:30
@valaparthvi valaparthvi changed the title [RFR] Fix the test for OSP [1LP][RFR] Fix the test for OSP May 21, 2020
@mshriver mshriver merged commit 20b135e into ManageIQ:master May 21, 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.

None yet

4 participants