red-hat-storage / ocs-ci

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

Add custom taints in the test case tests/functional/pod_and_daemons/test_cephtoolbox_pod_nodeaffinity.py #10358

Open nagendra202 opened 2 months ago

nagendra202 commented 2 months ago

Finish the TODO task mentioned in below PR Original PR: https://github.com/red-hat-storage/ocs-ci/pull/9973

` def test_nodeaffinity_to_ceph_toolbox_with_custom_taints(self): """ This test verifies whether ceph toolbox failovered or not after applying node affinity on custom tainted node. """ worker_nodes = get_worker_nodes() log.info(f"Current available worker nodes are {worker_nodes}")

TODO: <<PR9808 yet to be merged. Once it is merged, the custom taints function need to be called here.>>

    # <<This task will be done in another PR>>
    other_nodes = get_worker_node_where_ceph_toolbox_not_running()
    log.info(
        "Apply node affinity with a node name other than currently running node."
    )
    assert apply_node_affinity_for_ceph_toolbox(other_nodes[0])`
nagendra202 commented 2 months ago

` @tier4b @polarion_id("OCS-6091") def test_nodeaffinity_to_ceph_toolbox_with_custom_taints(self): """ This test verifies whether ceph toolbox failovered or not after applying node affinity on custom tainted node.

    """
    worker_nodes = get_worker_nodes()
    log.info(f"Current available worker nodes are {worker_nodes}")
    # TODO: <<PR9808 yet to be merged. Once it is merged, the custom taints function need to be called here.>>
    # <<This task will be implemented as part of https://github.com/red-hat-storage/ocs-ci/issues/10358 >>
    other_nodes = get_worker_node_where_ceph_toolbox_not_running()
    log.info(
        "Apply node affinity with a node name other than currently running node."
    )
    assert apply_node_affinity_for_ceph_toolbox(other_nodes[0])

`