From 98a4185d5ab137c76f8e0f0e20e773da4587c9a1 Mon Sep 17 00:00:00 2001 From: Berto D'Attoma <88311595+bdattoma@users.noreply.github.com> Date: Mon, 23 Oct 2023 11:03:34 +0200 Subject: [PATCH] Make DS Project tests independent (#978) * remove ODS-1812 Signed-off-by: bdattoma * stop workbench from starting status Signed-off-by: bdattoma * add kw to delete single project from cli Signed-off-by: bdattoma * first attempt for adding independence Signed-off-by: bdattoma * move tests to Edit suite Signed-off-by: bdattoma * refactor clean project kw and move some tests Signed-off-by: bdattoma * remove common workbench and refactor Signed-off-by: bdattoma * fix ODS-1970 and 1971 - mark autobug on 1819 Signed-off-by: bdattoma * fix misc failures Signed-off-by: bdattoma * more fixes Signed-off-by: bdattoma * fix 1813 and add wait for workbench deletion Signed-off-by: bdattoma * add small sleep before checking secret deletion Signed-off-by: bdattoma * add project creation in suite setup for Edit suite Signed-off-by: bdattoma * minor changes suite setup/teardown in DSprojects suite Signed-off-by: bdattoma * fix ods-1826 Signed-off-by: bdattoma * fix setup edit suite Signed-off-by: bdattoma * start test from ds project home page Signed-off-by: bdattoma * fix dc edit test + edit dc name Signed-off-by: bdattoma * fix edit workbench kw Signed-off-by: bdattoma * add description to multiprojects test Signed-off-by: bdattoma --------- Signed-off-by: bdattoma --- .../DataConnections.resource | 4 +- .../ODHDataScienceProject/Projects.resource | 21 +- .../ODHDataScienceProject/Storages.resource | 2 +- .../Workbenches.resource | 37 +- .../415__ods_dashboard_projects.robot | 455 ++++++++---------- ...5__ods_dashboard_projects_additional.robot | 55 ++- .../415__ods_dashboard_projects_edit.robot | 71 ++- 7 files changed, 374 insertions(+), 271 deletions(-) diff --git a/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHDataScienceProject/DataConnections.resource b/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHDataScienceProject/DataConnections.resource index 219b08cec..dad76d0d4 100644 --- a/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHDataScienceProject/DataConnections.resource +++ b/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHDataScienceProject/DataConnections.resource @@ -35,11 +35,11 @@ Create S3 Data Connection Edit S3 Data Connection [Documentation] Edits a S3 Data Connection from DS Project details page - [Arguments] ${project_title} ${dc_name} ${aws_access_key} ${aws_secret_access} + [Arguments] ${project_title} ${dc_name} ${aws_access_key} ${aws_secret_access} ${new_dc_name}=${dc_name} ... ${aws_s3_endpoint}=${S3.AWS_DEFAULT_ENDPOINT} ${aws_region}=${S3.AWS_DEFAULT_REGION} ... ${connected_workbench}=${NONE} ${press_cancel}=${FALSE} ${aws_bucket_name}=${NONE} Workbenches.Click Action From Actions Menu item_title=${dc_name} item_type=data connection action=Edit - Fill Data Connection Form ${project_title} ${dc_name} ${aws_access_key} ${aws_secret_access} + Fill Data Connection Form ${project_title} ${new_dc_name} ${aws_access_key} ${aws_secret_access} ... ${S3_DC_EDIT_BTN} aws_s3_endpoint=${aws_s3_endpoint} aws_region=${aws_region} ... connected_workbench=${connected_workbench} press_cancel=${press_cancel} ... aws_bucket_name=${aws_bucket_name} diff --git a/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHDataScienceProject/Projects.resource b/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHDataScienceProject/Projects.resource index 62c4d6879..261c1dfd6 100644 --- a/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHDataScienceProject/Projects.resource +++ b/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHDataScienceProject/Projects.resource @@ -78,7 +78,7 @@ Is Data Science Project Details Page Open [Arguments] ${project_title} ${page_open}= Run Keyword And Return Status ... SeleniumLibrary.Page Should Contain Element xpath=//h1[contains(text(),"${project_title}")] - [Return] ${page_open} + [Return] ${page_open} Wait Until Project Is Open [Documentation] Waits until a DS Project Details page is laoded @@ -178,6 +178,7 @@ Delete Data Science Project From CLI END END + Workbench Status Should Be From Projects Home Page [Documentation] Checks the workbench status is the expected one, from the DS Project home page [Arguments] ${workbench_title} ${status} ${project_title} @@ -221,7 +222,11 @@ Stop Workbench From Projects Home Page ... Workbench Status Should Be From Projects Home Page workbench_title=${workbench_title} ... status=${WORKBENCH_STATUS_RUNNING} ... project_title=${project_title} - IF ${is_started} == ${TRUE} + ${is_starting}= Run Keyword And Return Status + ... Workbench Status Should Be From Projects Home Page workbench_title=${workbench_title} + ... status=${WORKBENCH_STATUS_STARTING} + ... project_title=${project_title} + IF ${is_started} == ${TRUE} or ${is_starting} == ${TRUE} IF "${workbench_cr_name}" == "${EMPTY}" IF "${namespace}" == "${EMPTY}" ${namespace}= Get Openshift Namespace From Data Science Project project_title=${project_title} @@ -395,4 +400,14 @@ Create Data Science Project If Not Exists Log msg=There is no DS Projects with Diplay Name equal to ${project_title}. Creating it now. Launch Data Science Project Main Page username=${username} Create Data Science Project title=${PRJ_TITLE} description=${description} - END \ No newline at end of file + END + +Clean Project From Workbench Resources + [Documentation] Deletes resources from a test project to free up + ... resources or re-use titles. + ... AT THE MOMENT, ONLY WORKBENCH AND PVC DELETION ARE IMPLEMENTED + [Arguments] ${workbench_title} ${project_title} + ... ${pvc_title}=${workbench_title} + Delete Workbench From CLI workbench_title=${workbench_title} + ... project_title=${project_title} + Delete PVC From CLI pvc_title=${pvc_title} project_title=${project_title} diff --git a/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHDataScienceProject/Storages.resource b/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHDataScienceProject/Storages.resource index 4cefaa920..b7ff55921 100644 --- a/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHDataScienceProject/Storages.resource +++ b/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHDataScienceProject/Storages.resource @@ -126,4 +126,4 @@ Delete PVC From CLI ${ns_name}= Get Openshift Namespace From Data Science Project project_title=${project_title} ${_} ${cr_name}= Get Openshift PVC From Storage ... name=${pvc_title} namespace=${ns_name} - Oc Delete kind=PersistentVolumeClaim name=${pvc_title} namespace=${ns_name} + Oc Delete kind=PersistentVolumeClaim name=${cr_name} namespace=${ns_name} diff --git a/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHDataScienceProject/Workbenches.resource b/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHDataScienceProject/Workbenches.resource index fcc8ba98e..d470f8efa 100644 --- a/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHDataScienceProject/Workbenches.resource +++ b/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHDataScienceProject/Workbenches.resource @@ -319,25 +319,30 @@ Open Workbench Stop Workbench [Documentation] Stops a workbench from DS Project details page - [Arguments] ${workbench_title} ${press_cancel}=${FALSE} + [Arguments] ${workbench_title} ${press_cancel}=${FALSE} ${from_running}=${TRUE} ${is_started}= Run Keyword And Return Status Workbench Status Should Be ... workbench_title=${workbench_title} status=${WORKBENCH_STATUS_RUNNING} - IF ${is_started} == ${TRUE} + ${is_starting}= Run Keyword And Return Status Workbench Status Should Be + ... workbench_title=${workbench_title} status=${WORKBENCH_STATUS_STARTING} + IF ${is_started} == ${TRUE} or ${is_starting} == ${TRUE} Click Element ${WORKBENCH_SECTION_XP}//tr[td[@data-label="Name"]/*[div[text()="${workbench_title}"]]]/td[@data-label="Status"]//span[@class="pf-c-switch__toggle"] Wait Until Generic Modal Appears Handle Stop Workbench Confirmation Modal press_cancel=${press_cancel} + ... from_running=${from_running} ELSE - Fail msg=Cannot stop workbench ${workbench_title} because it is not running... + Fail msg=Cannot stop workbench ${workbench_title} because it is not neither running or starting... END Handle Stop Workbench Confirmation Modal [Documentation] Handles modal to stop workbench - [Arguments] ${press_cancel}=${FALSE} + [Arguments] ${press_cancel}=${FALSE} ${from_running}=${TRUE} Run Keyword And Continue On Failure Page Should Contain Stop workbench? - Run Keyword And Continue On Failure - ... Page Should Contain Are you sure you want to stop the workbench? Any changes without saving will be erased. - Run Keyword And Continue On Failure Page Should Contain To save changes, access your - Run Keyword And Continue On Failure Page Should Contain Element xpath=//a[.="workbench"] + IF ${from_running} == ${TRUE} + Run Keyword And Continue On Failure + ... Page Should Contain Are you sure you want to stop the workbench? Any changes without saving will be erased. + Run Keyword And Continue On Failure Page Should Contain To save changes, access your + Run Keyword And Continue On Failure Page Should Contain Element xpath=//a[.="workbench"] + END Run Keyword And Continue On Failure Page Should Contain Element xpath=//input[@id="dont-show-again"] Run Keyword And Continue On Failure Click Element xpath=//input[@id="dont-show-again"] Run Keyword And Continue On Failure Click Element xpath=//input[@id="dont-show-again"] @@ -363,12 +368,13 @@ Delete Workbench Edit Workbench [Documentation] Edits a workbench [Arguments] ${workbench_title} - Click Action From Actions Menu item_title=${workbench_title} item_type=workbench action=Edit + Workbenches.Click Action From Actions Menu item_title=${workbench_title} item_type=workbench action=Edit Wait Until Page Contains Element ${WORKBENCH_NAME_INPUT_XP} Check Launched Workbench Is The Correct One [Documentation] Checks if the launched workbench is the expected one - [Arguments] ${workbench_title} ${image} ${namespace} + [Arguments] ${workbench_title} ${image} ${project_title} + ${namespace}= Get Openshift Namespace From Data Science Project project_title=${project_title} ${_} ${cr_name}= Get Openshift Notebook CR From Workbench workbench_title=${workbench_title} namespace=${namespace} ${current_url}= Get Location Location Should Contain ${cr_name} @@ -479,7 +485,18 @@ Delete Workbench From CLI ${ns_name}= Get Openshift Namespace From Data Science Project project_title=${project_title} ${_} ${cr_name}= Get Openshift Notebook CR From Workbench ... workbench_title=${workbench_title} namespace=${ns_name} + IF "${cr_name}" == "${EMPTY}" + Log msg=There is probably no Workbench with Diplay Name equal to ${workbench_title} + ... level=WARN + ELSE Oc Delete kind=Notebook name=${cr_name} namespace=${ns_name} + WHILE ${TRUE} + ${_} ${cr_name}= Get Openshift Notebook CR From Workbench + ... workbench_title=${workbench_title} namespace=${ns_name} + IF "${cr_name}" == "${EMPTY}" BREAK + Sleep 5s reason=let's not overload the API + END + END GPU Dropdown Should Be Disabled [Documentation] Checks if the GPU dropdown is not able editable diff --git a/ods_ci/tests/Tests/400__ods_dashboard/415__ods_dashboard_projects/415__ods_dashboard_projects.robot b/ods_ci/tests/Tests/400__ods_dashboard/415__ods_dashboard_projects/415__ods_dashboard_projects.robot index 799107c7e..6c045f8fe 100644 --- a/ods_ci/tests/Tests/400__ods_dashboard/415__ods_dashboard_projects/415__ods_dashboard_projects.robot +++ b/ods_ci/tests/Tests/400__ods_dashboard/415__ods_dashboard_projects/415__ods_dashboard_projects.robot @@ -10,13 +10,13 @@ Resource ../../../Resources/Page/ODH/ODHDashboard/ODHDataScienceProjec Suite Setup Project Suite Setup Suite Teardown Project Suite Teardown Test Setup Launch Data Science Project Main Page -Test Teardown Close All Browsers + *** Variables *** -${PRJ_TITLE}= ODS-CI DS Project +${PRJ_TITLE}= ODS-CI Common Prj ${PRJ_TITLE1}= ODS-CI DS Project1 -${PRJ_RESOURCE_NAME}= ods-ci-ds-project-test -${PRJ_DESCRIPTION}= ${PRJ_TITLE} is a test project for validating DS Projects feature +${PRJ_RESOURCE_NAME}= ods-ci-common-ds-project +${PRJ_DESCRIPTION}= ${PRJ_TITLE} is a test project for validating DS Projects feature and shared by multiple tests ${NB_IMAGE}= Minimal Python ${WORKBENCH_TITLE}= ODS-CI Workbench 1 ${WORKBENCH_DESCRIPTION}= ODS-CI Workbench 1 is a test workbench using ${NB_IMAGE} image to test DS Projects feature @@ -38,6 +38,7 @@ ${PV_DESCRIPTION}= ods-ci-pv is a PV created to test DS Projects feature ${PV_SIZE}= 2 ${DC_S3_NAME}= ods-ci-s3 ${DC_2_S3_NAME}= ods-ci-s3-connected +${DC_3_S3_NAME}= ods-ci-s3-delete ${DC_S3_AWS_SECRET_ACCESS_KEY}= custom dummy secret access key ${DC_S3_AWS_ACCESS_KEY}= custom dummy access key id ${DC_S3_ENDPOINT}= custom.endpoint.s3.com @@ -49,6 +50,7 @@ ${ENV_CM_FILEPATH}= ods_ci/tests/Resources/Files/env_vars_cm.yaml ${NEW_PRJ_DESCRIPTION}= ${PRJ_TITLE} is a New edited test project for validating DS Projects feature ${NEW_PRJ_TITLE}= ODS-CI DS Project Updated + *** Test Cases *** Verify Data Science Projects Page Is Accessible [Documentation] Verifies "Data Science Projects" page is accessible from @@ -76,8 +78,9 @@ Verify Workbench Images Have Multiple Versions [Tags] Smoke Sanity ... Tier1 ... ODS-2131 - Launch Data Science Project Main Page - Create Data Science Project title=${PRJ_TITLE} description=${EMPTY} + # Launch Data Science Project Main Page + # Create Data Science Project title=${PRJ_TITLE} description=${EMPTY} + Open Data Science Project Details Page project_title=${PRJ_TITLE} Click Element ${WORKBENCH_CREATE_BTN_XP} Wait Until Page Contains Element ${WORKBENCH_NAME_INPUT_XP} Run Keyword And Continue On Failure Element Should Be Disabled ${WORKBENCH_CREATE_BTN_2_XP} @@ -85,31 +88,11 @@ Verify Workbench Images Have Multiple Versions Select Workbench Jupyter Image image_name=${img} version=previous Select Workbench Jupyter Image image_name=${img} version=default END - [Teardown] Project Suite Teardown - -Verify DS Projects Home Page Shows The Right Number Of Items The User Has Selected - [Documentation] Verifies that correct number of data science projects appear when - ... multiple data science projects are added - [Tags] ODS-2015 Sanity Tier1 - [Teardown] Delete Multiple Data Science Projects title=ds-project-ldap-user number=20 - ${all_projects}= Create Multiple Data Science Projects title=ds-project-ldap-user description=${EMPTY} - ... number=20 - Number Of Displayed Projects Should Be expected_number=10 - ${curr_page_projects}= Get All Displayed Projects - ${remaining_projects}= Remove Current Page Projects From All Projects - ... ${all_projects} ${curr_page_projects} - Check Pagination Is Correct On The Current Page page=1 total=20 - Go To Next Page Of Data Science Projects - Number Of Displayed Projects Should Be expected_number=10 - ${curr_page_projects}= Get All Displayed Projects - ${remaining_projects}= Remove Current Page Projects From All Projects - ... ${all_projects} ${curr_page_projects} - Check Pagination Is Correct On The Current Page page=2 total=20 - Should Be Empty ${remaining_projects} Verify User Cannot Create Project With Empty Fields [Tags] Sanity ODS-1783 [Documentation] Verifies users is not allowed to create a project with Empty title + Open Data Science Projects Home Page Create Project With Empty Title And Expect Error Close Generic Modal If Present @@ -117,104 +100,22 @@ Verify User Cannot Create Project Using Special Chars In Resource Name [Tags] Sanity Tier1 ODS-1875 [Documentation] Verifies users is not allowed to create a project with a custom resource name ... containing special characters like "@" or "!" + Open Data Science Projects Home Page Create Project With Special Chars In Resource Name And Expect Error Close Generic Modal If Present -Verify User Can Access Only Its Owned Projects - [Tags] Sanity Tier1 ODS-1868 - [Documentation] Verifies each user can access only thei owned projects. Except for - ... cluster and dedicated admins which should be able to fetch all the DS Projects - [Setup] Set Variables For User Access Test - Launch Data Science Project Main Page username=${TEST_USER_3.USERNAME} password=${TEST_USER_3.PASSWORD} - Open Data Science Projects Home Page - Create Data Science Project title=${PRJ_1_USER3} description=${EMPTY} - Open Data Science Projects Home Page - Project Should Be Listed project_title=${PRJ_1_USER3} - Project's Owner Should Be expected_username=${TEST_USER_3.USERNAME} project_title=${PRJ_1_USER3} - Open Data Science Projects Home Page - Create Data Science Project title=${PRJ_2_USER3} description=${EMPTY} - Open Data Science Projects Home Page - Project Should Be Listed project_title=${PRJ_2_USER3} - Project's Owner Should Be expected_username=${TEST_USER_3.USERNAME} project_title=${PRJ_2_USER3} - Launch Data Science Project Main Page username=${TEST_USER_4.USERNAME} password=${TEST_USER_4.PASSWORD} - Create Data Science Project title=${PRJ_A_USER4} description=${EMPTY} - Open Data Science Projects Home Page - Number Of Displayed Projects Should Be expected_number=1 - Project Should Be Listed project_title=${PRJ_A_USER4} - Project's Owner Should Be expected_username=${TEST_USER_4.USERNAME} project_title=${PRJ_A_USER4} - Project Should Not Be Listed project_title=${PRJ_1_USER3} - Project Should Not Be Listed project_title=${PRJ_2_USER3} - Switch Browser 1 - Open Data Science Projects Home Page - Number Of Displayed Projects Should Be expected_number=2 - Project Should Not Be Listed project_title=${PRJ_A_USER4} - Project Should Be Listed project_title=${PRJ_1_USER3} - Project Should Be Listed project_title=${PRJ_2_USER3} - Launch Data Science Project Main Page username=${TEST_USER.USERNAME} password=${TEST_USER.PASSWORD} - Capture Page Screenshot - Number Of Displayed Projects Should Be expected_number=3 - Project Should Be Listed project_title=${PRJ_1_USER3} - Project Should Be Listed project_title=${PRJ_2_USER3} - Project Should Be Listed project_title=${PRJ_A_USER4} - Launch Data Science Project Main Page username=${OCP_ADMIN_USER.USERNAME} password=${OCP_ADMIN_USER.PASSWORD} - ... ocp_user_auth_type=${OCP_ADMIN_USER.AUTH_TYPE} - Capture Page Screenshot - Number Of Displayed Projects Should Be expected_number=3 - Project Should Be Listed project_title=${PRJ_1_USER3} - Project Should Be Listed project_title=${PRJ_2_USER3} - Project Should Be Listed project_title=${PRJ_A_USER4} - Verify User Can Create A Data Science Project [Tags] Smoke Sanity ODS-1775 [Documentation] Verifies users can create a DS project - [Setup] Launch Data Science Project Main Page - Open Data Science Projects Home Page - Create Data Science Project title=${PRJ_TITLE} description=${PRJ_DESCRIPTION} - ... resource_name=${PRJ_RESOURCE_NAME} Open Data Science Projects Home Page + # Create Data Science Project title=${PRJ_TITLE} description=${PRJ_DESCRIPTION} + # ... resource_name=${PRJ_RESOURCE_NAME} + # Open Data Science Projects Home Page + Log message=DS Project creation covered by the Suite Setup Project Should Be Listed project_title=${PRJ_TITLE} Project's Owner Should Be expected_username=${TEST_USER_3.USERNAME} project_title=${PRJ_TITLE} ${ns_name}= Check Corresponding Namespace Exists project_title=${PRJ_TITLE} -Verify User Can Edit A Data Science Project - [Tags] Sanity Tier1 ODS-2112 - [Documentation] Verifies users can edit a DS project - [Setup] Launch Data Science Project Main Page - [Teardown] Delete Data Science Project project_title=${NEW_PRJ_TITLE} - Open Data Science Projects Home Page - Create Data Science Project title=${PRJ_TITLE1} description=${PRJ_DESCRIPTION} - ... resource_name=${NONE} - ${ns_name}= Get Openshift Namespace From Data Science Project project_title=${PRJ_TITLE1} - Open Data Science Projects Home Page - Project Should Be Listed project_title=${PRJ_TITLE1} - Run Keyword And Continue On Failure Check Resource Name Should Be Immutable project_title=${PRJ_TITLE1} - Run Keyword And Continue On Failure Check Name And Description Should Be Editable - ... project_title=${PRJ_TITLE1} new_title=${NEW_PRJ_TITLE} new_description=${NEW_PRJ_DESCRIPTION} - ${ns_newname}= Get Openshift Namespace From Data Science Project project_title=${NEW_PRJ_TITLE} - Should Be Equal As Strings ${ns_name} ${ns_newname} - - -Verify User Can Create And Start A Workbench With Ephemeral Storage - [Tags] ODS-1812 - [Documentation] Verifies users can create workbench using Ephemeral storage - ${version_check}= Is RHODS Version Greater Or Equal Than 1.20.0 - IF ${version_check}==True - Skip msg=Skipping because ODS-1812 is not applicable to version >= 1.20.0 - END - ${ns_name}= Get Openshift Namespace From Data Science Project project_title=${PRJ_TITLE} - Open Data Science Project Details Page project_title=${PRJ_TITLE} - Create Workbench workbench_title=${EMPTY} workbench_description=${EMPTY} prj_title=${PRJ_TITLE} - ... image_name=${NB_IMAGE} deployment_size=Small storage=Ephemeral pv_existent=${NONE} - ... pv_name=${NONE} pv_description=${NONE} pv_size=${NONE} press_cancel=${TRUE} - Create Workbench workbench_title=${WORKBENCH_TITLE} workbench_description=${WORKBENCH_DESCRIPTION} - ... prj_title=${PRJ_TITLE} image_name=${NB_IMAGE} deployment_size=Small - ... storage=Ephemeral pv_existent=${NONE} - ... pv_name=${NONE} pv_description=${NONE} pv_size=${NONE} - Workbench Should Be Listed workbench_title=${WORKBENCH_TITLE} - Workbench Status Should Be workbench_title=${WORKBENCH_TITLE} status=${WORKBENCH_STATUS_STARTING} - Run Keyword And Continue On Failure Wait Until Workbench Is Started workbench_title=${WORKBENCH_TITLE} - Check Corresponding Notebook CR Exists workbench_title=${WORKBENCH_TITLE} namespace=${ns_name} - Verify User Can Create And Start A Workbench With Existent PV Storage [Tags] Smoke Sanity ODS-1814 [Documentation] Verifies users can create a workbench and connect an existent PersistenVolume @@ -230,14 +131,19 @@ Verify User Can Create And Start A Workbench With Existent PV Storage Run Keyword And Continue On Failure Wait Until Workbench Is Started workbench_title=${WORKBENCH_2_TITLE} ${ns_name}= Get Openshift Namespace From Data Science Project project_title=${PRJ_TITLE} Check Corresponding Notebook CR Exists workbench_title=${WORKBENCH_2_TITLE} namespace=${ns_name} + [Teardown] Clean Project From Workbench Resources workbench_title=${WORKBENCH_2_TITLE} + ... project_title=${PRJ_TITLE} pvc_title=${pv_name} Verify User Can Create A PV Storage [Tags] Sanity Tier1 ODS-1819 + ... AutomationBug [Documentation] Verifies users can Create PersistentVolume Storage + ... THIS MUST BE UPDATED TO CHECK WORKBENCH GETS RESTARTED LIKE FOR ODS-1825. + ... MAIN GOAL OF THE TEST CASE IS COVERED BY ODS-1814 ${pv_name}= Set Variable ${PV_BASENAME}-A ${ns_name}= Get Openshift Namespace From Data Science Project project_title=${PRJ_TITLE} Open Data Science Project Details Page project_title=${PRJ_TITLE} - ${workbenches}= Create Dictionary ${WORKBENCH_2_TITLE}=mount-data + ${workbenches}= Create Dictionary ${WORKBENCH_TITLE}=mount-data Create PersistentVolume Storage name=${pv_name} description=${PV_DESCRIPTION} ... size=${PV_SIZE} connected_workbench=${NONE} press_cancel=${TRUE} ... project_title=${PRJ_TITLE} @@ -259,43 +165,43 @@ Verify User Can Create And Start A Workbench Adding A New PV Storage ... storage=Persistent pv_existent=${FALSE} ... pv_name=${pv_name} pv_description=${PV_DESCRIPTION} pv_size=${PV_SIZE} Workbench Should Be Listed workbench_title=${WORKBENCH_3_TITLE} - Reload Page - Wait Until Project Is Open project_title=${PRJ_TITLE} + #SeleniumLibrary.Reload Page + #Wait Until Project Is Open project_title=${PRJ_TITLE} Workbench Status Should Be workbench_title=${WORKBENCH_3_TITLE} status=${WORKBENCH_STATUS_STARTING} Run Keyword And Continue On Failure Wait Until Workbench Is Started workbench_title=${WORKBENCH_3_TITLE} Check Corresponding Notebook CR Exists workbench_title=${WORKBENCH_3_TITLE} namespace=${ns_name} - Reload Page - Wait Until Project Is Open project_title=${PRJ_TITLE} + #SeleniumLibrary.Reload Page + #Wait Until Project Is Open project_title=${PRJ_TITLE} ${connected_woksps}= Create List ${WORKBENCH_3_TITLE} Storage Should Be Listed name=${pv_name} description=${PV_DESCRIPTION} ... type=Persistent storage connected_workbench=${connected_woksps} Storage Size Should Be name=${pv_name} namespace=${ns_name} size=${PV_SIZE} - -Verify User Can Stop A Workbench - [Tags] Smoke Sanity ODS-1817 - [Documentation] Verifies users can stop a running workbench from project details page - Open Data Science Project Details Page project_title=${PRJ_TITLE} - Stop Workbench workbench_title=${WORKBENCH_3_TITLE} press_cancel=${TRUE} - Stop Workbench workbench_title=${WORKBENCH_3_TITLE} - # add checks on notebook pod is terminated but CR is present - -Verify User Can Launch A Workbench - [Tags] Smoke Sanity ODS-1815 - [Documentation] Verifies users can launch/open a running workbench from project details page - Open Data Science Projects Home Page - ${ns_name}= Get Openshift Namespace From Data Science Project project_title=${PRJ_TITLE} - Open Data Science Project Details Page project_title=${PRJ_TITLE} - Start Workbench workbench_title=${WORKBENCH_2_TITLE} - Launch And Access Workbench workbench_title=${WORKBENCH_2_TITLE} - ... username=${TEST_USER_3.USERNAME} password=${TEST_USER_3.PASSWORD} - ... auth_type=${TEST_USER_3.AUTH_TYPE} - Check Launched Workbench Is The Correct One workbench_title=${WORKBENCH_2_TITLE} - ... image=${NB_IMAGE} namespace=${ns_name} + [Teardown] Clean Project From Workbench Resources workbench_title=${WORKBENCH_3_TITLE} + ... project_title=${PRJ_TITLE} pvc_title=${pv_name} Verify User Can Create A S3 Data Connection And Connect It To Workbenches [Tags] Sanity Tier1 ... ODS-1825 ODS-1972 [Documentation] Verifies users can add a Data connection to AWS S3 + [Setup] Run Keywords Open Data Science Project Details Page project_title=${PRJ_TITLE} + ... AND + ... Create Workbench workbench_title=${WORKBENCH_TITLE} workbench_description=${WORKBENCH_DESCRIPTION} + ... prj_title=${PRJ_TITLE} image_name=${NB_IMAGE} deployment_size=Small + ... storage=Persistent pv_existent=${NONE} + ... pv_name=${NONE} pv_description=${NONE} pv_size=${NONE} + ... AND + ... Create Workbench workbench_title=${WORKBENCH_2_TITLE} workbench_description=${WORKBENCH_2_DESCRIPTION} + ... prj_title=${PRJ_TITLE} image_name=${NB_IMAGE} deployment_size=Small + ... storage=Persistent pv_existent=${NONE} + ... pv_name=${NONE} pv_description=${NONE} pv_size=${NONE} + ... AND + ... Workbench Should Be Listed workbench_title=${WORKBENCH_TITLE} + ... AND + ... Workbench Should Be Listed workbench_title=${WORKBENCH_2_TITLE} + ... AND + ... Stop Workbench workbench_title=${WORKBENCH_2_TITLE} from_running=${FALSE} + ... AND + ... Wait Until Workbench Is Started workbench_title=${WORKBENCH_TITLE} ${ns_name}= Get Openshift Namespace From Data Science Project project_title=${PRJ_TITLE} Open Data Science Project Details Page project_title=${PRJ_TITLE} Create S3 Data Connection project_title=${PRJ_TITLE} dc_name=${DC_S3_NAME} @@ -304,52 +210,21 @@ Verify User Can Create A S3 Data Connection And Connect It To Workbenches ... aws_s3_endpoint=${DC_S3_ENDPOINT} aws_region=${DC_S3_REGION} Data Connection Should Be Listed name=${DC_S3_NAME} type=${DC_S3_TYPE} connected_workbench=${NONE} Check Corresponding Data Connection Secret Exists dc_name=${DC_S3_NAME} namespace=${ns_name} - ${workbenches}= Create List ${WORKBENCH_2_TITLE} ${WORKBENCH_3_TITLE} + ${workbenches}= Create List ${WORKBENCH_TITLE} ${WORKBENCH_2_TITLE} Create S3 Data Connection project_title=${PRJ_TITLE} dc_name=${DC_2_S3_NAME} ... aws_access_key=${DC_S3_AWS_SECRET_ACCESS_KEY} ... aws_secret_access=${DC_S3_AWS_SECRET_ACCESS_KEY} ... aws_s3_endpoint=${DC_S3_ENDPOINT} aws_region=${DC_S3_REGION} ... connected_workbench=${workbenches} Data Connection Should Be Listed name=${DC_2_S3_NAME} type=${DC_S3_TYPE} connected_workbench=${workbenches} - Run Keyword And Continue On Failure Wait Until Workbench Is Started workbench_title=${WORKBENCH_2_TITLE} - Workbench Status Should Be workbench_title=${WORKBENCH_3_TITLE} status=${WORKBENCH_STATUS_STOPPED} - -Verify User Can Stop A Workbench From Projects Home Page - [Tags] Sanity Tier1 ODS-1823 - [Documentation] Verifies users can stop a running workbench from Data Science Projects home page - Open Data Science Projects Home Page - ${ns_name}= Get Openshift Namespace From Data Science Project project_title=${PRJ_TITLE} - ${_} ${workbench_cr_name}= Get Openshift Notebook CR From Workbench workbench_title=${WORKBENCH_2_TITLE} - ... namespace=${ns_name} - Stop Workbench From Projects Home Page workbench_title=${WORKBENCH_2_TITLE} project_title=${PRJ_TITLE} - ... workbench_cr_name=${workbench_cr_name} namespace=${ns_name} - Workbench Launch Link Should Be Disabled workbench_title=${WORKBENCH_2_TITLE} project_title=${PRJ_TITLE} - # add checks on notebook pod is terminated but CR is present - -Verify User Can Start And Launch A Workbench From Projects Home Page - [Tags] Sanity Tier1 ODS-1818 - [Documentation] Verifies users can launch/open a running workbench from Data Science Projects home page - Open Data Science Projects Home Page - ${ns_name}= Get Openshift Namespace From Data Science Project project_title=${PRJ_TITLE} - ${_} ${workbench_cr_name}= Get Openshift Notebook CR From Workbench workbench_title=${WORKBENCH_2_TITLE} - ... namespace=${ns_name} - Start Workbench From Projects Home Page workbench_title=${WORKBENCH_2_TITLE} project_title=${PRJ_TITLE} - ... workbench_cr_name=${workbench_cr_name} namespace=${ns_name} - Launch And Access Workbench From Projects Home Page workbench_title=${WORKBENCH_2_TITLE} - ... project_title=${PRJ_TITLE} username=${TEST_USER_3.USERNAME} - ... password=${TEST_USER_3.PASSWORD} auth_type=${TEST_USER_3.AUTH_TYPE} - Check Launched Workbench Is The Correct One workbench_title=${WORKBENCH_2_TITLE} - ... image=${NB_IMAGE} namespace=${ns_name} - -Verify User Can Delete A Workbench - [Tags] Smoke Sanity ODS-1813 - [Documentation] Verifies users can delete a workbench - ${ns_name}= Get Openshift Namespace From Data Science Project project_title=${PRJ_TITLE} - Open Data Science Project Details Page project_title=${PRJ_TITLE} - Delete Workbench workbench_title=${WORKBENCH_2_TITLE} press_cancel=${TRUE} - Delete Workbench workbench_title=${WORKBENCH_2_TITLE} - Workbench Should Not Be Listed workbench_title=${WORKBENCH_2_TITLE} - Check Workbench CR Is Deleted workbench_title=${WORKBENCH_2_TITLE} namespace=${ns_name} + Run Keyword And Continue On Failure Workbench Status Should Be workbench_title=${WORKBENCH_TITLE} + ... status=${WORKBENCH_STATUS_STARTING} + Run Keyword And Continue On Failure Wait Until Workbench Is Started workbench_title=${WORKBENCH_TITLE} + Workbench Status Should Be workbench_title=${WORKBENCH_2_TITLE} status=${WORKBENCH_STATUS_STOPPED} + [Teardown] Run Keywords + ... Clean Project From Workbench Resources workbench_title=${WORKBENCH_2_TITLE} project_title=${PRJ_TITLE} + ... AND + ... Clean Project From Workbench Resources workbench_title=${WORKBENCH_TITLE} project_title=${PRJ_TITLE} Verify User Can Delete A Persistent Storage [Tags] Sanity Tier1 ODS-1824 @@ -369,10 +244,14 @@ Verify User Can Delete A Data Connection [Documentation] Verifies users can delete a Data connection ${ns_name}= Get Openshift Namespace From Data Science Project project_title=${PRJ_TITLE} Open Data Science Project Details Page project_title=${PRJ_TITLE} - Delete Data Connection name=${DC_S3_NAME} press_cancel=${True} - Delete Data Connection name=${DC_S3_NAME} - Data Connection Should Not Be Listed name=${DC_S3_NAME} - Check Data Connection Secret Is Deleted dc_name=${DC_S3_NAME} namespace=${ns_name} + Create S3 Data Connection project_title=${PRJ_TITLE} dc_name=${DC_3_S3_NAME} + ... aws_access_key=dummy-key + ... aws_secret_access=dummy-secret + ... aws_s3_endpoint=${DC_S3_ENDPOINT} aws_region=${DC_S3_REGION} + Delete Data Connection name=${DC_3_S3_NAME} press_cancel=${True} + Delete Data Connection name=${DC_3_S3_NAME} + Data Connection Should Not Be Listed name=${DC_3_S3_NAME} + Check Data Connection Secret Is Deleted dc_name=${DC_3_S3_NAME} namespace=${ns_name} Verify User Can Create A Workbench With Environment Variables [Tags] Sanity Tier1 ODS-1864 @@ -394,6 +273,7 @@ Verify User Can Create A Workbench With Environment Variables ... username=${TEST_USER_3.USERNAME} password=${TEST_USER_3.PASSWORD} ... auth_type=${TEST_USER_3.AUTH_TYPE} Environment Variables Should Be Available In Jupyter exp_env_variables=${envs_list} + [Teardown] Clean Project From Workbench Resources workbench_title=${WORKBENCH_4_TITLE} project_title=${PRJ_TITLE} Verify User Can Create Environment Variables By Uploading YAML Secret/ConfigMap [Tags] Tier1 Sanity @@ -407,7 +287,7 @@ Verify User Can Create Environment Variables By Uploading YAML Secret/ConfigMap ... k8s_type=Config Map input_type=${UPLOAD_TYPE} ${envs_list}= Create List ${envs_var_secret} ${envs_var_cm} Open Data Science Project Details Page project_title=${PRJ_TITLE} - Delete Workbench workbench_title=${WORKBENCH_4_TITLE} + # Delete Workbench workbench_title=${WORKBENCH_4_TITLE} Create Workbench workbench_title=${WORKBENCH_4_TITLE} workbench_description=${WORKBENCH_DESCRIPTION} ... prj_title=${PRJ_TITLE} image_name=${NB_IMAGE} deployment_size=Small ... storage=Persistent pv_name=${WORKBENCH_4_TITLE}-PV pv_existent=${FALSE} @@ -426,6 +306,8 @@ Verify User Can Create Environment Variables By Uploading YAML Secret/ConfigMap ... username=${TEST_USER_3.USERNAME} password=${TEST_USER_3.PASSWORD} ... auth_type=${TEST_USER_3.AUTH_TYPE} Environment Variables Should Be Available In Jupyter exp_env_variables=${test_envs_list} + [Teardown] Clean Project From Workbench Resources workbench_title=${WORKBENCH_4_TITLE} project_title=${PRJ_TITLE} + ... pvc_title=${WORKBENCH_4_TITLE}-PV Verify User Can Log Out And Return To Project From Jupyter Notebook # robocop: disable [Tags] Sanity Tier1 ODS-1971 AutomationBug @@ -434,33 +316,42 @@ Verify User Can Log Out And Return To Project From Jupyter Notebook # robocop ... 1. click "File" > "Log Out" to actually close the login session ... 2. click "File" > "Hub Control Panel" to return to project details page ... AutomationBug: JupyterLibrary's log out keyword seems to be broken - Open Data Science Project Details Page project_title=${PRJ_TITLE} - Open Workbench workbench_title=${WORKBENCH_4_TITLE} + [Setup] Run Keywords + ... Open Data Science Project Details Page project_title=${PRJ_TITLE} + ... AND + ... Create Workbench workbench_title=${WORKBENCH_TITLE} workbench_description=${WORKBENCH_DESCRIPTION} + ... prj_title=${PRJ_TITLE} image_name=${NB_IMAGE} deployment_size=Small + ... storage=Persistent pv_name=${NONE} pv_existent=${NONE} + ... pv_description=${NONE} pv_size=${NONE} + ... press_cancel=${FALSE} envs=${NONE} + ... AND + ... Wait Until Workbench Is Started workbench_title=${WORKBENCH_TITLE} + Open Workbench workbench_title=${WORKBENCH_TITLE} Run Keyword And Continue On Failure ... Log In Should Be Requested Access To Workbench username=${TEST_USER_3.USERNAME} password=${TEST_USER_3.PASSWORD} ... auth_type=${TEST_USER_3.AUTH_TYPE} Open JupyterLab Control Panel Wait Until Project Is Open project_title=${PRJ_TITLE} - Workbench Status Should Be workbench_title=${WORKBENCH_4_TITLE} + Workbench Status Should Be workbench_title=${WORKBENCH_TITLE} ... status=${WORKBENCH_STATUS_RUNNING} - Open Workbench workbench_title=${WORKBENCH_4_TITLE} + Open Workbench workbench_title=${WORKBENCH_TITLE} Run Keyword And Continue On Failure ... Log In Should Not Be Requested Wait Until JupyterLab Is Loaded Logout JupyterLab Wait Until Project Is Open project_title=${PRJ_TITLE} - Workbench Status Should Be workbench_title=${WORKBENCH_4_TITLE} + Workbench Status Should Be workbench_title=${WORKBENCH_TITLE} ... status=${WORKBENCH_STATUS_RUNNING} - Open Workbench workbench_title=${WORKBENCH_4_TITLE} + Open Workbench workbench_title=${WORKBENCH_TITLE} Run Keyword And Continue On Failure ... Log In Should Be Requested + [Teardown] Stop Workbench workbench_title=${WORKBENCH_TITLE} Verify Event Log Is Accessible While Starting A Workbench [Tags] Tier1 Sanity ... ODS-1970 [Documentation] Verify user can access event log while starting a workbench - [Teardown] Delete Workbench workbench_title=${WORKBENCH_6_TITLE} Open Data Science Project Details Page project_title=${PRJ_TITLE} Create Workbench workbench_title=${WORKBENCH_6_TITLE} workbench_description=${WORKBENCH_6_DESCRIPTION} ... prj_title=${PRJ_TITLE} image_name=${NB_IMAGE} deployment_size=Small @@ -478,6 +369,8 @@ Verify Event Log Is Accessible While Starting A Workbench ... expected_result_text=Success Close Event Log Wait Until Project Is Open project_title=${PRJ_TITLE} + [Teardown] Clean Project From Workbench Resources workbench_title=${WORKBENCH_6_TITLE} + ... project_title=${PRJ_TITLE} Verify Error Is Reported When Workbench Fails To Start # robocop: disable [Tags] Tier1 Sanity @@ -503,36 +396,135 @@ Verify Error Is Reported When Workbench Fails To Start # robocop: disable Close Event Log Wait Until Project Is Open project_title=${PRJ_TITLE} +Verify Users Can Start, Stop, Launch And Delete A Workbench + [Tags] Smoke Sanity Tier1 + ... ODS-1813 ODS-1815 ODS-1817 + [Documentation] Verifies users can start, stop, launch and delete a running workbench from project details page + [Setup] Run Keywords + ... Launch Data Science Project Main Page + ... AND + ... Open Data Science Project Details Page project_title=${PRJ_TITLE} + ... AND + ... Create Workbench workbench_title=${WORKBENCH_TITLE} workbench_description=${WORKBENCH_DESCRIPTION} + ... prj_title=${PRJ_TITLE} image_name=${NB_IMAGE} deployment_size=Small + ... storage=Persistent pv_name=${NONE} pv_existent=${NONE} + ... pv_description=${NONE} pv_size=${NONE} + ... press_cancel=${FALSE} envs=${NONE} + ... AND + ... Wait Until Workbench Is Started workbench_title=${WORKBENCH_TITLE} + Stop Workbench workbench_title=${WORKBENCH_TITLE} press_cancel=${TRUE} + Stop Workbench workbench_title=${WORKBENCH_TITLE} + Wait Until Workbench Is Stopped workbench_title=${WORKBENCH_TITLE} + Start Workbench workbench_title=${WORKBENCH_TITLE} + Wait Until Workbench Is Started workbench_title=${WORKBENCH_TITLE} + Launch And Access Workbench workbench_title=${WORKBENCH_TITLE} + ... username=${TEST_USER_3.USERNAME} password=${TEST_USER_3.PASSWORD} + ... auth_type=${TEST_USER_3.AUTH_TYPE} + Check Launched Workbench Is The Correct One workbench_title=${WORKBENCH_TITLE} + ... image=${NB_IMAGE} project_title=${PRJ_TITLE} + SeleniumLibrary.Switch Window title=Red Hat OpenShift Data Science + Wait Until Project Is Open project_title=${PRJ_TITLE} + Delete Workbench workbench_title=${WORKBENCH_TITLE} + Workbench Should Not Be Listed workbench_title=${WORKBENCH_TITLE} + Check Workbench CR Is Deleted workbench_title=${WORKBENCH_TITLE} project_title=${PRJ_TITLE} + # PV storage should not get deleted + [Teardown] Run Keywords + ... Clean Project From Workbench Resources workbench_title=${WORKBENCH_TITLE} project_title=${PRJ_TITLE} + ... AND + ... SeleniumLibrary.Close Browser + +Verify Users Can Start, Stop And Launch A Workbench From DS Projects Home Page + [Tags] Smoke Sanity Tier1 + ... ODS-1818 ODS-1823 + [Documentation] Verifies users can start, stop, launch and delete a running workbench from project details page + [Setup] Run Keywords + ... Launch Data Science Project Main Page + ... AND + ... Open Data Science Project Details Page project_title=${PRJ_TITLE} + ... AND + ... Create Workbench workbench_title=${WORKBENCH_TITLE} workbench_description=${WORKBENCH_DESCRIPTION} + ... prj_title=${PRJ_TITLE} image_name=${NB_IMAGE} deployment_size=Small + ... storage=Persistent pv_name=${NONE} pv_existent=${NONE} + ... pv_description=${NONE} pv_size=${NONE} + ... press_cancel=${FALSE} envs=${NONE} + ... AND + ... Wait Until Workbench Is Started workbench_title=${WORKBENCH_TITLE} + # ${ns_name}= Get Openshift Namespace From Data Science Project project_title=${PRJ_TITLE} + # ${_} ${workbench_cr_name}= Get Openshift Notebook CR From Workbench workbench_title=${WORKBENCH_TITLE} + # ... namespace=${ns_name} + Open Data Science Projects Home Page + Wait Until Project Is Listed project_title=${PRJ_TITLE} + Stop Workbench From Projects Home Page workbench_title=${WORKBENCH_TITLE} project_title=${PRJ_TITLE} + # ... workbench_cr_name=${workbench_cr_name} namespace=${ns_name} + Workbench Launch Link Should Be Disabled workbench_title=${WORKBENCH_TITLE} project_title=${PRJ_TITLE} + Start Workbench From Projects Home Page workbench_title=${WORKBENCH_TITLE} project_title=${PRJ_TITLE} + # ... workbench_cr_name=${workbench_cr_name} namespace=${ns_name} + Launch And Access Workbench From Projects Home Page workbench_title=${WORKBENCH_TITLE} + ... project_title=${PRJ_TITLE} username=${TEST_USER_3.USERNAME} + ... password=${TEST_USER_3.PASSWORD} auth_type=${TEST_USER_3.AUTH_TYPE} + Check Launched Workbench Is The Correct One workbench_title=${WORKBENCH_TITLE} + ... image=${NB_IMAGE} project_title=${PRJ_TITLE} + [Teardown] Run Keywords + ... Clean Project From Workbench Resources workbench_title=${WORKBENCH_TITLE} project_title=${PRJ_TITLE} + ... AND + ... SeleniumLibrary.Close Browser + Verify User Can Delete A Data Science Project - [Tags] Smoke Sanity ODS-1784 + [Tags] Smoke Sanity Tier1 + ... ODS-1784 [Documentation] Verifies users can delete a Data Science project + Open Data Science Projects Home Page + Wait Until Project Is Listed project_title=${PRJ_TITLE} Delete Data Science Project project_title=${PRJ_TITLE} # check workbenches and resources get deleted too -Verify User Can Edit A S3 Data Connection - [Tags] Sanity Tier1 ODS-1932 - [Documentation] Verifies users can add a Data connection to AWS S3 +Verify User Can Access Only Its Owned Projects + [Tags] Sanity Tier1 ODS-1868 + [Documentation] Verifies each user can access only thei owned projects. Except for + ... cluster and dedicated admins which should be able to fetch all the DS Projects + [Setup] Run Keywords + ... Set Variables For User Access Test + ... AND + ... Delete Data Science Project From CLI displayed_name=${PRJ_TITLE} + Launch Data Science Project Main Page username=${TEST_USER_3.USERNAME} password=${TEST_USER_3.PASSWORD} Open Data Science Projects Home Page - Create Data Science Project title=${PRJ_TITLE} description=${PRJ_DESCRIPTION} - ... resource_name=${PRJ_RESOURCE_NAME} + Create Data Science Project title=${PRJ_1_USER3} description=${EMPTY} Open Data Science Projects Home Page - Project Should Be Listed project_title=${PRJ_TITLE} - Open Data Science Project Details Page project_title=${PRJ_TITLE} - Create S3 Data Connection project_title=${PRJ_TITLE} dc_name=${DC_S3_NAME} - ... aws_access_key=${DC_S3_AWS_SECRET_ACCESS_KEY} - ... aws_secret_access=${DC_S3_AWS_SECRET_ACCESS_KEY} - ... aws_s3_endpoint=${DC_S3_ENDPOINT} aws_region=${DC_S3_REGION} - Edit S3 Data Connection project_title=${PRJ_TITLE} dc_name=${DC_S3_NAME} - ... aws_access_key=${S3.AWS_ACCESS_KEY_ID}-test aws_secret_access=${S3.AWS_SECRET_ACCESS_KEY}-test - ... aws_bucket_name=ods-ci-ds-pipelines-test aws_region=${DC_S3_REGION} - ... aws_s3_endpoint=${DC_S3_ENDPOINT} - ${s3_name} ${s3_key} ${s3_secret} ${s3_endpoint} ${s3_region} ${s3_bucket} Get Data Connection Form Values ${DC_S3_NAME} - Should Be Equal ${s3_name} ${DC_S3_NAME} - Should Be Equal ${s3_key} ${S3.AWS_ACCESS_KEY_ID}-test - Should Be Equal ${s3_secret} ${S3.AWS_SECRET_ACCESS_KEY}-test - Should Be Equal ${s3_endpoint} ${DC_S3_ENDPOINT} - Should Be Equal ${s3_region} ${DC_S3_REGION} - Should Be Equal ${s3_bucket} ods-ci-ds-pipelines-test + Project Should Be Listed project_title=${PRJ_1_USER3} + Project's Owner Should Be expected_username=${TEST_USER_3.USERNAME} project_title=${PRJ_1_USER3} + Open Data Science Projects Home Page + Create Data Science Project title=${PRJ_2_USER3} description=${EMPTY} + Open Data Science Projects Home Page + Project Should Be Listed project_title=${PRJ_2_USER3} + Project's Owner Should Be expected_username=${TEST_USER_3.USERNAME} project_title=${PRJ_2_USER3} + Launch Data Science Project Main Page username=${TEST_USER_4.USERNAME} password=${TEST_USER_4.PASSWORD} + Create Data Science Project title=${PRJ_A_USER4} description=${EMPTY} + Open Data Science Projects Home Page + Number Of Displayed Projects Should Be expected_number=1 + Project Should Be Listed project_title=${PRJ_A_USER4} + Project's Owner Should Be expected_username=${TEST_USER_4.USERNAME} project_title=${PRJ_A_USER4} + Project Should Not Be Listed project_title=${PRJ_1_USER3} + Project Should Not Be Listed project_title=${PRJ_2_USER3} + Switch Browser 1 + Open Data Science Projects Home Page + Number Of Displayed Projects Should Be expected_number=2 + Project Should Not Be Listed project_title=${PRJ_A_USER4} + Project Should Be Listed project_title=${PRJ_1_USER3} + Project Should Be Listed project_title=${PRJ_2_USER3} + Launch Data Science Project Main Page username=${TEST_USER.USERNAME} password=${TEST_USER.PASSWORD} + Capture Page Screenshot + Number Of Displayed Projects Should Be expected_number=3 + Project Should Be Listed project_title=${PRJ_1_USER3} + Project Should Be Listed project_title=${PRJ_2_USER3} + Project Should Be Listed project_title=${PRJ_A_USER4} + Launch Data Science Project Main Page username=${OCP_ADMIN_USER.USERNAME} password=${OCP_ADMIN_USER.PASSWORD} + ... ocp_user_auth_type=${OCP_ADMIN_USER.AUTH_TYPE} + Capture Page Screenshot + Number Of Displayed Projects Should Be expected_number=3 + Project Should Be Listed project_title=${PRJ_1_USER3} + Project Should Be Listed project_title=${PRJ_2_USER3} + Project Should Be Listed project_title=${PRJ_A_USER4} + *** Keywords *** Project Suite Setup @@ -542,11 +534,14 @@ Project Suite Setup ${to_delete}= Create List ${PRJ_TITLE} Set Suite Variable ${PROJECTS_TO_DELETE} ${to_delete} RHOSi Setup + Launch Data Science Project Main Page + Create Data Science Project title=${PRJ_TITLE} description=${PRJ_DESCRIPTION} + ... resource_name=${PRJ_RESOURCE_NAME} Project Suite Teardown [Documentation] Suite teardown steps after testing DS Projects. It Deletes ... all the DS projects created by the tests and run RHOSi teardown - Close All Browsers + SeleniumLibrary.Close All Browsers # Delete All Data Science Projects From CLI Delete Data Science Projects From CLI ocp_projects=${PROJECTS_TO_DELETE} RHOSi Teardown @@ -590,7 +585,8 @@ Check Corresponding Notebook CR Exists Check Workbench CR Is Deleted [Documentation] Checks if when a workbench is deleted its Notebook CustomResource gets deleted too - [Arguments] ${workbench_title} ${namespace} ${timeout}=10s + [Arguments] ${workbench_title} ${project_title} ${timeout}=10s + ${namespace}= Get Openshift Namespace From Data Science Project project_title=${project_title} ${status}= Run Keyword And Return Status Check Corresponding Notebook CR Exists ... workbench_title=${workbench_title} namespace=${namespace} IF ${status} == ${TRUE} @@ -693,28 +689,3 @@ Environment Variable Key/Value Fields Should Be Correctly Displayed ELSE Run Keyword And Continue On Failure Element Attribute Value Should Be ${displayed_value_xp} type text END - -Create Multiple Data Science Projects - [Documentation] Create a given number of data science projects based on title and description - [Arguments] ${title} ${description} ${number} - ${all_projects}= Create List - FOR ${counter} IN RANGE 1 ${number}+1 1 - Create Data Science Project title=${title}${counter} description=${EMPTY} - Open Data Science Projects Home Page - Append To List ${all_projects} ${title}${counter} - END - RETURN ${all_projects} - -Delete Multiple Data Science Projects - [Arguments] ${title} ${number} - FOR ${counter} IN RANGE 1 ${number}+1 1 - ${rc} ${output}= Run And Return Rc And Output oc delete project ${title}${counter} - END - -Check Name And Description Should Be Editable - [Documentation] Checks and verifies if the DSG Name and Description is editable - [Arguments] ${project_title} ${new_title} ${new_description} - Update Data Science Project Name ${project_title} ${new_title} - Update Data Science Project Description ${new_title} ${new_description} - Open Data Science Project Details Page project_title=${new_title} - Page Should Contain ${new_description} diff --git a/ods_ci/tests/Tests/400__ods_dashboard/415__ods_dashboard_projects/415__ods_dashboard_projects_additional.robot b/ods_ci/tests/Tests/400__ods_dashboard/415__ods_dashboard_projects/415__ods_dashboard_projects_additional.robot index c6d43486c..0da57db3a 100644 --- a/ods_ci/tests/Tests/400__ods_dashboard/415__ods_dashboard_projects/415__ods_dashboard_projects_additional.robot +++ b/ods_ci/tests/Tests/400__ods_dashboard/415__ods_dashboard_projects/415__ods_dashboard_projects_additional.robot @@ -101,7 +101,7 @@ Verify User Can Add GPUs To Workbench Launch And Access Workbench workbench_title=${WORKBENCH_TITLE_GPU} Open New Notebook In Jupyterlab Menu Verify Pytorch Can See GPU - [Teardown] Clean Project workbench_title=${WORKBENCH_TITLE_GPU} + [Teardown] Clean Project And Sleep workbench_title=${WORKBENCH_TITLE_GPU} ... pvc_title=${PV_NAME_GPU} project_title=${PRJ_TITLE} Verify User Can Remove GPUs From Workbench @@ -130,9 +130,32 @@ Verify User Can Remove GPUs From Workbench Launch And Access Workbench workbench_title=${WORKBENCH_TITLE_GPU} Open New Notebook In Jupyterlab Menu Run Keyword And Expect Error 'Using cpu device' does not match 'Using cuda device' Verify Pytorch Can See GPU - [Teardown] Clean Project workbench_title=${WORKBENCH_TITLE_GPU} + [Teardown] Clean Project And Sleep workbench_title=${WORKBENCH_TITLE_GPU} ... pvc_title=${PV_NAME_GPU} project_title=${PRJ_TITLE} +Verify DS Projects Home Page Shows The Right Number Of Items The User Has Selected + [Documentation] Verifies that correct number of data science projects appear when + ... multiple data science projects are added + [Tags] ODS-2015 Sanity Tier1 + [Setup] Launch Data Science Project Main Page username=${TEST_USER_4.USERNAME} + ${all_projects}= Create Multiple Data Science Projects title=ds-project-ldap-user description=numbered project - + ... number=20 + Number Of Displayed Projects Should Be expected_number=10 + ${curr_page_projects}= Get All Displayed Projects + ${remaining_projects}= Remove Current Page Projects From All Projects + ... ${all_projects} ${curr_page_projects} + Check Pagination Is Correct On The Current Page page=1 total=20 + Go To Next Page Of Data Science Projects + Number Of Displayed Projects Should Be expected_number=10 + ${curr_page_projects}= Get All Displayed Projects + ${remaining_projects}= Remove Current Page Projects From All Projects + ... ${all_projects} ${curr_page_projects} + Check Pagination Is Correct On The Current Page page=2 total=20 + Should Be Empty ${remaining_projects} + [Teardown] Run Keywords + ... SeleniumLibrary.Close All Browsers + ... AND + ... Delete Multiple Data Science Projects title=ds-project-ldap-user number=20 *** Keywords *** Project Suite Setup @@ -202,19 +225,18 @@ Restore Tolerations Settings And Clean Project ... workbench_title=${WORKBENCH_TITLE_TOL_1} tolerations_text=${TOLERATIONS_2} Verify Workbench Does Not Have The Given Tolerations ... workbench_title=${WORKBENCH_TITLE_TOL_2} tolerations_text=${TOLERATIONS_2} - Clean Project workbench_title=${WORKBENCH_TITLE_TOL_1} + Clean Project From Workbench Resources workbench_title=${WORKBENCH_TITLE_TOL_1} ... pvc_title=${PV_NAME_TOL_1} project_title=${PRJ_TITLE} - Clean Project workbench_title=${WORKBENCH_TITLE_TOL_2} + Clean Project From Workbench Resources workbench_title=${WORKBENCH_TITLE_TOL_2} ... pvc_title=${PV_NAME_TOL_2} project_title=${PRJ_TITLE} -Clean Project +Clean Project And Sleep [Documentation] Deletes resources from a test project to free up ... resources or re-use titles [Arguments] ${workbench_title} ${pvc_title} ... ${project_title} - Delete Workbench From CLI workbench_title=${workbench_title} - ... project_title=${project_title} - Delete PVC From CLI pvc_title=${pvc_title} project_title=${project_title} + Clean Project From Workbench Resources workbench_title=${workbench_title} + ... pvc_title=${pvc_title} project_title=${project_title} Sleep 10s reason=There is some delay in updating the GPU availability in Dashboard Verify Workbench Pod Has Limits And Requests For GPU @@ -281,3 +303,20 @@ Open Settings And Disable Tolerations Set Pod Toleration Via UI ${DEFAULT_TOLERATIONS} Disable Pod Toleration Via UI Save Changes In Cluster Settings + +Create Multiple Data Science Projects + [Documentation] Create a given number of data science projects based on title and description + [Arguments] ${title} ${description} ${number} + ${all_projects}= Create List + FOR ${counter} IN RANGE 1 ${number}+1 1 + Create Data Science Project title=${title}${counter} description=${description}-${number} + Open Data Science Projects Home Page + Append To List ${all_projects} ${title}${counter} + END + RETURN ${all_projects} + +Delete Multiple Data Science Projects + [Arguments] ${title} ${number} + FOR ${counter} IN RANGE 1 ${number}+1 1 + ${rc} ${output}= Run And Return Rc And Output oc delete project ${title}${counter} + END diff --git a/ods_ci/tests/Tests/400__ods_dashboard/415__ods_dashboard_projects/415__ods_dashboard_projects_edit.robot b/ods_ci/tests/Tests/400__ods_dashboard/415__ods_dashboard_projects/415__ods_dashboard_projects_edit.robot index 3a00346ef..8c3a489f4 100644 --- a/ods_ci/tests/Tests/400__ods_dashboard/415__ods_dashboard_projects/415__ods_dashboard_projects_edit.robot +++ b/ods_ci/tests/Tests/400__ods_dashboard/415__ods_dashboard_projects/415__ods_dashboard_projects_edit.robot @@ -5,6 +5,7 @@ Library OpenShiftLibrary Resource ../../../Resources/OCP.resource Resource ../../../Resources/Page/ODH/ODHDashboard/ODHDataScienceProject/Projects.resource Resource ../../../Resources/Page/ODH/ODHDashboard/ODHDataScienceProject/Workbenches.resource +Resource ../../../Resources/Page/ODH/ODHDashboard/ODHDataScienceProject/DataConnections.resource Suite Setup Project Suite Setup Suite Teardown Project Suite Teardown Test Setup Launch Data Science Project Main Page @@ -12,7 +13,12 @@ Test Teardown Close All Browsers *** Variables *** -${PRJ_TITLE}= ODS-CI DS Project Editing +${PRJ_TITLE}= ODS-CI DS Project Edit +${PRJ_TITLE_2}= ODS-CI Edit Project +${PRJ_RESOURCE_NAME}= odscidsprojectedit +${PRJ_DESCRIPTION}= ${PRJ_TITLE} is a test project for validating edit scenarios in DS Projects feature and shared by multiple tests #robocop: disable +${NEW_PRJ_TITLE}= ODS-CI DS Project Updated +${NEW_PRJ_DESCRIPTION}= ${NEW_PRJ_TITLE} is a New edited test project for validating DS Projects feature ${NB_IMAGE}= Minimal Python ${WORKBENCH_TITLE}= ODS-CI Workbench 1 ${WORKBENCH_TITLE_UPDATED}= ${WORKBENCH_TITLE} Updated @@ -20,17 +26,36 @@ ${WORKBENCH_DESCRIPTION}= ODS-CI Workbench 1 is a test workbench using ${NB ${WORKBENCH_DESC_UPDATED}= ${WORKBENCH_DESCRIPTION} Updated ${PV_BASENAME}= ods-ci-pv ${PV_DESCRIPTION}= ods-ci-pv is a PV created to test DS Projects feature -# PV size are in GB -${PV_SIZE}= 2 +${PV_SIZE}= 2 # PV sizes are in GB +${DC_S3_NAME}= ods-ci-dc +${DC_S3_AWS_SECRET_ACCESS_KEY}= custom dummy secret access key +${DC_S3_AWS_ACCESS_KEY}= custom dummy access key id +${DC_S3_ENDPOINT}= custom.endpoint.s3.com +${DC_S3_REGION}= ods-ci-region *** Test Cases *** +Verify User Can Edit A Data Science Project + [Tags] Sanity Tier1 ODS-2112 + [Documentation] Verifies users can edit a DS project + [Setup] Create Data Science Project title=${PRJ_TITLE_2} description=${PRJ_DESCRIPTION} + ... resource_name=${NONE} + [Teardown] Delete Data Science Project project_title=${NEW_PRJ_TITLE} + ${ns_name}= Get Openshift Namespace From Data Science Project project_title=${PRJ_TITLE_2} + Open Data Science Projects Home Page + Project Should Be Listed project_title=${PRJ_TITLE_2} + Run Keyword And Continue On Failure Check Resource Name Should Be Immutable project_title=${PRJ_TITLE_2} + Run Keyword And Continue On Failure Check Name And Description Should Be Editable + ... project_title=${PRJ_TITLE_2} new_title=${NEW_PRJ_TITLE} new_description=${NEW_PRJ_DESCRIPTION} + ${ns_newname}= Get Openshift Namespace From Data Science Project project_title=${NEW_PRJ_TITLE} + Should Be Equal As Strings ${ns_name} ${ns_newname} + Verify User Can Edit A Workbench [Documentation] Verifies users can edit a workbench name and description [Tags] Sanity ... Tier1 ... ODS-1931 - Create Data Science Project title=${PRJ_TITLE} description=${EMPTY} + [Setup] Open Data Science Project Details Page project_title=${PRJ_TITLE} Create Workbench workbench_title=${WORKBENCH_TITLE} workbench_description=${WORKBENCH_DESCRIPTION} ... prj_title=${PRJ_TITLE} image_name=${NB_IMAGE} deployment_size=Small ... storage=Persistent pv_existent=${FALSE} @@ -45,6 +70,30 @@ Verify User Can Edit A Workbench Workbench With Description Should Be Listed workbench_title=${WORKBENCH_TITLE_UPDATED} ... workbench_description=${WORKBENCH_DESC_UPDATED} Workbench Status Should Be workbench_title=${WORKBENCH_TITLE_UPDATED} status=${WORKBENCH_STATUS_RUNNING} + [Teardown] Clean Project From Workbench Resources workbench_title=${WORKBENCH_TITLE} + ... project_title=${PRJ_TITLE} pvc_title=${PV_BASENAME} + +Verify User Can Edit A S3 Data Connection + [Tags] Sanity Tier1 ODS-1932 + [Documentation] Verifies users can add a Data connection to AWS S3 + [Setup] Open Data Science Project Details Page project_title=${PRJ_TITLE} + Create S3 Data Connection project_title=${PRJ_TITLE} dc_name=${DC_S3_NAME} + ... aws_access_key=${DC_S3_AWS_SECRET_ACCESS_KEY} + ... aws_secret_access=${DC_S3_AWS_SECRET_ACCESS_KEY} + ... aws_s3_endpoint=${DC_S3_ENDPOINT} aws_region=${DC_S3_REGION} + Edit S3 Data Connection project_title=${PRJ_TITLE} dc_name=${DC_S3_NAME} new_dc_name=${DC_S3_NAME}-test + ... aws_access_key=${S3.AWS_ACCESS_KEY_ID}-test aws_secret_access=${S3.AWS_SECRET_ACCESS_KEY}-test + ... aws_bucket_name=ods-ci-ds-pipelines-test aws_region=${DC_S3_REGION} + ... aws_s3_endpoint=${DC_S3_ENDPOINT} + ${s3_name} ${s3_key} ${s3_secret} ${s3_endpoint} ${s3_region} ${s3_bucket} Get Data Connection Form Values ${DC_S3_NAME}-test + Should Be Equal ${s3_name} ${DC_S3_NAME}-test + Should Be Equal ${s3_key} ${S3.AWS_ACCESS_KEY_ID}-test + Should Be Equal ${s3_secret} ${S3.AWS_SECRET_ACCESS_KEY}-test + Should Be Equal ${s3_endpoint} ${DC_S3_ENDPOINT} + Should Be Equal ${s3_region} ${DC_S3_REGION} + Should Be Equal ${s3_bucket} ods-ci-ds-pipelines-test + SeleniumLibrary.Click Button ${GENERIC_CANCEL_BTN_XP} + Delete Data Connection name=${DC_S3_NAME}-test *** Keywords *** @@ -52,9 +101,13 @@ Project Suite Setup [Documentation] Suite setup steps for testing DS Projects. It creates some test variables ... and runs RHOSi setup Set Library Search Order SeleniumLibrary + RHOSi Setup + Launch Data Science Project Main Page + Create Data Science Project title=${PRJ_TITLE} description=${PRJ_DESCRIPTION} + ... resource_name=${PRJ_RESOURCE_NAME} + Open Data Science Projects Home Page ${to_delete}= Create List ${PRJ_TITLE} Set Suite Variable ${PROJECTS_TO_DELETE} ${to_delete} - RHOSi Setup Project Suite Teardown [Documentation] Suite teardown steps after testing DS Projects. It Deletes @@ -63,3 +116,11 @@ Project Suite Teardown # Delete All Data Science Projects From CLI Delete Data Science Projects From CLI ocp_projects=${PROJECTS_TO_DELETE} RHOSi Teardown + +Check Name And Description Should Be Editable + [Documentation] Checks and verifies if the DSG Name and Description is editable + [Arguments] ${project_title} ${new_title} ${new_description} + Update Data Science Project Name ${project_title} ${new_title} + Update Data Science Project Description ${new_title} ${new_description} + Open Data Science Project Details Page project_title=${new_title} + Page Should Contain ${new_description} \ No newline at end of file