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

[1LP][RFR] Use appliance provisioning fixtures for distributed and replicated appliance testing #9829

Merged
merged 1 commit into from
Jan 16, 2020
Merged

[1LP][RFR] Use appliance provisioning fixtures for distributed and replicated appliance testing #9829

merged 1 commit into from
Jan 16, 2020

Conversation

tpapaioa
Copy link
Contributor

@tpapaioa tpapaioa commented Jan 9, 2020

This PR updates test_appliance_replication.py to provision unconfigured appliances using sprout fixtures.

fixes #3784

Distributed tests don't use random names
#3784

The function-scoped fixture temp_appliances_unconfig_funcscope_rhevm is used to return a pair of unconfigured appliances. Using the 'rhevm' provider type ensures that the two appliances can reach each other's IP address, unlike with, e.g., openstack vm's.

I've also removed the test_appliance_replicate_sync_role_change and test_appliance_replicate_sync_role_change_with_backlog tests, which are no longer relevant (they test the database_synchronization server role, which was removed in CFME 5.7).

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

@tpapaioa tpapaioa changed the title [WIPTEST Use appliance provisioning fixtures for distributed and replicated appliance testing [WIPTEST] Use appliance provisioning fixtures for distributed and replicated appliance testing Jan 9, 2020
@dajoRH
Copy link
Contributor

dajoRH commented Jan 9, 2020

I detected some fixture changes in commit f00a1e6

The local fixture vm_obj is used in the following files:

  • cfme/tests/distributed/test_appliance_replication.py

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

@tpapaioa tpapaioa changed the title [WIPTEST] Use appliance provisioning fixtures for distributed and replicated appliance testing [RFR] Use appliance provisioning fixtures for distributed and replicated appliance testing Jan 9, 2020
@dajoRH dajoRH removed the WIP-testing label Jan 9, 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.

Awesome PR @tpapaioa, I like it. I expect these tests will need to be updated after #9708 is merged however.

@@ -494,6 +494,8 @@ def configure(self, log_callback=None, **kwargs):
self.db.create_db_lvm()
if on_openstack:
self.set_resolvable_hostname(log_callback=log_callback)
if db_address:
self.db_host = db_address
Copy link
Contributor

Choose a reason for hiding this comment

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

Since you're now using db_address can you also update L441

Copy link
Member

Choose a reason for hiding this comment

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

Agreed - I'd like to see a followup doing two things:

  1. Update the docblock above
  2. Improve the db_host and self.db.address setup, so that its not so circular, and operates as a property that isn't self referential.

@john-dupuy john-dupuy changed the title [RFR] Use appliance provisioning fixtures for distributed and replicated appliance testing [1LP][RFR] Use appliance provisioning fixtures for distributed and replicated appliance testing Jan 16, 2020
@mshriver mshriver merged commit 078a4f9 into ManageIQ:master Jan 16, 2020
@tpapaioa tpapaioa deleted the replication_appliance_name branch January 17, 2020 17:13
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.

Distributed tests don't use random names
4 participants