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

[1LP][RFR] Embedded Ansible service to check "Cloud Credentials" used in the service. #9414

Merged
merged 4 commits into from
Oct 17, 2019

Conversation

sbulage
Copy link
Contributor

@sbulage sbulage commented Sep 26, 2019

Purpose or Intent

  • Automated manual tests which has BZ associated with it.

PRT Run

{{pytest: cfme/tests/ansible/test_embedded_ansible_services.py -k "test_ansible_service_cloud_credentials" --long-running --use-provider=complete -svvvv }}

}

service = MyService(appliance, ansible_catalog_item.name)
if service_request.exists():
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Comment for reviewers: This tear down is already written in funcscope fixture, in this PR #9194

@sbulage sbulage changed the title [WIPTEST] Embedded Ansible service to check "Cloud Credentials" used in the service. [RFR] Embedded Ansible service to check "Cloud Credentials" used in the service. Sep 26, 2019

@request.addfinalizer
def _revert():
with update(ansible_catalog_item):
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this required ? The ansible_catalog_item fixture is deleting the catalog item after yield .
https://github.com/ManageIQ/integration_tests/blob/master/cfme/fixtures/ansible_fixtures.py#L81

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ansible_catalog_item fixture will be used in different tests. So, resetting back to default values to use it as default fixture for next tests.

Copy link
Member

Choose a reason for hiding this comment

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

I don't think this is a good practice, as if this fails it will potentially impact all following test cases, and be difficult to debug. If you are modifying the catalog item, it should be made function scoped, at least for this test case.

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 This will impact on Over all tests execution in terms of time. Also, in most of the tests ansible_catalog_tem is being modified to use another playbook. Does that makes sense.?

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 This PR --> #9490 will take care of this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also, will push changes to #9490

cfme/tests/ansible/test_embedded_ansible_services.py Outdated Show resolved Hide resolved
@sshveta sshveta changed the title [RFR] Embedded Ansible service to check "Cloud Credentials" used in the service. [WIPTEST] Embedded Ansible service to check "Cloud Credentials" used in the service. Sep 26, 2019
@dajoRH dajoRH changed the title [WIPTEST] Embedded Ansible service to check "Cloud Credentials" used in the service. [WIP] Embedded Ansible service to check "Cloud Credentials" used in the service. Sep 26, 2019
@sbulage sbulage force-pushed the ansible_automate_BZ1444092 branch from c0a389e to 8a39f98 Compare September 30, 2019 09:21
@sbulage sbulage changed the title [WIP] Embedded Ansible service to check "Cloud Credentials" used in the service. [WIPTEST] Embedded Ansible service to check "Cloud Credentials" used in the service. Sep 30, 2019
@dajoRH dajoRH added WIP-testing and removed WIP labels Sep 30, 2019
@sbulage sbulage force-pushed the ansible_automate_BZ1444092 branch from 8a39f98 to 7b1fa88 Compare September 30, 2019 10:18
@sbulage sbulage changed the title [WIPTEST] Embedded Ansible service to check "Cloud Credentials" used in the service. [RFR] Embedded Ansible service to check "Cloud Credentials" used in the service. Oct 1, 2019
@dajoRH dajoRH removed the WIP-testing label Oct 1, 2019
@izapolsk izapolsk self-requested a review October 1, 2019 12:51
"credential", CREDENTIALS, ids=[cred[0] for cred in CREDENTIALS]
)
@pytest.mark.provider(
[RHEVMProvider, EC2Provider, VMwareProvider, AzureProvider], selector=ONE_PER_TYPE
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we do pytest.mark.provider([InfraProvider, cloudProvider], selector=ONE_PER_TYPE) ?
If all providers are eligible

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sshveta I am uncollecting other providers because of Playbooks. Once I will add playbooks for other Providers like OSP, I will Add Marker to collect all Providers.

Copy link
Member

Choose a reason for hiding this comment

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

Please add in-line comment/TODO for why specific providers are collected.

Copy link
Contributor Author

@sbulage sbulage Oct 3, 2019

Choose a reason for hiding this comment

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

@mshriver I will add TODO/Comment in the #9076 after merge of 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.

Added Comment/TODO for other providers.

@sshveta sshveta changed the title [RFR] Embedded Ansible service to check "Cloud Credentials" used in the service. [1LP][RFR] Embedded Ansible service to check "Cloud Credentials" used in the service. Oct 2, 2019
@mshriver mshriver added test-automation To be applied on PR's which are automating existing manual cases and removed new-test-or-feature labels Oct 2, 2019
Copy link
Member

@mshriver mshriver left a comment

Choose a reason for hiding this comment

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

Module scoped catalog item instance needs to be treated differently if we're modifying it within test functions.

@mshriver mshriver changed the title [1LP][RFR] Embedded Ansible service to check "Cloud Credentials" used in the service. [1LP][WIPTEST] Embedded Ansible service to check "Cloud Credentials" used in the service. Oct 2, 2019
@sbulage sbulage changed the title [1LP][WIPTEST] Embedded Ansible service to check "Cloud Credentials" used in the service. [1LP][RFR] Embedded Ansible service to check "Cloud Credentials" used in the service. Oct 3, 2019
@sbulage sbulage changed the title [1LP][RFR] Embedded Ansible service to check "Cloud Credentials" used in the service. [1LP][WIPTEST] Embedded Ansible service to check "Cloud Credentials" used in the service. Oct 3, 2019
@sbulage sbulage force-pushed the ansible_automate_BZ1444092 branch from e4d0c4a to a13c08e Compare October 13, 2019 09:36
@sbulage sbulage changed the title [1LP][WIPTEST] Embedded Ansible service to check "Cloud Credentials" used in the service. [1LP][RFR] Embedded Ansible service to check "Cloud Credentials" used in the service. Oct 13, 2019
@izapolsk izapolsk changed the title [1LP][RFR] Embedded Ansible service to check "Cloud Credentials" used in the service. [1LP][WIP] Embedded Ansible service to check "Cloud Credentials" used in the service. Oct 16, 2019
@sbulage sbulage force-pushed the ansible_automate_BZ1444092 branch from a13c08e to 68f7999 Compare October 16, 2019 14:31
@sbulage sbulage changed the title [1LP][WIP] Embedded Ansible service to check "Cloud Credentials" used in the service. [1LP][WIPTEST] Embedded Ansible service to check "Cloud Credentials" used in the service. Oct 16, 2019
@dajoRH
Copy link
Contributor

dajoRH commented Oct 16, 2019

I detected some fixture changes in commit 68f7999

The local fixture provider_credentials is used in the following files:

  • cfme/tests/ansible/test_embedded_ansible_services.py

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

@sbulage sbulage changed the title [1LP][WIPTEST] Embedded Ansible service to check "Cloud Credentials" used in the service. [1LP][RFR] Embedded Ansible service to check "Cloud Credentials" used in the service. Oct 16, 2019
@izapolsk izapolsk merged commit a663c05 into ManageIQ:master Oct 17, 2019
spusateri pushed a commit to spusateri/integration_tests that referenced this pull request Jan 27, 2020
… in the service. (ManageIQ#9414)

* Removed manual tests.

* Added automation for BZ 1444092.

* Added one more manual tests.

* Updated new RHV playbook and added TODO.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lint-ok tech-debt test-automation To be applied on PR's which are automating existing manual cases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants