Skip to content

Commit

Permalink
Add ModelRegistry Namespace Check
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmahoneyrh committed Sep 26, 2024
1 parent 47d5b72 commit c784b0e
Showing 1 changed file with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,9 @@ Validate ModelRegistry Managed State
Set DSC Component Managed State And Wait For Completion modelregistry ${MODELREGISTRY_CONTROLLER__DEPLOYMENT_NAME} ${MODELREGISTRY_CONTROLLER__LABEL_SELECTOR}

# Check if Deployment exists in expected namespace
Check Model Registry Deployment Namespace

[Teardown] Restore DSC Component State modelregistry ${MODELREGISTRY_CONTROLLER__DEPLOYMENT_NAME} ${MODELREGISTRY_CONTROLLER__LABEL_SELECTOR} ${SAVED_MANAGEMENT_STATES.MODELREGISTRY}

Validate ModelRegistry Removed State
Expand Down Expand Up @@ -382,3 +385,19 @@ Check Image Pull Path Is Redhatio
ELSE
Fail Deployment image ${deployment_name} does not contain pull path registry.redhat.io
END

Check Model Registry Deployment Namespace
[Documentation] Check that Model Registry is deployed into namespace as defined in DSC modelregistry.registriesNamespace

Check warning

Code scanning / Robocop

Line is too long ({{ line_length }}/{{ allowed_length }}) Warning test

Line is too long (127/120)
# Get expected namespace
${rc} ${expected_namespace}= Run And Return Rc And Output
... oc get DataScienceCluster/${DSC_NAME} -n ${OPERATOR_NS} -o "jsonpath={".spec.components.modelregistry.registriesNamespace"}"

Check warning

Code scanning / Robocop

Line is too long ({{ line_length }}/{{ allowed_length }}) Warning test

Line is too long (135/120)
Should Be Equal As Integers ${rc} 0 msg=${expected_namespace}

# Get actual namespace
${rc} ${actual_namespace}= Run And Return Rc And Output
... oc get deployments -A | grep ${MODELREGISTRY_CONTROLLER_DEPLOYMENT_NAME} | awk '{print$1}'
Should Be Equal As Integers ${rc} 0 msg=${actual_namespace}

Log To Console Model Registry Namespace: Actual "${actual_namespace}" Expected: "${expected_namespace}
Should Be Equal ${actual_namespace} ${expected_namespace}

Check warning

Code scanning / Robocop

File has too many lines ({{ lines_count }}/{{max_allowed_count }}) Warning test

File has too many lines (403/400)

0 comments on commit c784b0e

Please sign in to comment.