diff --git a/ods_ci/tests/Tests/100__deploy/100__installation/111__trustyai.robot b/ods_ci/tests/Tests/100__deploy/100__installation/111__trustyai.robot index 4e2c4cee1..74bea7b49 100644 --- a/ods_ci/tests/Tests/100__deploy/100__installation/111__trustyai.robot +++ b/ods_ci/tests/Tests/100__deploy/100__installation/111__trustyai.robot @@ -1,6 +1,8 @@ *** Settings *** Documentation Post install test cases that verify OCP KServe resources and objects Library OpenShiftLibrary +Resource ../../../Resources/OCP.resource +Resource ../../../Resources/Page/ODH/JupyterHub/HighAvailability.robot *** Variables *** @@ -11,29 +13,31 @@ ${TRUSTYAI_NS}= ${APPLICATIONS_NAMESPACE} Verify TrustyAI Operator Installation [Documentation] Verifies that the TrustyAI operator has been ... deployed in the ${APPLICATIONS_NAMESPACE} namespace in ODS - [Tags] Smoke - ... Tier1 ODS-2481 - Run Keyword And Continue On Failure Wait Until Keyword Succeeds 1 min 10 sec Verify TrustyAI Deployment + [Tags] Tier1 Sanity + ... ODS-2481 robot:recursive-continue-on-failure + Wait Until Keyword Succeeds 1 min 10 sec Verify TrustyAI Operator Deployment Wait Until Keyword Succeeds 10 times 5s Verify TrustyAI ReplicaSets Info Wait Until Keyword Succeeds 10 times 5s Verify TrustyAI Container Names *** Keywords *** -Verify trustyai-service-operator-controller-manager Deployment - [Documentation] Verifies the deployment of the trustyai operator in the namespace - Wait For Pods To Be Ready label_selector=app.kubernetes.io/created-by=trustyai-service-operator - ... namespace=${APPLICATIONS_NAMESPACE} exp_replicas=1 +Verify TrustyAI Operator Deployment + [Documentation] Verifies the deployment of the trustyai operator in the Applications namespace + Wait For Pods Number 1 + ... namespace=${TRUSTYAI_NS} + ... label_selector=app.kubernetes.io/part-of=trustyai + ... timeout=200 Verify TrustyAI ReplicaSets Info [Documentation] Fetches and verifies information from TrustyAI replicasets @{trustyai_replicasets_info} = Oc Get kind=ReplicaSet api_version=v1 namespace=${TRUSTYAI_NS} - ... label_selector=app.kubernetes.io/part-of=trustyai-service-operator + ... label_selector=app.kubernetes.io/part-of=trustyai OpenShift Resource Field Value Should Be Equal As Strings status.readyReplicas ... 1 @{trustyai_replicasets_info} Verify TrustyAI Container Names [Documentation] Verifies RHODS TrustyAI deployment @{trustyai} = Oc Get kind=Pod namespace=${TRUSTYAI_NS} api_version=v1 - ... label_selector=app.kubernetes.io/part-of=kserve - ${containerNames} = Create List kube-rbac-proxy manager + ... label_selector=app.kubernetes.io/part-of=trustyai + ${containerNames} = Create List manager Verify Deployment ${trustyai} 1 1 ${containerNames} diff --git a/ods_ci/tests/Tests/200__monitor_and_manage/200__metrics/201__billing_metrics.robot b/ods_ci/tests/Tests/200__monitor_and_manage/200__metrics/201__billing_metrics.robot index 74d3d3af3..0603cc87d 100644 --- a/ods_ci/tests/Tests/200__monitor_and_manage/200__metrics/201__billing_metrics.robot +++ b/ods_ci/tests/Tests/200__monitor_and_manage/200__metrics/201__billing_metrics.robot @@ -27,7 +27,8 @@ Verify OpenShift Monitoring Results Are Correct When Running Undefined Queries [Tags] Smoke ... Tier1 ... ODS-173 - Run OpenShift Metrics Query ${METRIC_RHODS_UNDEFINED} retry_attempts=1 + Run OpenShift Metrics Query ${METRIC_RHODS_UNDEFINED} username=${OCP_ADMIN_USER.USERNAME} password=${OCP_ADMIN_USER.PASSWORD} + ... auth_type=${OCP_ADMIN_USER.AUTH_TYPE} retry_attempts=1 Metrics.Verify Query Results Dont Contain Data [Teardown] Close All Browsers @@ -46,7 +47,8 @@ Test Metric "Rhods_Total_Users" On Cluster Monitoring Prometheus ... ODS-634 ... Tier1 Skip If RHODS Is Self-Managed - ${value} = Run OpenShift Metrics Query query=rhods_total_users + ${value} = Run OpenShift Metrics Query query=rhods_total_users username=${OCP_ADMIN_USER.USERNAME} password=${OCP_ADMIN_USER.PASSWORD} + ... auth_type=${OCP_ADMIN_USER.AUTH_TYPE} ${value_from_promothues} = Fire Query On RHODS Prometheus And Return Value query=rhods_total_users Should Be Equal ${value_from_promothues} ${value} [Teardown] Close All Browsers @@ -61,8 +63,8 @@ Test Metric "Rhods_Aggregate_Availability" On Cluster Monitoring Prometheus Skip If RHODS Is Self-Managed ${value_openshift_observe} = Run OpenShift Metrics Query - ... query=rhods_aggregate_availability - ... retry_attempts=1 return_zero_if_result_empty=False + ... query=rhods_aggregate_availability username=${OCP_ADMIN_USER.USERNAME} password=${OCP_ADMIN_USER.PASSWORD} + ... auth_type=${OCP_ADMIN_USER.AUTH_TYPE} retry_attempts=1 return_zero_if_result_empty=False SeleniumLibrary.Capture Page Screenshot @@ -80,7 +82,8 @@ Test Metric "Active_Users" On OpenShift Monitoring On Cluster Monitoring Prometh ... Tier1 ${active_users_before} = Run OpenShift Metrics Query - ... query=cluster:usage:consumption:rhods:active_users + ... username=${OCP_ADMIN_USER.USERNAME} password=${OCP_ADMIN_USER.PASSWORD} + ... auth_type=${OCP_ADMIN_USER.AUTH_TYPE} query=cluster:usage:consumption:rhods:active_users ... retry_attempts=1 return_zero_if_result_empty=True @{list_of_usernames} = Create List ${TEST_USER_3.USERNAME} ${TEST_USER_4.USERNAME} @@ -92,9 +95,9 @@ Test Metric "Active_Users" On OpenShift Monitoring On Cluster Monitoring Prometh Sleep 60s reason=Wait until metrics are available ${active_users_after} = Run OpenShift Metrics Query - ... query=cluster:usage:consumption:rhods:active_users + ... username=${OCP_ADMIN_USER.USERNAME} password=${OCP_ADMIN_USER.PASSWORD} + ... auth_type=${OCP_ADMIN_USER.AUTH_TYPE} query=cluster:usage:consumption:rhods:active_users ... retry_attempts=1 return_zero_if_result_empty=True - ${increase_active_users} = Evaluate ${active_users_after}-${active_users_before} Should Be Equal As Integers ${expected_increase_active_users} ${increase_active_users} @@ -111,7 +114,8 @@ Test Metric "Active Notebook Pod Time" On OpenShift Monitoring - Cluster Monitor Log In N Users To JupyterLab And Launch A Notebook For Each Of Them ... list_of_usernames=${list_of_usernames} Sleep 60s reason=Wait until metrics are available - ${value} = Run OpenShift Metrics Query query=cluster:usage:consumption:rhods:pod:up + ${value} = Run OpenShift Metrics Query query=cluster:usage:consumption:rhods:pod:up username=${OCP_ADMIN_USER.USERNAME} password=${OCP_ADMIN_USER.PASSWORD} + ... auth_type=${OCP_ADMIN_USER.AUTH_TYPE} Should Not Be Empty ${value} msg=Metrics does not contains value for pod:up query [Teardown] CleanUp JupyterHub For N Users list_of_usernames=${list_of_usernames} @@ -157,7 +161,8 @@ Fire Query On RHODS Prometheus And Return Value Skip Test If Previous CPU Usage Is Not Zero [Documentation] Skips test if CPU usage is not zero - ${metrics_value} = Run OpenShift Metrics Query ${METRIC_RHODS_CPU} + ${metrics_value} = Run OpenShift Metrics Query ${METRIC_RHODS_CPU} ${username}=${OCP_ADMIN_USER.USERNAME} + ... ${password}=${OCP_ADMIN_USER.PASSWORD} ${auth_type}=${OCP_ADMIN_USER.AUTH_TYPE} ${metrics_query_results_contain_data} = Run Keyword And Return Status Metrics.Verify Query Results Contain Data IF ${metrics_query_results_contain_data} Log To Console Current CPU usage: ${metrics_value} @@ -168,7 +173,8 @@ Skip Test If Previous CPU Usage Is Not Zero Verify Previus CPU Usage Is Greater Than Zero [Documentation] Verifies the cpu usage is greater than zero - ${metrics_value} = Run OpenShift Metrics Query ${METRIC_RHODS_CPU} + ${metrics_value} = Run OpenShift Metrics Query ${METRIC_RHODS_CPU} ${username}=${OCP_ADMIN_USER.USERNAME} + ... ${password}=${OCP_ADMIN_USER.PASSWORD} ${auth_type}=${OCP_ADMIN_USER.AUTH_TYPE} Metrics.Verify Query Results Contain Data Capture Page Screenshot Should Be True ${metrics_value} > 0