-
Notifications
You must be signed in to change notification settings - Fork 165
[1LP][RFR] Add test_appliance_replicate_remote_down #9964
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two small questions, looking great!
" -j DROP") | ||
assert result.success, "Could not create firewall rule on global appliance." | ||
|
||
global_appliance.browser.widgetastic.refresh() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need a browser refresh here? If it is necessary, can you just do global_appliance.browser.refresh()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm using a browser refresh because the Replication tab is already displayed from the first call to get_replication_status(). After the firewall rule is added, we want to verify that the Replication tab re-displays successfully, but the second call to get_replication_status() doesn't do any navigation/refresh since the view is already being displayed.
global_appliance.browser is a ViaUI instance and doesn't have the refresh() method, whereas global_appliance.browser.widgetastic is the MiqBrowser instance that provides access to refresh() and other Selenium actions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, thanks for the explanation. One possible enhancement could be to have a force
arg or kwarg in that get_replication_status
so you can refresh the page via that method. I'd consider this optional however.
Add test_appliance_replicate_remote_down for BZ coverage of:
Bug 1796681 - Replication tab presenting 502 proxy error when remote site is down
https://bugzilla.redhat.com/show_bug.cgi?id=1796681
and remove outdated manual test test_subscription_region_unavailable.
{{ pytest: --long-running -k test_appliance_replicate_remote_down cfme/tests/distributed/test_appliance_replication.py -v }}