Skip to content

Commit

Permalink
Updated ux pod respin testcase
Browse files Browse the repository at this point in the history
Signed-off-by: Amrita Mahapatra <[email protected]>
  • Loading branch information
amr1ta committed Jun 13, 2024
1 parent 7cf19ac commit cc42719
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion ocs_ci/ocs/ui/validation_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ def verify_storage_clients_page(self):
"""
self.refresh_web_console()
_ = self.nav_to_storageclients_page()
self.nav_to_storageclients_page()
strings_storage_clients_tab = ["Storage clients", "Name"]
self.verify_page_contain_strings(
strings_on_page=strings_storage_clients_tab, page_name="storage clients"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import logging
import pytest
import time

from ocs_ci.ocs.resources import pod
from ocs_ci.ocs import constants, ocp
Expand Down Expand Up @@ -55,22 +56,22 @@ def test_respin_of_ux_server_pod(self):
3. user can generate onboarding token by selecting this option.
"""
# Respin ux-backend-server pod
ux_pod_objs = pod.get_all_pods(
ux_pod = pod.get_pods_having_label(
label=constants.UX_BACKEND_SERVER_LABEL,
namespace=config.ENV_DATA["cluster_namespace"],
selector=constants.UX_BACKEND_SERVER_LABEL,
)
pod.delete_pods(pod_objs=ux_pod_objs[0])
ux_pod_obj = pod.Pod(**ux_pod[0])

# Wait untill ux backend server pod's recovery
self.pod_obj.wait_for_resource(
condition=constants.STATUS_RUNNING,
selector=constants.UX_BACKEND_SERVER_LABEL,
resource_count=1,
timeout=180,
sleep=5,
ux_pod_obj.delete()
log.info("wait some time for another ux-backend-server pod to come up")
time.sleep(30)
ux_pod = pod.get_pods_having_label(
label=constants.UX_BACKEND_SERVER_LABEL,
namespace=config.ENV_DATA["cluster_namespace"],
)
log.info("ux backed server pod is up and running")
assert pod.validate_pods_are_respinned_and_running_state(ux_pod_objs)
ux_pod_obj = pod.Pod(**ux_pod[0])
log.info("ux backed server pod respinned")
assert pod.validate_pods_are_respinned_and_running_state([ux_pod_obj])

def test_onboarding_token_generation_option_is_available_in_ui(
self, setup_ui_class
Expand Down

0 comments on commit cc42719

Please sign in to comment.