This repository was archived by the owner on Apr 7, 2022. It is now read-only.
[WIPTEST] Fix AttributeError: 'ConfigManagementToolbar' object has no attribute 'reload'#10315
Open
jarovo wants to merge 1 commit intoManageIQ:masterfrom
jarovo:awx_reload_refresh
Open
[WIPTEST] Fix AttributeError: 'ConfigManagementToolbar' object has no attribute 'reload'#10315jarovo wants to merge 1 commit intoManageIQ:masterfrom jarovo:awx_reload_refresh
jarovo wants to merge 1 commit intoManageIQ:masterfrom
jarovo:awx_reload_refresh
Conversation
to make it work with code for adding the provider
I am not sure how to 100% reproduce this, but the traceback was:
```
2020-09-04 00:48:40,891 [E] [cfme] def validate(self, timeout=1000, delay=5):
refresh_timer = RefreshTimer(time_for_refresh=300)
try:
wait_for(self.is_refreshed,
[refresh_timer],
message="is_refreshed",
timeout=timeout,
delay=delay,
> handle_exception=True)
E wait_for.TimedOutError: Could not do 'is_refreshed' at /home/jhenner/work/miq/bad_awx_template_bz/.cfme_venv3/lib64/python3.7/site-packages/varmeth/__init__.py:79 in time
cfme/common/provider.py:743: TimedOutError
During handling of the above exception, another exception occurred:
@pytest.mark.provider([AnsibleTowerProvider], selector=ONE_PER_VERSION, scope="function")
@pytest.mark.meta(automates=[1819310])
def test_awx_with_special_chars_refreshes(appliance: IPAppliance, provider: AnsibleTowerProvider,
add_special_characters):
"""
Tests whether provider with special characters in template definition refreshes in CFME
:param appliance:
:param provider:
:param add_special_characters:
:return:
Polarion:
assignee
initialEstimate
"""
# TODO Fill this
add_special_characters(provider)
> provider.setup()
cfme/tests/infrastructure/test_providers.py:578:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cfme/common/provider.py:715: in setup
return self.create_rest(check_existing=True, validate_inventory=True)
cfme/infrastructure/config_management/__init__.py:468: in create_rest
self.validate(timeout=300)
cfme/common/provider.py:746: in validate
self.load_details(refresh=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
def load_details(self, refresh=False):
"""To be compatible with the Taggable and PolicyProfileAssignable mixins.
Returns: ProviderDetails view
"""
view = navigate_to(self, 'Details')
if refresh:
> view.toolbar.reload.click()
E AttributeError: 'ConfigManagementToolbar' object has no attribute 'reload'
```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose or Intent
It seems like the code for adding providers is not finding an attribute which it is looking for as there is misnomer.
I've hit this exception when adding the AWX provider. I didn't spend time to figure out how to 100% reproduce this. The traceback was: