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

[1LP][RFR] Add support for cancel and nav_away to Host.update() and test_infrastructure_hosts_crud #10090

Merged
merged 26 commits into from
May 19, 2020

Conversation

prichard77
Copy link
Contributor

@prichard77 prichard77 commented May 4, 2020

Purpose or Intent

  • Adding tests for host edit to support cancel of edit and also navigating away before saving updates. The navigating away case will cover customer BZ 1634794.

PRT Run

{{ pytest: --use-provider complete --long-running cfme/tests/infrastructure/test_host.py::test_infrastructure_hosts_crud }}

@prichard77 prichard77 changed the title [WIP] Add support for create and nav_away to Host.update() and test_infrastructure_hosts_crud [WIPTEST] Add support for create and nav_away to Host.update() and test_infrastructure_hosts_crud May 4, 2020
@prichard77
Copy link
Contributor Author

I am still making small updates to this and testing, but I'd like to start the review.

@prichard77 prichard77 changed the title [WIPTEST] Add support for create and nav_away to Host.update() and test_infrastructure_hosts_crud [RFR] Add support for create and nav_away to Host.update() and test_infrastructure_hosts_crud May 4, 2020
@dajoRH dajoRH removed the WIP-testing label May 5, 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 @prichard77, I have some comments and suggestions, please take a look!

cfme/common/host_views.py Outdated Show resolved Hide resolved
cfme/infrastructure/host.py Outdated Show resolved Hide resolved
cfme/tests/infrastructure/test_host.py Outdated Show resolved Hide resolved
cfme/tests/infrastructure/test_host.py Outdated Show resolved Hide resolved
cfme/tests/infrastructure/test_host.py Outdated Show resolved Hide resolved
@prichard77
Copy link
Contributor Author

FYI, This PR includes commits from PR#9961. At the moment it contains all of the commits for PR#9961.

cfme/tests/infrastructure/test_host.py Show resolved Hide resolved
else:
raise
if crud_action not in ['cancel', 'nav_away_changes', 'nav_away_no_changes']:
assert host.custom_ident == new_custom_id # is this actually doing anything here
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps the host.custom_ident comes from REST API? Doesn't seem like though when I take a look on the code around the Host

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's a UI item. It can be seen on the details page and edit pages.

cfme/tests/infrastructure/test_host.py Outdated Show resolved Hide resolved
@prichard77 prichard77 changed the title [RFR] Add support for create and nav_away to Host.update() and test_infrastructure_hosts_crud [WIPTEST] Add support for create and nav_away to Host.update() and test_infrastructure_hosts_crud May 5, 2020
@prichard77
Copy link
Contributor Author

I am setting this back to WIPTEST as I have a few things to work out based upon comments, and I want reviewers to focus on other PRs for the moment.

@dajoRH dajoRH changed the title [WIPTEST] Add support for create and nav_away to Host.update() and test_infrastructure_hosts_crud [WIP] Add support for create and nav_away to Host.update() and test_infrastructure_hosts_crud May 6, 2020
@prichard77 prichard77 changed the title [WIP] Add support for create and nav_away to Host.update() and test_infrastructure_hosts_crud [WIPTEST] Add support for create and nav_away to Host.update() and test_infrastructure_hosts_crud May 7, 2020
@dajoRH dajoRH added WIP-testing and removed WIP labels May 7, 2020
@prichard77
Copy link
Contributor Author

I am updating some comments in host.update that I forget to update, but otherwise changed usage of action string to kwargs. I'll be pushing changes to comments shortly, but would still like review comments.

@prichard77 prichard77 changed the title [WIPTEST] Add support for create and nav_away to Host.update() and test_infrastructure_hosts_crud [RFR] Add support for create and nav_away to Host.update() and test_infrastructure_hosts_crud May 7, 2020
@dajoRH dajoRH removed the WIP-testing label May 7, 2020
@john-dupuy john-dupuy changed the title [RFR] Add support for create and nav_away to Host.update() and test_infrastructure_hosts_crud [1LP][RFR] Add support for create and nav_away to Host.update() and test_infrastructure_hosts_crud May 7, 2020
cfme/infrastructure/host.py Outdated Show resolved Hide resolved
cfme/infrastructure/host.py Outdated Show resolved Hide resolved
cfme/tests/infrastructure/test_host.py Show resolved Hide resolved
cfme/tests/infrastructure/test_host.py Outdated Show resolved Hide resolved
cfme/tests/infrastructure/test_host.py Outdated Show resolved Hide resolved
cfme/tests/infrastructure/test_host.py Outdated Show resolved Hide resolved
@prichard77 prichard77 changed the title [1LP][WIPTEST] Add support for create and nav_away to Host.update() and test_infrastructure_hosts_crud [1LP][RFR] Add support for create and nav_away to Host.update() and test_infrastructure_hosts_crud May 13, 2020
@prichard77
Copy link
Contributor Author

I updated so that edit from details would be the default behavior as it was originally.

@prichard77 prichard77 requested a review from mshriver May 13, 2020 21:57
@prichard77
Copy link
Contributor Author

rerunning PRT. I am not sure why it's failing as it is passing when I run locally.

@mshriver mshriver changed the title [1LP][RFR] Add support for create and nav_away to Host.update() and test_infrastructure_hosts_crud [1LP][WIPTEST] Add support for create and nav_away to Host.update() and test_infrastructure_hosts_crud May 14, 2020
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.

The approach of building the behavior for the test into Host.update has been rejected, please see individual comments. Thanks @prichard77

@prichard77 prichard77 changed the title [1LP][WIPTEST] Add support for create and nav_away to Host.update() and test_infrastructure_hosts_crud [1LP][RFR] Add support for create and nav_away to Host.update() and test_infrastructure_hosts_crud May 14, 2020
…in cancel calls in test_infrastructure_hosts_crud
@prichard77 prichard77 requested a review from mshriver May 14, 2020 17:33
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.

Two more really small changes requested, otherwise the test is looking great now!

@prichard77 prichard77 requested a review from mshriver May 15, 2020 14:32
@mshriver mshriver merged commit c63b987 into ManageIQ:master May 19, 2020
@prichard77 prichard77 changed the title [1LP][RFR] Add support for create and nav_away to Host.update() and test_infrastructure_hosts_crud [1LP][RFR] Add support for cancel and nav_away to Host.update() and test_infrastructure_hosts_crud May 26, 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.

7 participants