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

[1LP][RFR] Fix restore (and proxy) tests second part #9645

Merged
merged 14 commits into from
Dec 13, 2019
Merged

[1LP][RFR] Fix restore (and proxy) tests second part #9645

merged 14 commits into from
Dec 13, 2019

Conversation

jarovo
Copy link
Contributor

@jarovo jarovo commented Nov 20, 2019

Purpose or Intent

  • Fixing obtaining the infra (proxy) needed by the proxy tests. This is done by adding the utility_vm fixture. The same fixture ans machine from same template is used for the proxy tests depending on nfs and samba shares.
  • Removing dup proxy tests
  • Adding the scripting for preparing the template for the utility_vm

{{ py.test: --use-provider 'complete' --use-provider extcloud -v cfme/tests/cli/test_appliance_console_db_restore.py::test_appliance_console_restore_db_nfs cfme/tests/cli/test_appliance_console_db_restore.py::test_appliance_console_restore_db_samba cfme/tests/configure/test_proxy.py }}

Needs:

Test results:
I expect all the test except the test_appliance_console_restore_db_ha to pass.

Currently there are skips because the needs are not merged and the test_appliance_console_restore_db_external failed on timeout when restoring the db. IIRC I was increasing the timeout in the #9646 where the same test passes.

@jarovo jarovo changed the title [WIPTEST] Fix restore (and proxy) tests second part [RFR] Fix restore (and proxy) tests second part Nov 20, 2019
@dajoRH dajoRH added the lint-ok label Nov 20, 2019
@mshriver mshriver self-assigned this Nov 21, 2019
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 @JaryN the utility VM is a cool idea. I have some small comments.

cfme/fixtures/utility_vm.py Outdated Show resolved Hide resolved
cfme/fixtures/utility_vm.py Outdated Show resolved Hide resolved
cfme/fixtures/utility_vm.py Outdated Show resolved Hide resolved
cfme/tests/cli/test_appliance_console_db_restore.py Outdated Show resolved Hide resolved
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 few minor comments, thanks for working on this @JaryN!

cfme/fixtures/utility_vm.py Outdated Show resolved Hide resolved
cfme/tests/configure/test_proxy.py Outdated Show resolved Hide resolved
scripts/utility-vm/user-data.yaml Outdated Show resolved Hide resolved
with SSHClient(
hostname=proxy_ip,
**credentials['proxy_vm']) as ssh_client:
username='root',
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should avoid the hardcoded string here. Kind of goes along with my previous comment of having the utility_vm's data folded into it's fixture.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I started using the injected_user_* here

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.

Moving to [1LP][WIPTEST] based on dependencies in yamls and wrapanapi.

@john-dupuy john-dupuy changed the title [RFR] Fix restore (and proxy) tests second part [1LP][WIPTEST] Fix restore (and proxy) tests second part Dec 3, 2019
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.

I refactored this PR. In the end IIRC I made all the changes required by @john-dupuy in this PR and rebased the followup (and resolving the conflicts)

@dajoRH
Copy link
Contributor

dajoRH commented Dec 10, 2019

I detected some fixture changes in commit 6d1a2bd

The global fixture utility_vm_nfs_ip is used in the following files:

  • cfme/tests/cli/test_appliance_console_db_restore.py

The global fixture utility_vm_samba_ip is used in the following files:

  • cfme/tests/cli/test_appliance_console_db_restore.py

The global fixture utility_vm_proxy_data is used in the following files:

  • cfme/tests/configure/test_proxy.py
    • prepare_proxy_specific
    • prepare_proxy_default

The global fixture utility_vm_ssh is used in the following files:

  • cfme/tests/configure/test_proxy.py
    • validate_proxy_logs
    • prepare_proxy_specific
    • prepare_proxy_default
    • test_proxy_valid
    • test_proxy_override

The global fixture utility_vm is used in the following files:

  • cfme/tests/cli/test_appliance_console_db_restore.py

The local fixture prepare_proxy_specific is used in the following files:

  • cfme/tests/configure/test_proxy.py
    • test_proxy_override

The local fixture prepare_proxy_default is used in the following files:

  • cfme/tests/configure/test_proxy.py
    • test_proxy_valid

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

@jarovo jarovo changed the title [1LP][WIPTEST] Fix restore (and proxy) tests second part [1LP][RFR] Fix restore (and proxy) tests second part Dec 12, 2019
@@ -0,0 +1,133 @@
# -*- coding: utf-8 -*-
""" The utility_vm is a vm that is meant to serve various services that the
Copy link
Member

Choose a reason for hiding this comment

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

Thank you so much for this!!!

@mshriver mshriver merged commit eef5671 into ManageIQ:master Dec 13, 2019
spusateri pushed a commit to spusateri/integration_tests that referenced this pull request Jan 27, 2020
* Add scripts for creating the utility machine template.

* use utility_machine for both: proxy and a network share.

* Use wait_pingable rather wait_for and find_pingable

* Remove dup proxy tests

* Fix EC2 proxy invalid test.

The message when EC2 cannot be refreshed differs from the other
providers.

* Fix RHEL8 identifier

* Improve error messages in utility-vm

Co-Authored-By: john-dupuy <[email protected]>

* Don't use random password for utility_vm

* remove the network_share fixture

I am putting the code obtaining the metadata to the utility_vm fixture
instead.

* Bump wrapanapi to support initialization parameters.

* Use SSHCredential for passing creds from the utility_vm fixture.

* Don't use ping to find the IP of services of the utility_vm.

* Increase nfs and samba timeouts

Backup and restore was failing on PRT because of short timeout.

* Increase default timeout for the proxy to get IPs.
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