red-hat-storage / ocs-ci

https://ocs-ci.readthedocs.io/en/latest/
MIT License
108 stars 168 forks source link

Disable test_create_delete_pool for External mode clusters #10751

Open DanielOsypenko opened 1 month ago

DanielOsypenko commented 1 month ago

test_create_delete_pool usually fails to create Storage Class on External mode clusters because no dropdown for a block pool, user can't create a new pool too due to restrictions to manage external storage

Documentation says no support to create Storage Class for External Mode clusters image

https://reportportal-ocs4.apps.ocp-c1.prod.psi.redhat.com/ui/#ocs/launches/738/25719/1248174/1248194/log

tests/conftest.py:5474: in factory
    sc_name = storageclass_ui_object.create_storageclass(pool_name)
ocs_ci/ocs/ui/storageclass.py:42: in create_storageclass
    self.do_click(self.sc_loc["pool_dropdown"])
ocs_ci/ocs/ui/base_ui.py:217: in do_click
    _do_click(locator, timeout, enable_screenshot, copy_dom)

_locator = ('button[id="pool-dropdown-id"]', 'css selector'), _timeout = 30
_enable_screenshot = False, _copy_dom = False

def _do_click(_locator, _timeout=30, _enable_screenshot=False, _copy_dom=False):
    # wait for page fully loaded only if an element was not located
    # prevents needless waiting and frequent crushes on ODF Overview page,
    # when metrics and alerts frequently updated
    if not self.get_elements(_locator):
        self.page_has_loaded()
    screenshot = (
        ocsci_config.UI_SELENIUM.get("screenshot") and enable_screenshot
    )
    if screenshot:
        self.take_screenshot()
    if _copy_dom:
        self.copy_dom()

    wait = WebDriverWait(self.driver, timeout)
    try:
        if (
            version.get_semantic_version(get_ocp_version(), True)
            <= version.VERSION_4_11
        ):
            element = wait.until(
                ec.element_to_be_clickable((locator[1], locator[0]))
            )
        else:
            element = wait.until(
                ec.visibility_of_element_located((locator[1], locator[0]))
            )
        element.click()
    except TimeoutException as e:
        self.take_screenshot()
        self.copy_dom()
        logger.error(e)

      raise TimeoutException(
            f"Failed to find the element ({locator[1]},{locator[0]})"
        )
E           selenium.common.exceptions.TimeoutException: Message: Failed to find the element (css selector,button[id="pool-dropdown-id"])
DanielOsypenko commented 1 month ago

We need to pay attention that all failures happened on Multi StorageCluster modes https://reportportal-ocs4.apps.ocp-c1.prod.psi.redhat.com/ui/#ocs/launches/738/25719/1248174/1248194/log That probably means the Deployment will not be marked as External mode but will have multiple storage clusters:

https://github.com/red-hat-storage/ocs-ci/blob/fd2e113de473ef346a5318f95e8bbb3823b7fd46/conf/ocsci/enable-multi-storagecluster.yaml

  storage_cluster_name: 'ocs-storagecluster'
  external_storage_cluster_name: 'ocs-external-storagecluster'

and supposedly will have

DEPLOYMENT:
  multi_storagecluster: True

we need to cover all cases to exclude it from regression