ManageIQ / integration_tests

ManageIQ integration tests
GNU General Public License v2.0
69 stars 164 forks source link

[WIPTEST] Fix AttributeError: 'ConfigManagementToolbar' object has no attribute 'reload' #10315

Open jarovo opened 4 years ago

jarovo commented 4 years ago

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:

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'