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

[1LP][RFR] Cover provisioning issues #9985

Merged
merged 7 commits into from
May 6, 2020
Merged

[1LP][RFR] Cover provisioning issues #9985

merged 7 commits into from
May 6, 2020

Conversation

jarovo
Copy link
Contributor

@jarovo jarovo commented Mar 13, 2020

We got some bugs in CFME related to nil deference on provisioning request dialog.

This PR is adding checks to existing tests. These checks are doing clicking trough the request tabs to verify they do display fine.

{pytest: cfme/tests/test_foo_file.py -v cfme/tests/cloud_infra_common/test_cloud_init_provisioning.py cfme/tests/infrastructure/test_provisioning_dialog.py cfme/tests/infrastructure/test_vm_clone.py}

Local runs and test failures advocacy

cfme/tests/cloud_infra_common/test_cloud_init_provisioning.py::test_provision_cloud_init[openstack-13] PASSED

The cfme/tests/cloud_infra_common/test_cloud_init_provisioning.py/test_provision_cloud_init[ec2] seems to be failing because Fedora image is not present on the EC2. It can be fixed in yamls.

@jarovo jarovo changed the title Cover 1670327 [WIPTEST] Cover 1670327 Mar 13, 2020
@jarovo jarovo changed the title [WIPTEST] Cover 1670327 [WIPTEST] Cover provisioning issues Mar 20, 2020
@jarovo jarovo changed the title [WIPTEST] Cover provisioning issues [RFR] Cover provisioning issues Mar 24, 2020
Copy link
Contributor

@john-dupuy john-dupuy left a comment

Choose a reason for hiding this comment

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

A couple of small changes and suggestions, thanks for this PR @JaryN

cfme/services/requests.py Outdated Show resolved Hide resolved
cfme/tests/infrastructure/test_provisioning_dialog.py Outdated Show resolved Hide resolved
cfme/tests/infrastructure/test_provisioning_dialog.py Outdated Show resolved Hide resolved
cfme/tests/infrastructure/test_provisioning_dialog.py Outdated Show resolved Hide resolved
cfme/tests/infrastructure/test_vm_clone.py Outdated Show resolved Hide resolved
@john-dupuy john-dupuy changed the title [RFR] Cover provisioning issues [WIPTEST] Cover provisioning issues Mar 27, 2020
@dajoRH dajoRH changed the title [WIPTEST] Cover provisioning issues [WIP] Cover provisioning issues Mar 31, 2020
Copy link
Contributor Author

@jarovo jarovo left a comment

Choose a reason for hiding this comment

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

Reacted on review comments.

@jarovo jarovo changed the title [WIP] Cover provisioning issues [RFR][WIP] Cover provisioning issues Apr 3, 2020
@jarovo jarovo changed the title [RFR][WIP] Cover provisioning issues WIP] Cover provisioning issues Apr 6, 2020
@jarovo jarovo changed the title WIP] Cover provisioning issues [WIP] Cover provisioning issues Apr 6, 2020
@jarovo jarovo changed the title [WIP] Cover provisioning issues [WIPTEST] Cover provisioning issues Apr 6, 2020
@dajoRH dajoRH added WIP-testing and removed WIP labels Apr 6, 2020
@dajoRH dajoRH changed the title [WIPTEST] Cover provisioning issues [WIP] Cover provisioning issues Apr 8, 2020
@dajoRH
Copy link
Contributor

dajoRH commented Apr 8, 2020

I detected some fixture changes in commit 637b1eb

The local fixture prov_data is used in the following files:

  • cfme/tests/infrastructure/test_provisioning_dialog.py
    • test_change_cpu_ram
    • test_disk_format_select
    • test_power_on_or_off_after_provision
    • test_tag
    • test_provisioning_schedule
    • test_provisioning_vnic_profiles
    • test_provision_vm_with_2_nics
    • test_vmware_default_placement
    • test_linked_clone_default

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

@jarovo jarovo changed the title [WIP] Cover provisioning issues [RFR] Cover provisioning issues Apr 9, 2020
@dajoRH dajoRH removed the WIP label Apr 9, 2020
@dgaikwad
Copy link
Contributor

Please check PRT result.

Copy link
Contributor

@john-dupuy john-dupuy left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for this PR @JaryN. There are a few test failures in PRT, but I think these can be fixed in later PRs, as the majority of tests are now passing.

@@ -40,6 +40,8 @@ class SCVMMProvider(InfraProvider):
settings_key = 'ems_scvmm'
ui_prov_type = 'Microsoft System Center VMM'
log_name = 'scvmm'
provisioning_dialog_widget_names = (InfraProvider.provisioning_dialog_widget_names
- {'environment'} | {'customize'})
Copy link
Contributor

Choose a reason for hiding this comment

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

Just curious but how is this different from - {'environment', 'customize'}?

Copy link
Contributor Author

@jarovo jarovo May 6, 2020

Choose a reason for hiding this comment

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

At first I was like WTF have I done here, but it is different. So perhaps I should rephrase this bit a bit to make it more clear for the reader.

The problem is the operator priority. The result of

(SOME_SET  - {'environment'} | {'customize'})

does always include the 'customize' while result of

(SOME_SET  - {'environment', 'customize'})

never does.

Should I change this to

((SOME_SET  - {'environment'}) | {'customize'})

pattern?

Or rather

SOME_SET.difference({'environment'}).union('{customize'})

or

newset = set(SOME_SET)
newset -= {'environment'}
newset |= '{customize'}

What do you guys find more clear?

Copy link
Member

Choose a reason for hiding this comment

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

For the record, I'd say SOME_SET.difference({'environment'}).union('{customize'}) is the most clear, and is consistent with your use of union and difference in the other providers.

That said, the logic is sound, and the clarity is subjective, not going to block the PR on it.

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 Ok. I will try keeping this in mind and use this form.

@john-dupuy john-dupuy changed the title [RFR] Cover provisioning issues [1LP][RFR] Cover provisioning issues May 6, 2020
@mshriver mshriver self-assigned this May 6, 2020
@mshriver mshriver merged commit 067b006 into ManageIQ:master May 6, 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