From dc8f14528793991da2d02ab6bf63e22135bdd560 Mon Sep 17 00:00:00 2001 From: Tony Davidson Date: Fri, 3 May 2024 16:08:32 +0100 Subject: [PATCH] This commit will remove the source script for coloured text (#59) --- test/scripts/populateDatabase.sh | 14 +++++++------- test/scripts/rest.sh | 19 +++++++++---------- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/test/scripts/populateDatabase.sh b/test/scripts/populateDatabase.sh index ee1fe3c1..ec0d2b5a 100755 --- a/test/scripts/populateDatabase.sh +++ b/test/scripts/populateDatabase.sh @@ -17,7 +17,7 @@ make_post_extract_id() { -d "$data" | jq -r '.id') if [ -z "$id" ]; then - echo -e "${RED}Error:${NC} Error: Failed to extract ID from response" + echo -e "Error: Failed to extract ID from response" exit 1 else echo "$id" @@ -36,10 +36,10 @@ post_model_registry_data() { }') if [ $? -ne 0 ]; then - echo -e "${RED}Error:${NC} Registered Model ID not returned" + echo -e "Error: Registered Model ID not returned" exit 1 else - echo -e "${GREEN}✔ Success:${NC} Registered Model ID: $rm_id" + echo -e "Success: Registered Model ID: $rm_id" fi mv_id=$(make_post_extract_id "$MR_HOSTNAME/api/model_registry/v1alpha3/model_versions" '{ @@ -50,10 +50,10 @@ post_model_registry_data() { }') if [ $? -ne 0 ]; then - echo -e "${RED}Error:${NC} Model Version ID not returned" + echo -e "Error: Model Version ID not returned" exit 1 else - echo -e "${GREEN}✔ Success:${NC} Model Version ID: $mv_id" + echo -e "Success: Model Version ID: $mv_id" fi RAW_ML_MODEL_URI='https://huggingface.co/tarilabs/mnist/resolve/v1.nb20231206162408/mnist.onnx' @@ -69,10 +69,10 @@ post_model_registry_data() { }') if [ $? -ne 0 ]; then - echo -e "${RED}Error:${NC} Model Artifact ID not returned" + echo -e "Error: Model Artifact ID not returned" exit 1 else - echo -e "${GREEN}✔ Success:${NC} Model Artifact ID: $ma_id" + echo -e "Success: Model Artifact ID: $ma_id" fi } diff --git a/test/scripts/rest.sh b/test/scripts/rest.sh index b8a701ad..b3945305 100755 --- a/test/scripts/rest.sh +++ b/test/scripts/rest.sh @@ -1,7 +1,6 @@ #!/bin/bash FLAG_WITH_NAMESPACE=$1 MR_HOSTNAME="http://$(oc get route modelregistry-sample-http $FLAG_WITH_NAMESPACE --template='{{.spec.host}}')" -source "openshift-ci/scripts/colour_text_variables.sh" # Function to send data and extract ID from response make_post_extract_id() { @@ -13,7 +12,7 @@ make_post_extract_id() { -d "$data" | jq -r '.id') if [ -z "$id" ]; then - echo -e "${RED}Error:${NC} Error: Failed to extract ID from response" + echo -e "Error: Failed to extract ID from response" exit 1 else echo "$id" @@ -31,10 +30,10 @@ post_model_registry_data() { }') if [ $? -ne 0 ]; then - echo -e "${RED}Error:${NC} Registered Model ID not returned" + echo -e "Error: Registered Model ID not returned" exit 1 else - echo -e "${GREEN}✔ Success:${NC} Registered Model ID: $rm_id" + echo -e "Success: Registered Model ID: $rm_id" fi mv_id=$(make_post_extract_id "$MR_HOSTNAME/api/model_registry/v1alpha3/model_versions" '{ @@ -45,10 +44,10 @@ post_model_registry_data() { }') if [ $? -ne 0 ]; then - echo -e "${RED}Error:${NC} Model Version ID not returned" + echo -e "Error: Model Version ID not returned" exit 1 else - echo -e "${GREEN}✔ Success:${NC} Model Version ID: $mv_id" + echo -e "Success: Model Version ID: $mv_id" fi RAW_ML_MODEL_URI='https://huggingface.co/tarilabs/mnist/resolve/v1.nb20231206162408/mnist.onnx' @@ -64,10 +63,10 @@ post_model_registry_data() { }') if [ $? -ne 0 ]; then - echo -e "${RED}Error:${NC} Model Artifact ID not returned" + echo -e "Error: Model Artifact ID not returned" exit 1 else - echo -e "${GREEN}✔ Success:${NC} Model Artifact ID: $ma_id" + echo -e "Success: Model Artifact ID: $ma_id" fi } @@ -107,10 +106,10 @@ inference_service() { -H 'accept: application/json') if [ $? -ne 0 ]; then - echo -e "${RED}Error:${NC} InferenceService entities on MR not returned" + echo -e "Error: InferenceService entities on MR not returned" exit 1 else - echo -e "${GREEN}✔ Success:${NC} InferenceService entities on MR: $iss_mr" + echo -e "Success: InferenceService entities on MR: $iss_mr" fi }