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

[1LP][RFR] Update distributed appliance test to use create_vm fixture #9875

Merged
merged 1 commit into from
Jan 30, 2020
Merged

[1LP][RFR] Update distributed appliance test to use create_vm fixture #9875

merged 1 commit into from
Jan 30, 2020

Conversation

tpapaioa
Copy link
Contributor

@tpapaioa tpapaioa commented Jan 24, 2020

This PR updates the distributed appliance test test_distributed_vm_power_control to use the create_vm fixture. This requires using the parametrized provider fixture, instead of the unparametrized virtualcenter fixture that was used in this module previously. I've changed all of the other tests in the module to use it too, for consistency, even though they do not need it for VM creation.

I've also removed the get_ssh_client method, which is no longer used.

There was an issue with ssh clients getting connection refused errors in PRT testing, when configuring the appliance. This commit also includes a one line change to appliance.configure, to re-connect after the audit rule / network interface related command that triggers the connection closure.

{{ pytest: --long-running cfme/tests/distributed/test_appliance_replication.py -vv }}

@dajoRH
Copy link
Contributor

dajoRH commented Jan 24, 2020

I detected some fixture changes in commit 97a648524fc8df4e6a9ed614e51de4d101ba1875

Show fixtures

The global fixture create_vm_modscope is used in the following files:

  • cfme/tests/ansible/test_embedded_ansible_actions.py
    • policy_for_testing
  • cfme/tests/ansible/test_embedded_ansible_automate.py
    • alert_profile
    • test_embedded_ansible_custom_button_localhost
    • test_embedded_ansible_custom_button_target_machine
    • test_embedded_ansible_custom_button_specific_hosts
    • test_alert_run_ansible_playbook

The global fixture create_vm is used in the following files:

  • cfme/tests/ansible/test_embedded_ansible_services.py
    • ansible_linked_vm_action
    • ansible_policy_linked_vm
  • cfme/tests/automate/test_common_methods.py
    • test_vm_retire_extend
    • test_move_vm_into_folder
  • cfme/tests/automate/test_service_automate.py
    • test_retire_vm_now
  • cfme/tests/automate/test_vmware_methods.py
  • cfme/tests/cloud/test_cloud_events.py
    • test_vm_capture
  • cfme/tests/cloud/test_cloud_timelines.py
    • mark_vm_as_appliance
    • control_policy
    • azone
    • test_cloud_timeline_create_event
    • test_cloud_timeline_policy_event
    • test_cloud_timeline_stop_event
    • test_cloud_timeline_start_event
    • test_cloud_timeline_diagnostic
    • test_cloud_timeline_rename_event
    • test_cloud_timeline_delete_event
  • cfme/tests/cloud_infra_common/test_cockpit_server.py
    • test_cockpit_server_role
  • cfme/tests/cloud_infra_common/test_discovery_and_support.py
    • test_vm_discovery
  • cfme/tests/cloud_infra_common/test_genealogy.py
  • cfme/tests/cloud_infra_common/test_html5_vm_console.py
    • test_html5_vm_console
  • cfme/tests/cloud_infra_common/test_power_control_rest.py
    • vm_name
    • wait_for_vm_state_change
    • test_stop_vm_rest
    • test_start_vm_rest
    • test_suspend_vm_rest
    • test_reset_vm_rest
  • cfme/tests/cloud_infra_common/test_retirement.py
    • test_retirement_now
    • test_retirement_now_ec2_instance_backed
    • test_set_retirement_date
    • test_set_retirement_offset
    • test_unset_retirement_date
    • test_resume_retired_instance
  • cfme/tests/control/test_alerts.py
    • wait_candu
    • ssh
    • test_alert_rtp
    • test_alert_timeline_cpu
    • test_alert_snmp
  • cfme/tests/distributed/test_appliance_replication.py
    • test_distributed_vm_power_control
  • cfme/tests/infrastructure/test_tenant_quota.py
    • test_quota_not_fails_after_vm_reconfigure_disk_remove
  • cfme/tests/services/test_dialog_element_in_catalog.py
    • test_service_dialog_expression_method
  • cfme/tests/webui/test_general_ui.py
    • test_vm_right_size_recommendation_back_button

The global fixture create_vms_modscope was changed, but I didn't find where it's used.
The global fixture create_vms is used in the following files:

  • cfme/tests/cloud_infra_common/test_retirement.py
    • test_retirement_now_multiple
    • test_set_retirement_date_multiple
    • test_set_retirement_offset_multiple

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

@tpapaioa tpapaioa changed the title [WIP] Update distributed appliance test to use create_vm fixture [WIPTEST] Update distributed appliance test to use create_vm fixture Jan 26, 2020
@dajoRH dajoRH added WIP-testing and removed WIP labels Jan 26, 2020
@tpapaioa tpapaioa changed the title [WIPTEST] Update distributed appliance test to use create_vm fixture [RFR] Update distributed appliance test to use create_vm fixture Jan 28, 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.

Thanks for this PR @tpapaioa! LGTM

@john-dupuy john-dupuy changed the title [RFR] Update distributed appliance test to use create_vm fixture [1LP][RFR] Update distributed appliance test to use create_vm fixture Jan 28, 2020
@mshriver mshriver self-assigned this Jan 29, 2020
@mshriver mshriver merged commit 55c1958 into ManageIQ:master Jan 30, 2020
@tpapaioa tpapaioa deleted the distributed_appliance_create_vm branch January 30, 2020 16:44
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.

4 participants