Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RHOAIENG-17979: feat(tests/ide): assert that "authorize access" oauth page is not present after RHOAIENG-11155 got into the product #2190

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions ods_ci/tests/Resources/Common.robot
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ Begin Web Test
IF ${jupyter_login}
Launch Jupyter From RHODS Dashboard Link
Login To Jupyterhub ${username} ${password} ${auth_type}
${authorization_required}= Is Service Account Authorization Required
IF ${authorization_required} Authorize JupyterLab Service Account
Verify Service Account Authorization Not Required
Fix Spawner Status
Go To ${ODH_DASHBOARD_URL}
END
Expand Down
3 changes: 1 addition & 2 deletions ods_ci/tests/Resources/Page/ODH/JupyterHub/Elyra.resource
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,7 @@ Switch To Pipeline Execution Page
IF ${oauth_prompt_visible} Click Button Log in with OpenShift
${login-required} = Is OpenShift Login Visible
IF ${login-required} Login To Openshift ${TEST_USER.USERNAME} ${TEST_USER.PASSWORD} ${TEST_USER.AUTH_TYPE}
${authorization_required} = Is Service Account Authorization Required
IF ${authorization_required} Authorize JupyterLab Service Account
Verify Service Account Authorization Not Required
RETURN ${handle}

Set Runtime Image In All Nodes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -371,8 +371,7 @@ Spawn Notebook With Arguments # robocop: disable
${oauth_prompt_visible} = Is OpenShift OAuth Login Prompt Visible
IF ${oauth_prompt_visible} Click Button Log in with OpenShift
Run Keyword And Warn On Failure Login To Openshift ${username} ${password} ${auth_type}
${authorization_required} = Is Service Account Authorization Required
IF ${authorization_required} Authorize JupyterLab Service Account
Verify Service Account Authorization Not Required

Wait Notebook To Be Loaded ${image} ${version}
${spawn_fail} = Has Spawn Failed
Expand Down Expand Up @@ -409,8 +408,7 @@ Launch JupyterHub Spawner From Dashboard
Menu.Navigate To Page Applications Enabled
Launch Jupyter From RHODS Dashboard Link
Login To Jupyterhub ${username} ${password} ${auth}
${authorization_required} = Is Service Account Authorization Required
IF ${authorization_required} Authorize JupyterLab Service Account
Verify Service Account Authorization Not Required
Fix Spawner Status
#Wait Until Page Contains Element xpath://span[@id='jupyterhub-logo']
Wait Until Page Contains Start server
Expand Down Expand Up @@ -699,8 +697,7 @@ Log In N Users To JupyterLab And Launch A Notebook For Each Of Them
Launch Jupyter From RHODS Dashboard Link
Login To Jupyterhub ${username} ${TEST_USER.PASSWORD} ${TEST_USER.AUTH_TYPE}
Page Should Not Contain 403 : Forbidden
${authorization_required} = Is Service Account Authorization Required
IF ${authorization_required} Authorize JupyterLab Service Account
Verify Service Account Authorization Not Required
Fix Spawner Status
Spawn Notebook With Arguments
END
Expand All @@ -717,8 +714,7 @@ CleanUp JupyterHub For N Users
Launch Jupyter From RHODS Dashboard Link
Login To Jupyterhub ${username} ${TEST_USER.PASSWORD} ${TEST_USER.AUTH_TYPE}
Page Should Not Contain 403 : Forbidden
${authorization_required} = Is Service Account Authorization Required
IF ${authorization_required} Authorize JupyterLab Service Account
Verify Service Account Authorization Not Required
#Fix Spawner Status stops the current notebook, handling the different possible states
Fix Spawner Status
END
Expand Down
10 changes: 2 additions & 8 deletions ods_ci/tests/Resources/Page/ODH/JupyterHub/LoginJupyterHub.robot
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,9 @@
${login_required} = Is OpenShift Login Visible
IF ${login_required} Login To Openshift ${ocp_user_name} ${ocp_user_pw} ${ocp_user_auth_type}

Is Service Account Authorization Required
Verify Service Account Authorization Not Required
Dismissed Show dismissed Hide dismissed
${title} = Get Title
${result} = Run Keyword And Return Status Should Start With ${title} Authorize service account
RETURN ${result}

Authorize JupyterLab Service Account
Wait Until Page Contains Authorize Access
Checkbox Should Be Selected user:info
Click Element approve
Should Not Start With ${title} Authorize service account

Verify Jupyter Access Level
[Arguments] ${expected_result}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ Launch Dashboard And Check User Management Option Is Available For The User
[Arguments] ${username} ${password} ${auth_type} ${settings_should_be}=${TRUE}
Launch Dashboard ocp_user_name=${username} ocp_user_pw=${password} ocp_user_auth_type=${auth_type}
... dashboard_url=${ODH_DASHBOARD_URL} browser=${BROWSER.NAME} browser_options=${BROWSER.OPTIONS}
${authorization_required}= Is Service Account Authorization Required
IF ${authorization_required} Authorize JupyterLab Service Account
Verify Service Account Authorization Not Required
IF ${settings_should_be}
# Wait up to 2 minutes as a workaround for bug RHOAIENG-11116
Menu.Navigate To Page Settings User management timeout=2m
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -343,8 +343,7 @@ Access To Workbench
${oauth_prompt_visible} = Is OpenShift OAuth Login Prompt Visible
IF ${oauth_prompt_visible} Click Button Log in with OpenShift
Run Keyword And Warn On Failure Login To Openshift ${username} ${password} ${auth_type}
${authorization_required}= Is Service Account Authorization Required
IF ${authorization_required} Authorize JupyterLab Service Account
Verify Service Account Authorization Not Required
IF "${expected_ide}"=="VSCode"
Wait Until Page Contains Element xpath://div[@class="menubar-menu-button"] timeout=60s
Wait Until Page Contains Element xpath://div[@class="monaco-dialog-box"] timeout=60s
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -436,8 +436,7 @@ Launch Notebook And Stop It # robocop: disable
Wait For RHODS Dashboard To Load
Launch Jupyter From RHODS Dashboard Link
Login To Jupyterhub ${TEST_USER.USERNAME} ${TEST_USER.PASSWORD} ${TEST_USER.AUTH_TYPE}
${authorization_required} = Is Service Account Authorization Required
IF ${authorization_required} Authorize JupyterLab Service Account
Verify Service Account Authorization Not Required
Wait Until Page Contains Start a notebook server
Fix Spawner Status
Spawn Notebook With Arguments image=minimal-notebook
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,7 @@ Iterative Image Test
Launch Jupyter From RHODS Dashboard Link
Login To Jupyterhub ${TEST_USER.USERNAME} ${TEST_USER.PASSWORD} ${TEST_USER.AUTH_TYPE}
Page Should Not Contain 403 : Forbidden
${authorization_required} = Is Service Account Authorization Required
IF ${authorization_required} Authorize JupyterLab Service Account
Verify Service Account Authorization Not Required
Fix Spawner Status
Spawn Notebook With Arguments image=${image}
Run Cell And Check Output print("Hello World!") Hello World!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,7 @@ Iterative Image Test
Launch Jupyter From RHODS Dashboard Link
Login To Jupyterhub ${TEST_USER.USERNAME} ${TEST_USER.PASSWORD} ${TEST_USER.AUTH_TYPE}
Page Should Not Contain 403 : Forbidden
${authorization_required} = Is Service Account Authorization Required
IF ${authorization_required} Authorize JupyterLab Service Account
Verify Service Account Authorization Not Required
Fix Spawner Status
Spawn Notebook With Arguments image=${image}
Run Cell And Check Output print("Hello World!") Hello World!
Expand All @@ -223,8 +222,7 @@ CleanUp JupyterHub
Launch Jupyter From RHODS Dashboard Link
Login To Jupyterhub ${TEST_USER.USERNAME} ${TEST_USER.PASSWORD} ${TEST_USER.AUTH_TYPE}
Page Should Not Contain 403 : Forbidden
${authorization_required} = Is Service Account Authorization Required
IF ${authorization_required} Authorize JupyterLab Service Account
Verify Service Account Authorization Not Required
# Additional check on running server
${control_panel_visible} = Control Panel Is Visible
IF ${control_panel_visible}==True
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,7 @@ Fill Up User PVC # robocop: disable:too-many-calls-in-keyword
Wait For RHODS Dashboard To Load
Launch Jupyter From RHODS Dashboard Link
Login To Jupyterhub ${TEST_USER.USERNAME} ${TEST_USER.PASSWORD} ${TEST_USER.AUTH_TYPE}
${authorization_required} = Is Service Account Authorization Required
IF ${authorization_required} Authorize JupyterLab Service Account
Verify Service Account Authorization Not Required
Fix Spawner Status
Spawn Notebook With Arguments image=science-notebook
Clone Git Repository And Run ${notebook_repo} ${notebook_path}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@ Spawn Notebook And Trigger Autoscale
${oauth_prompt_visible} = Is OpenShift OAuth Login Prompt Visible
IF ${oauth_prompt_visible} Click Button Log in with OpenShift
Run Keyword And Warn On Failure Login To Openshift ${TEST_USER.USERNAME} ${TEST_USER.PASSWORD} ${TEST_USER.AUTH_TYPE}
${authorization_required} = Is Service Account Authorization Required
IF ${authorization_required} Authorize JupyterLab Service Account
Verify Service Account Authorization Not Required
Wait Until Page Contains Element xpath://div[@id="jp-top-panel"] timeout=60s
Maybe Close Popup
Open New Notebook In Jupyterlab Menu
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ Iterative Image Test
[Arguments] ${image} ${REPO_URL} ${NOTEBOOK_TO_RUN}
Launch Jupyter From RHODS Dashboard Link
Login To Jupyterhub ${TEST_USER.USERNAME} ${TEST_USER.PASSWORD} ${TEST_USER.AUTH_TYPE}
${authorization_required} = Is Service Account Authorization Required
IF ${authorization_required} Authorize JupyterLab Service Account
Verify Service Account Authorization Not Required
Fix Spawner Status
Spawn Notebook With Arguments image=${image}
Run Cell And Check Output print("Hello World!") Hello World!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ Launch JupyterLab
Wait For RHODS Dashboard To Load
Launch Jupyter From RHODS Dashboard Link
Login To Jupyterhub ${TEST_USER.USERNAME} ${TEST_USER.PASSWORD} ${TEST_USER.AUTH_TYPE}
${authorization_required} = Is Service Account Authorization Required
IF ${authorization_required} Authorize JupyterLab Service Account
Verify Service Account Authorization Not Required
Fix Spawner Status
Spawn Notebooks And Set S3 Credentials image=science-notebook
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ Open Browser And Start Notebook As First User
Wait For RHODS Dashboard To Load
Launch Jupyter From RHODS Dashboard Link
Login To Jupyterhub ${TEST_USER.USERNAME} ${TEST_USER.PASSWORD} ${TEST_USER.AUTH_TYPE}
${authorization_required} = Is Service Account Authorization Required
IF ${authorization_required} Authorize JupyterLab Service Account
Verify Service Account Authorization Not Required
Wait Until Page Contains Start a notebook server
Fix Spawner Status
Spawn Notebook With Arguments image=minimal-notebook
Expand All @@ -60,8 +59,7 @@ Open Browser And Start Notebook As Second User With Env Vars
Wait For RHODS Dashboard To Load
Launch Jupyter From RHODS Dashboard Link
Login To Jupyterhub ${TEST_USER_2.USERNAME} ${TEST_USER_2.PASSWORD} ${TEST_USER_2.AUTH_TYPE}
${authorization_required} = Is Service Account Authorization Required
IF ${authorization_required} Authorize JupyterLab Service Account
Verify Service Account Authorization Not Required
Wait Until Page Contains Start a notebook server
Fix Spawner Status
&{first_pod_details} = Create Dictionary pod_ip=${pod_ip} pod_login=${pod_login_name}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ Test User Notebook Plugin in JupyterLab
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}
Launch JupyterHub Spawner From Dashboard
${authorization_required} = Is Service Account Authorization Required
IF ${authorization_required} Authorize JupyterLab Service Account
Verify Service Account Authorization Not Required
Remove All Spawner Environment Variables
Get the List of Plugins from RHODS notebook images
Verify the Plugins for each JL images
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ Can Launch Jupyterhub
Can Login to Jupyterhub
[Tags] Tier2
Login To Jupyterhub ${TEST_USER.USERNAME} ${TEST_USER.PASSWORD} ${TEST_USER.AUTH_TYPE}
${authorization_required} = Is Service Account Authorization Required
IF ${authorization_required} Authorize JupyterLab Service Account
Verify Service Account Authorization Not Required
#Wait Until Page Contains Element xpath://span[@id='jupyterhub-logo']
Wait Until Page Contains Start a notebook server

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ Can Launch Jupyterhub
Can Login to Jupyterhub
[Tags] Tier1
Login To Jupyterhub ${TEST_USER.USERNAME} ${TEST_USER.PASSWORD} ${TEST_USER.AUTH_TYPE}
${authorization_required} = Is Service Account Authorization Required
IF ${authorization_required} Authorize JupyterLab Service Account
Verify Service Account Authorization Not Required
#Wait Until Page Contains Element xpath://span[@id='jupyterhub-logo']
Wait Until Page Contains Start a notebook server

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ Can Launch Jupyterhub
Can Login to Jupyterhub
[Tags] Sanity
Login To Jupyterhub ${TEST_USER.USERNAME} ${TEST_USER.PASSWORD} ${TEST_USER.AUTH_TYPE}
${authorization_required} = Is Service Account Authorization Required
IF ${authorization_required} Authorize JupyterLab Service Account
Verify Service Account Authorization Not Required
#Wait Until Page Contains Element xpath://span[@id='jupyterhub-logo']
Wait Until Page Contains Start a notebook server

Expand Down Expand Up @@ -64,8 +63,7 @@ Verify A Default Image Is Provided And Starts Successfully
Launch JupyterHub Spawner From Dashboard
Spawn Notebook
Run Keyword And Warn On Failure Login To Openshift ${TEST_USER.USERNAME} ${TEST_USER.PASSWORD} ${TEST_USER.AUTH_TYPE}
${authorization_required} = Is Service Account Authorization Required
IF ${authorization_required} Authorize JupyterLab Service Account
Verify Service Account Authorization Not Required
Run Keyword And Continue On Failure Wait Until Page Contains Element xpath://div[@id="jp-top-panel"] timeout=60s
Open New Notebook In Jupyterlab Menu
Verify Notebook Name And Image Tag user_data=${user_data}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ Spawn and Stop Server
${time1} = Get Time format=%H:%M:%S.%f
Spawn Notebook
Run Keyword And Warn On Failure Login To Openshift ${TEST_USER.USERNAME} ${TEST_USER.PASSWORD} ${TEST_USER.AUTH_TYPE}
${authorization_required} = Is Service Account Authorization Required
IF ${authorization_required} Authorize JupyterLab Service Account
Verify Service Account Authorization Not Required
# If this fails we waited for 60s. Avg. time will be thrown off, might be acceptable
# given that we weren't able to spawn?
Run Keyword And Continue On Failure Wait Until Page Contains Element xpath://div[@id="jp-top-panel"] timeout=60s
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ Can Launch Jupyterhub

Can Login to Jupyterhub
Login To Jupyterhub ${TEST_USER.USERNAME} ${TEST_USER.PASSWORD} ${TEST_USER.AUTH_TYPE}
${authorization_required} = Is Service Account Authorization Required
IF ${authorization_required} Authorize JupyterLab Service Account
Verify Service Account Authorization Not Required
#Wait Until Page Contains Element xpath://span[@id='jupyterhub-logo']
Wait Until Page Contains Start a notebook server

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ Can Launch Jupyterhub
Can Login to Jupyterhub
[Tags] Sanity
Login To Jupyterhub ${TEST_USER.USERNAME} ${TEST_USER.PASSWORD} ${TEST_USER.AUTH_TYPE}
${authorization_required} = Is Service Account Authorization Required
IF ${authorization_required} Authorize JupyterLab Service Account
Verify Service Account Authorization Not Required
#Wait Until Page Contains Element xpath://span[@id='jupyterhub-logo']
Wait Until Page Contains Start a notebook server

Expand Down
6 changes: 2 additions & 4 deletions ods_ci/tests/Tests/0500__ide/0501__ide_jupyterhub/test.robot
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ Can Login To Jupyterhub
[Tags] Smoke
... ODS-936
Login To Jupyterhub ${TEST_USER.USERNAME} ${TEST_USER.PASSWORD} ${TEST_USER.AUTH_TYPE}
${authorization_required} = Is Service Account Authorization Required
IF ${authorization_required} Authorize JupyterLab Service Account
Verify Service Account Authorization Not Required
Wait Until Page Contains Start a notebook server

Can Spawn Notebook
Expand Down Expand Up @@ -74,8 +73,7 @@ Can Spawn Notebook
${oauth_prompt_visible} = Is OpenShift OAuth Login Prompt Visible
IF ${oauth_prompt_visible} Click Button Log in with OpenShift
Login To Openshift ${TEST_USER.USERNAME} ${TEST_USER.PASSWORD} ${TEST_USER.AUTH_TYPE}
${authorization_required} = Is Service Account Authorization Required
IF ${authorization_required} Authorize JupyterLab Service Account
Verify Service Account Authorization Not Required
Wait Until Page Contains Element xpath://div[@id="jp-top-panel"] timeout=60s
Sleep 3
Maybe Close Popup
Expand Down
Loading