diff --git a/ods_ci/tests/Resources/Page/ModelRegistry/ModelRegistry.resource b/ods_ci/tests/Resources/Page/ModelRegistry/ModelRegistry.resource index f6c99fe21..47f2592ee 100644 --- a/ods_ci/tests/Resources/Page/ModelRegistry/ModelRegistry.resource +++ b/ods_ci/tests/Resources/Page/ModelRegistry/ModelRegistry.resource @@ -59,8 +59,8 @@ Prepare Model Registry Test Setup Get Cluster Domain And Token Run Update Notebook Script Generate ModelRegistry Certificates - Apply Db Config Samples namespace=${NAMESPACE_MODEL_REGISTRY} samples=${MODEL_REGISTRY_DB_SAMPLES} Create Model Registry Secrets + Apply Db Config Samples namespace=${NAMESPACE_MODEL_REGISTRY} samples=${MODEL_REGISTRY_DB_SAMPLES} Fetch CA Certificate If RHODS Is Self-Managed Teardown Model Registry Test Setup @@ -296,12 +296,13 @@ Open Model Registry Dashboard Page Maybe Wait For Dashboard Loading Spinner Page ${loaded}= Run Keyword And Return Status ... SeleniumLibrary.Page Should Not Contain Request access to model registries - WHILE ${loaded}!=${TRUE} limit=5 + WHILE ${loaded}!=${TRUE} limit=12 # Retries for 2 minutes - wait for user group to reconcile SeleniumLibrary.Reload Page SeleniumLibrary.Wait Until Page Contains Model Registry SeleniumLibrary.Wait Until Page Contains Select a model registry to view and manage your registered models. ${loaded}= Run Keyword And Return Status ... SeleniumLibrary.Page Should Not Contain Request access to model registries + Sleep 10s END Maybe Wait For Dashboard Loading Spinner Page @@ -383,6 +384,7 @@ Model Registry Post Upgrade Scenario Should Be Equal As Strings ${operator_grpc} ${instance_grpc} Launch Dashboard ${TEST_USER.USERNAME} ${TEST_USER.PASSWORD} ${TEST_USER.AUTH_TYPE} ... ${ODH_DASHBOARD_URL} ${BROWSER.NAME} ${BROWSER.OPTIONS} + Add User To Model Registry Default Group ${TEST_USER.USERNAME} Open Model Registry Dashboard Page SeleniumLibrary.Page Should Contain Element ... xpath:${MR_TABLE_XPATH}/tbody/tr/td[@data-label="Model name"]//a[.="${MR_REGISTERED_MODEL_NAME}"] @@ -446,4 +448,14 @@ Get Model Registry Instance ${type} Image ${rc} ${img}= Run And Return RC And Output ... oc get pod -l app=${instance_name} -n ${ns} -o yaml | yq '.items[].spec.containers[] | select(.name=="${type}-container").image' Should Be Equal As Integers ${rc} 0 - RETURN ${img} \ No newline at end of file + RETURN ${img} + +Add User To Model Registry Default Group + [Documentation] Dashboard creates a default user group to give read/write permissions to a MR instance. We need + ... to add our test user to this group in order to be able to interact with it. + [Arguments] ${user} ${model_registry_name}=modelregistry-sample + ${rc}= Run And Return Rc oc get group ${model_registry_name}-users + Should Be Equal As Integers ${rc} 0 + ${rc} ${out}= Run And Return Rc And Output oc adm groups add-users ${model_registry_name}-users ${user} + Should Be Equal As Integers ${rc} 0 + Should Be Equal As Strings ${out} group.user.openshift.io/${model_registry_name}-users added: "${user}" diff --git a/ods_ci/tests/Tests/1300__model_registry/1301_model_registry_model_serving.robot b/ods_ci/tests/Tests/1300__model_registry/1301_model_registry_model_serving.robot index f19388c10..937847e30 100644 --- a/ods_ci/tests/Tests/1300__model_registry/1301_model_registry_model_serving.robot +++ b/ods_ci/tests/Tests/1300__model_registry/1301_model_registry_model_serving.robot @@ -67,6 +67,7 @@ Verify Model Registry Integration With Secured-DB IF ${self_managed} Upload Certificate To Jupyter Notebook openshift_ca.crt Jupyter Notebook Can Query Model Registry ${JUPYTER_NOTEBOOK} SeleniumLibrary.Switch Window ${handle} + Add User To Model Registry Default Group ${TEST_USER.USERNAME} Open Model Registry Dashboard Page SeleniumLibrary.Page Should Contain Element xpath:${MR_TABLE_XPATH}/tbody/tr/td[@data-label="Model name"]//a[.="${MR_REGISTERED_MODEL_NAME}"] SeleniumLibrary.Page Should Contain Element xpath:${MR_TABLE_XPATH}/tbody/tr/td[@data-label="Owner"]//p[.="${MR_REGISTERED_MODEL_AUTHOR}"] diff --git a/ods_ci/tests/Tests/1300__model_registry/1302_model_registry_smoke.robot b/ods_ci/tests/Tests/1300__model_registry/1302_model_registry_smoke.robot index a14514f5f..132136d10 100644 --- a/ods_ci/tests/Tests/1300__model_registry/1302_model_registry_smoke.robot +++ b/ods_ci/tests/Tests/1300__model_registry/1302_model_registry_smoke.robot @@ -38,17 +38,20 @@ Deploy Model Registry ... model-registry-operator-controller-manager ... control-plane=model-registry-operator Component Should Be Enabled modelregistry + Sleep 60s reason=Wait for webhook endpoint Apply Db Config Samples namespace=${NAMESPACE_MODEL_REGISTRY} samples=${MODEL_REGISTRY_DB_SAMPLES} Wait Until Keyword Succeeds 10 s 2 s Verify Model Registry Can Accept Requests Registering A Model In The Registry [Documentation] Registers a model in the model registry [Tags] Smoke MR1302 ModelRegistry + Depends On Test Deploy Model Registry Register A Model ${URL} Verify Model Registry [Documentation] Verify the registered model. [Tags] Smoke MR1302 ModelRegistry + Depends On Test Registering A Model In The Registry Log Attempting to verify Model Registry Wait Until Keyword Succeeds 10 s 2 s Run Curl Command And Verify Response