diff --git a/tests/Resources/Page/OCPDashboard/Builds/Builds.robot b/tests/Resources/Page/OCPDashboard/Builds/Builds.robot index 9e8e64065..a4763443d 100644 --- a/tests/Resources/Page/OCPDashboard/Builds/Builds.robot +++ b/tests/Resources/Page/OCPDashboard/Builds/Builds.robot @@ -18,7 +18,8 @@ Delete BuildConfig using Name ${status} Check If BuildConfig Exists ${namespace} ${name} Run Keyword If '${status}'=='PASS' OpenShiftCLI.Delete kind=BuildConfig name=${name} namespace=${namespace} ... ELSE FAIL No BuildConfig present with name '${name}' in '${namespace}' namespace, Check the BuildConfig name and namespace provide is correct and try again - Dependent Build should not Present ${name} + Wait Until Keyword Succeeds 10s 2s + ... Dependent Build should not Present ${name} ${status} Check If BuildConfig Exists ${namespace} ${name} Run Keyword IF '${status}'!='FAIL' FAIL BuildConfig with name '${name}' is not deleted in '${namespace}' diff --git a/tests/Resources/Page/ODH/AiApps/Anaconda.resource b/tests/Resources/Page/ODH/AiApps/Anaconda.resource index d7fd1cf1d..3ec1bad81 100644 --- a/tests/Resources/Page/ODH/AiApps/Anaconda.resource +++ b/tests/Resources/Page/ODH/AiApps/Anaconda.resource @@ -15,6 +15,17 @@ ${INVALID_KEY}= abcdef-invalidkey ${ERROR_MSG}= error\nValidation failed\nError attempting to validate. Please check your entries. ${VAL_SUCCESS_MSG}= Validation result: 200 ${TOKEN_VAL_SUCCESS_MSG}= Success! Your token was validated and Conda has been configured. +${PKG_INSTALL_ERROR_MSG}= Collecting package metadata (current_repodata.json): failed +... UnavailableInvalidChannel: HTTP 403 FORBIDDEN for channel repo/main +... The channel is not accessible or is invalid. +... You will need to adjust your conda configuration to proceed. +... Use `conda config --show channels` to view your configuration's current state, +... and use `conda config --show-sources` to view config file locations. +${CONDARC_CAT_RESULT}= restore_free_channel: false +... default_channels: +... - https://repo.anaconda.cloud/repo/main +... - https://repo.anaconda.cloud/repo/msys2 +... - https://repo.anaconda.cloud/repo/r *** Keywords *** diff --git a/tests/Tests/600__ai_apps/600__anaconda_commercial_edition/600__anaconda_commercial_edition.robot b/tests/Tests/600__ai_apps/600__anaconda_commercial_edition/600__anaconda_commercial_edition.robot index efc66ad81..48701be28 100644 --- a/tests/Tests/600__ai_apps/600__anaconda_commercial_edition/600__anaconda_commercial_edition.robot +++ b/tests/Tests/600__ai_apps/600__anaconda_commercial_edition/600__anaconda_commercial_edition.robot @@ -50,22 +50,20 @@ Verify Anaconda Professional Fails Activation When Key Is Invalid Verify User Is Able to Activate Anaconda Professional [Tags] Tier2 - ... ODS-272 ODS-344 ODS-501 ODS-588 ODS-1082 ODS-1304 ODS-462 ODS-283 - ... ProductBug + ... ODS-272 ODS-344 ODS-501 ODS-588 ODS-1082 ODS-1304 ODS-462 ODS-283 ODS-650 [Documentation] Performs the Anaconda CE activation, spawns a JL using the Anaconda image, ... validate the token, install a library and try to import it. ... At the end, it stops the JL server and returns to the spawner Verify Anaconda In Kfdef - Open Browser ${ODH_DASHBOARD_URL} browser=${BROWSER.NAME} options=${BROWSER.OPTIONS} - Login To RHODS Dashboard ${TEST_USER.USERNAME} ${TEST_USER.PASSWORD} ${TEST_USER.AUTH_TYPE} - Wait For RHODS Dashboard To Load + Launch Dashboard ocp_user_name=${TEST_USER.USERNAME} ocp_user_pw=${TEST_USER.PASSWORD} + ... ocp_user_auth_type=${TEST_USER.AUTH_TYPE} dashboard_url=${ODH_DASHBOARD_URL} browser=${BROWSER.NAME} + ... browser_options=${BROWSER.OPTIONS} Enable Anaconda ${ANACONDA_CE.ACTIVATION_KEY} Capture Page Screenshot anaconda_success_activation.png Menu.Navigate To Page Applications Enabled Wait Until RHODS Dashboard Jupyter Is Visible - Capture Page Screenshot enabletab_anaconda_present.png Verify Anaconda Card Present Based On Version - Go To ${OCP_CONSOLE_URL} + Open OCP Console Login To Openshift ${OCP_ADMIN_USER.USERNAME} ${OCP_ADMIN_USER.PASSWORD} ${OCP_ADMIN_USER.AUTH_TYPE} Maybe Skip Tour ${val_result}= Get Pod Logs From UI namespace=redhat-ods-applications @@ -73,19 +71,18 @@ Verify User Is Able to Activate Anaconda Professional Log ${val_result} Should Be Equal ${val_result[0]} ${VAL_SUCCESS_MSG} Wait Until Keyword Succeeds 400 times 5s Check Anaconda CE Image Build Status Complete - Go To ${ODH_DASHBOARD_URL} - Login To RHODS Dashboard ${TEST_USER.USERNAME} ${TEST_USER.PASSWORD} ${TEST_USER.AUTH_TYPE} + Launch Dashboard ocp_user_name=${TEST_USER.USERNAME} ocp_user_pw=${TEST_USER.PASSWORD} + ... ocp_user_auth_type=${TEST_USER.AUTH_TYPE} dashboard_url=${ODH_DASHBOARD_URL} browser=${BROWSER.NAME} + ... browser_options=${BROWSER.OPTIONS} Launch JupyterHub Spawner From Dashboard Run Keyword And Continue On Failure Verify Anaconda Element Present Based On Version Run Keyword And Continue On Failure Verify Anaconda Element Enabled Based On Version Spawn Notebook With Arguments image=s2i-minimal-notebook-anaconda Verify Git Plugin - Run Cell And Check Output !conda token set ${ANACONDA_CE.ACTIVATION_KEY} ${TOKEN_VAL_SUCCESS_MSG} - Capture Page Screenshot anaconda_token_val_cell.png - Add and Run JupyterLab Code Cell in Active Notebook !conda install -y numpy - Wait Until JupyterLab Code Cell Is Not Active - Run Cell And Check For Errors import numpy as np - Capture Page Screenshot conda_lib_install_result.png + Check condarc File Content + Install Numpy Package Should Fail + Validate Anaconda Token + Install Numpy Package Should Be Successful Verify Library Version Is Greater Than jupyterlab 3.1.4 Verify Library Version Is Greater Than notebook 6.4.1 Maybe Open JupyterLab Sidebar File Browser @@ -110,3 +107,37 @@ Verify Anaconda In Kfdef END END Run Keyword And Continue On Failure Should Contain ${applications_names} anaconda-ce + +Install Numpy Package Should Fail + [Documentation] Tries to install python package "numpy" and checks + ... if the output matches the expected error message. + ... The installation should fail because runs before token validation + ${pkg_install_out}= Run Cell And Get Output !conda install -y numpy + ${pkg_install_out}= Remove String Using Regexp ${pkg_install_out} ${\n}|${SPACE} + ${PKG_INSTALL_ERROR_MSG}= Remove String Using Regexp ${PKG_INSTALL_ERROR_MSG} ${\n}|${SPACE} + Should Be Equal As Strings ${PKG_INSTALL_ERROR_MSG} ${pkg_install_out} + +Validate Anaconda Token + [Documentation] Sets the token using "conda" command. It is necessary to start + ... using the conda packages + Run Cell And Check Output !conda token set ${ANACONDA_CE.ACTIVATION_KEY} ${TOKEN_VAL_SUCCESS_MSG} + Capture Page Screenshot anaconda_token_val_cell.png + +Install Numpy Package Should Be Successful + [Documentation] Tries to install python package "numpy" and checks + ... if it runs without errors. + ... The installation should be successful because runs after token validation + Add And Run JupyterLab Code Cell In Active Notebook !conda install -y numpy + Wait Until JupyterLab Code Cell Is Not Active + Run Cell And Check For Errors import numpy as np + Capture Page Screenshot conda_lib_install_result.png + +Check condarc File Content + [Documentation] Checks the location and content of the "condarc" configuration file + ${condarc_cat_out}= Run Cell And Get Output !cat /etc/conda/condarc + ${condarc_cat_out}= Remove String Using Regexp ${condarc_cat_out} ${\n}|${SPACE} + ${CONDARC_CAT_RESULT}= Remove String Using Regexp ${CONDARC_CAT_RESULT} ${\n}|${SPACE} + Should Be Equal As Strings ${CONDARC_CAT_RESULT} ${condarc_cat_out} + Run Keyword And Continue On Failure + ... Run Cell And Check Output !cat $HOME/.condarc cat: /opt/app-root/src/.condarc: No such file or directory +