From 37eeeb27186d741f1bc3f238519202318d346987 Mon Sep 17 00:00:00 2001 From: Diego Lovison Date: Thu, 19 Sep 2024 14:48:36 -0300 Subject: [PATCH] Fix Pipelines E2E testing --- ...science-pipelines-operator-e2e-tests.robot | 24 +++++++------------ 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/ods_ci/tests/Tests/1100__data_science_pipelines/1110__test-run-data-science-pipelines-operator-e2e-tests.robot b/ods_ci/tests/Tests/1100__data_science_pipelines/1110__test-run-data-science-pipelines-operator-e2e-tests.robot index 73f531233..1b37f5cb2 100644 --- a/ods_ci/tests/Tests/1100__data_science_pipelines/1110__test-run-data-science-pipelines-operator-e2e-tests.robot +++ b/ods_ci/tests/Tests/1100__data_science_pipelines/1110__test-run-data-science-pipelines-operator-e2e-tests.robot @@ -1,7 +1,7 @@ *** Settings *** Documentation Data Science Pipelines Operator Integration Tests - https://github.com/opendatahub-io/data-science-pipelines-operator/tree/main/tests Suite Setup Prepare Data Science Pipelines Operator Integration Tests Suite -Suite Teardown Teardown Data Science Pipelines Operator Integration Tests Suite +Suite Teardown RHOSi Teardown Library OperatingSystem Library Process Resource ../../../tasks/Resources/RHODS_OLM/install/oc_install.robot @@ -11,10 +11,9 @@ Library ../../../libs/DataSciencePipelinesAPI.py *** Variables *** # For the initial commit we are hardcoding those environment variables -${DATA-SCIENCE-PIPELINES-OPERATOR-SDK_DIR} /tmp/data-science-pipelines-operator +${DSPO_SDK_DIR} /tmp/data-science-pipelines-operator ${DATA-SCIENCE-PIPELINES-OPERATOR-SDK_REPO_URL} https://github.com/opendatahub-io/data-science-pipelines-operator.git ${DATA-SCIENCE-PIPELINES-OPERATOR-SDK_REPO_BRANCH} main -${DSPANAMESPACE} dspa-e2e ${KUBECONFIGPATH} %{HOME}/.kube/config #robocop: disable: line-too-long @@ -27,7 +26,7 @@ Run Data Science Pipelines Operator Integration Tests ... ODS-2632 AutomationBug ${openshift_api} Get Openshift Server Log ${openshift_api} - ${return_code} ${output} Run And Return Rc And Output cd ${DATA-SCIENCE-PIPELINES-OPERATOR-SDK_DIR} && make integrationtest K8SAPISERVERHOST=${openshift_api} DSPANAMESPACE=${DSPANAMESPACE} KUBECONFIGPATH=${KUBECONFIGPATH} + ${return_code} ${output} Run And Return Rc And Output cd ${DSPO_SDK_DIR} && GIT_WORKSPACE=${DSPO_SDK_DIR} sh .github/scripts/tests/tests.sh --rhoai --k8s-api-server-host ${openshift_api} --kube-config ${KUBECONFIGPATH} --dspa-path ${DSPO_SDK_DIR}/tests/resources/dspa.yaml --external-dspa-path ${DSPO_SDK_DIR}/tests/resources/dspa-external.yaml --clean-infra --endpoint-type route Log ${output} Should Be Equal As Integers ${return_code} 0 msg= Run Data Science Pipelines Operator Integration Tests failed @@ -35,18 +34,13 @@ Run Data Science Pipelines Operator Integration Tests *** Keywords *** Prepare Data Science Pipelines Operator Integration Tests Suite [Documentation] Prepare Data Science Pipelines Operator Integration Tests Suite - ${return_code} ${output} Run And Return Rc And Output rm -fR ${DATA-SCIENCE-PIPELINES-OPERATOR-SDK_DIR} + ${return_code} ${output} Run And Return Rc And Output rm -fR ${DSPO_SDK_DIR} Log ${output} - ${return_code} ${output} Run And Return Rc And Output git clone ${DATA-SCIENCE-PIPELINES-OPERATOR-SDK_REPO_URL} ${DATA-SCIENCE-PIPELINES-OPERATOR-SDK_DIR} + ${return_code} ${output} Run And Return Rc And Output git clone ${DATA-SCIENCE-PIPELINES-OPERATOR-SDK_REPO_URL} ${DSPO_SDK_DIR} Log ${output} - Should Be Equal As Integers ${return_code} 0 msg=Unable to clone data-science-pipelines-operator repo ${DATA-SCIENCE-PIPELINES-OPERATOR-SDK_REPO_URL}:${DATA-SCIENCE-PIPELINES-OPERATOR-SDK_REPO_BRANCH}:${DATA-SCIENCE-PIPELINES-OPERATOR-SDK_DIR} - ${return_code} ${output} Run And Return Rc And Output cd ${DATA-SCIENCE-PIPELINES-OPERATOR-SDK_DIR} && git checkout -b it_test origin/${DATA-SCIENCE-PIPELINES-OPERATOR-SDK_REPO_BRANCH} + Should Be Equal As Integers ${return_code} 0 msg=Unable to clone data-science-pipelines-operator repo ${DATA-SCIENCE-PIPELINES-OPERATOR-SDK_REPO_URL}:${DATA-SCIENCE-PIPELINES-OPERATOR-SDK_REPO_BRANCH}:${DSPO_SDK_DIR} + ${return_code} ${output} Run And Return Rc And Output cd ${DSPO_SDK_DIR} && git checkout -b it_test origin/${DATA-SCIENCE-PIPELINES-OPERATOR-SDK_REPO_BRANCH} Should Be Equal As Integers ${return_code} 0 msg=Unable to checkout data-science-pipelines-operator RHOSi Setup - ${rc} ${out}= Run And Return Rc And Output oc new-project ${DSPANAMESPACE} - Should Be Equal As Integers ${rc} 0 msg=Cannot create a new project ${DSPANAMESPACE} - -Teardown Data Science Pipelines Operator Integration Tests Suite - ${return_code} ${output} Run And Return Rc And Output oc delete project ${DSPANAMESPACE} --force --grace-period=0 - Log ${output} - RHOSi Teardown + # Store login information into dedicated config + Login To OCP Using API And Kubeconfig ${OCP_ADMIN_USER.USERNAME} ${OCP_ADMIN_USER.PASSWORD} ${KUBECONFIGPATH}