From 6835020c78b51fe1447d6a13dcc7053240e5372a Mon Sep 17 00:00:00 2001 From: Saad Khan Date: Tue, 17 Mar 2026 12:57:23 +0530 Subject: [PATCH 1/6] add conditional cluster check for datasource-tests Signed-off-by: Saad Khan --- .../Local_monitoring_tests.md | 36 ++++++--- .../datasource_tests.sh | 76 +++++++++++++------ 2 files changed, 77 insertions(+), 35 deletions(-) diff --git a/tests/scripts/local_monitoring_tests/Local_monitoring_tests.md b/tests/scripts/local_monitoring_tests/Local_monitoring_tests.md index c1ba7e7879..e558ac717c 100644 --- a/tests/scripts/local_monitoring_tests/Local_monitoring_tests.md +++ b/tests/scripts/local_monitoring_tests/Local_monitoring_tests.md @@ -387,26 +387,42 @@ The test can be run using the command below: #### Scenarios -**both-valid** +Both cluster types support multiple datasources. Scenarios vary by which datasources are in the cluster YAML: +- **OpenShift:** YAML has Prometheus + Thanos (both available in cluster) +- **Minikube/Kind:** YAML has Prometheus only (Thanos not running; multiple Prometheus datasources are also valid) -Both Prometheus and Thanos Querier datasources are reachable. +**both-valid** (OpenShift) + +Both datasources are reachable. **✔ Expected:** Kruize starts successfully. -**prom-valid-thanos-invalid** +**valid-invalid** (OpenShift) + +Datasource 1 is reachable, datasource 2 is unreachable. + +**✔ Expected:** Kruize starts successfully and logs an error for datasource 2. -Prometheus is reachable and Thanos Querier is unreachable. +**invalid-valid** (OpenShift) -**✔ Expected:** Kruize starts successfully and logs an error for Thanos. +Datasource 1 is unreachable, datasource 2 is reachable. -**prom-invalid-thanos-valid** +**✔ Expected:** Kruize starts successfully and logs an error for datasource 1. -Prometheus is unreachable and Thanos Querier is reachable. +**both-invalid** (OpenShift) -**✔ Expected:** Kruize starts successfully and logs an error for Prometheus. +Both datasources are unreachable. + +**❌ Expected:** Kruize fails to start and exits with an error. + +**valid** (Minikube/Kind) + +Datasource is reachable. + +**✔ Expected:** Kruize starts successfully. -**both-invalid** +**invalid** (Minikube/Kind) -Both Prometheus and Thanos Querier datasources are unreachable. +Datasource is unreachable. **❌ Expected:** Kruize fails to start and exits with an error. diff --git a/tests/scripts/local_monitoring_tests/datasource_tests.sh b/tests/scripts/local_monitoring_tests/datasource_tests.sh index e80d3e5326..614cd8a437 100644 --- a/tests/scripts/local_monitoring_tests/datasource_tests.sh +++ b/tests/scripts/local_monitoring_tests/datasource_tests.sh @@ -27,18 +27,30 @@ APP_DEPLOYMENT="kruize" # Datasource serviceName overrides to simulate reachability declare -A datasource_scenarios datasource_scenarios=( + # OpenShift YAML: Prometheus + Thanos (both available in cluster) ["both-invalid"]="invalid invalid" ["both-valid"]="prometheus-k8s thanos-querier" - ["prom-valid-thanos-invalid"]="prometheus-k8s invalid-thanos" - ["prom-invalid-thanos-valid"]="invalid-prometheus thanos-querier" + ["valid-invalid"]="prometheus-k8s invalid-thanos" + ["invalid-valid"]="invalid-prometheus thanos-querier" + # Minikube/Kind YAML: Prometheus only (Thanos not running; could add more Prometheus DS) + ["invalid"]="invalid invalid" + ["valid"]="prometheus-k8s invalid" ) -datasource_scenario_order=( + +# OpenShift: test with Prometheus + Thanos (both in cluster YAML) +openshift_scenario_order=( "both-invalid" - "prom-invalid-thanos-valid" - "prom-valid-thanos-invalid" + "invalid-valid" + "valid-invalid" "both-valid" ) +# Minikube/Kind: test with Prometheus only (Thanos not in cluster; YAML has one DS) +non_openshift_scenario_order=( + "invalid" + "valid" +) + function datasource_tests() { start_time=$(get_date) FAILED_CASES=() @@ -76,12 +88,24 @@ function datasource_tests() { kubectl_cmd="kubectl -n ${NAMESPACE}" + # Select scenarios based on cluster type: + # - OpenShift: Prometheus + Thanos in YAML, test both + # - Minikube/Kind: Prometheus only in YAML (Thanos not running) + # Both cluster types support multiple datasources + if [ "$cluster_type" == "openshift" ]; then + scenario_order=("${openshift_scenario_order[@]}") + echo "Cluster type: OpenShift - Testing with Prometheus and Thanos datasources" + else + scenario_order=("${non_openshift_scenario_order[@]}") + echo "Cluster type: ${cluster_type} - Testing with Prometheus datasource (Thanos not available)" + fi + echo "" echo "******************* Executing test suite ${FUNCNAME} ****************" echo "" - suffix=1 - for scenario in "${datasource_scenario_order[@]}"; do + suffix=1 + for scenario in "${scenario_order[@]}"; do echo "" echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" echo " Running datasource scenario: ${scenario}" @@ -121,13 +145,15 @@ run_datasource_scenario() { suffix=$2 POD_LOG="${TEST_SUITE_DIR}/${scenario}-pod.log" - read PROM_SERVICE THANOS_SERVICE <<< "${datasource_scenarios[$scenario]}" + read DS1_SERVICE DS2_SERVICE <<< "${datasource_scenarios[$scenario]}" echo "Updating YAML:" - echo " Prometheus serviceName = ${PROM_SERVICE}" - echo " Thanos serviceName = ${THANOS_SERVICE}" + echo " Datasource 1 serviceName = ${DS1_SERVICE}" + if [ "$cluster_type" == "openshift" ]; then + echo " Datasource 2 serviceName = ${DS2_SERVICE}" + fi - update_yaml_with_datasources "${PROM_SERVICE}" "${THANOS_SERVICE}" "${suffix}" + update_yaml_with_datasources "${DS1_SERVICE}" "${DS2_SERVICE}" "${suffix}" $kubectl_cmd apply -f "$YAML_FILE" > /dev/null $kubectl_cmd rollout restart deployment kruize @@ -139,10 +165,10 @@ run_datasource_scenario() { sleep 5 $kubectl_cmd logs "$POD_NAME" > "$POD_LOG" 2>&1 - if [[ "$scenario" == "both-invalid" ]]; then - echo "inside both-invalid" + if [[ "$scenario" == "both-invalid" ]] || [[ "$scenario" == "invalid" ]]; then + echo "inside ${scenario} (expecting datasource failure)" if grep -i "No datasource could be added or are serviceable" "$POD_LOG"; then - echo "Expected failure detected (both datasources invalid)" + echo "Expected failure detected (datasource(s) invalid)" ((TESTS_PASSED++)) else echo "Expected failure NOT detected" @@ -178,28 +204,28 @@ cleanup_datasources_from_yaml() { } update_yaml_with_datasources() { - local prom_service=$1 - local thanos_service=$2 - # create unique datasource name for each scenario + local ds1_service=$1 + local ds2_service=$2 + # create unique datasource name for each scenario (YAML keys: prometheus-1, thanos-1) SUFFIX=$3 - PROM_DS_NAME="prometheus-${SUFFIX}" - THANOS_DS_NAME="thanos-${SUFFIX}" + DS1_NAME="prometheus-${SUFFIX}" + DS2_NAME="thanos-${SUFFIX}" echo "Using datasource names:" - echo " Prometheus: ${PROM_DS_NAME}" - echo " Thanos: ${THANOS_DS_NAME}" + echo " Datasource 1: ${DS1_NAME}" + echo " Datasource 2: ${DS2_NAME}" # Backup once cp "$YAML_FILE" "${YAML_FILE}.ds.bak" sed -i ' /"name": *"prometheus-1"/,/}/{ - s/"name": *"[^"]*"/"name": "'"$PROM_DS_NAME"'"/ - s/"serviceName": *"[^"]*"/"serviceName": "'"$prom_service"'"/ + s/"name": *"[^"]*"/"name": "'"$DS1_NAME"'"/ + s/"serviceName": *"[^"]*"/"serviceName": "'"$ds1_service"'"/ } /"name": *"thanos-1"/,/}/{ - s/"name": *"[^"]*"/"name": "'"$THANOS_DS_NAME"'"/ - s/"serviceName": *"[^"]*"/"serviceName": "'"$thanos_service"'"/ + s/"name": *"[^"]*"/"name": "'"$DS2_NAME"'"/ + s/"serviceName": *"[^"]*"/"serviceName": "'"$ds2_service"'"/ } ' "$YAML_FILE" From 0ec5ac995f33176b38ea9902c665e50c3aeb130b Mon Sep 17 00:00:00 2001 From: Saad Khan Date: Tue, 17 Mar 2026 14:23:04 +0530 Subject: [PATCH 2/6] skip authentication-test in case of minikube/kind Signed-off-by: Saad Khan --- .../local_monitoring_tests/authentication_tests.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/scripts/local_monitoring_tests/authentication_tests.sh b/tests/scripts/local_monitoring_tests/authentication_tests.sh index c593ca2870..5701e902f3 100644 --- a/tests/scripts/local_monitoring_tests/authentication_tests.sh +++ b/tests/scripts/local_monitoring_tests/authentication_tests.sh @@ -33,7 +33,15 @@ tokens=( ["empty"]="" ) # Tests to validate authentication types in Kruize +# Note: Skipped on minikube/kind - the minikube YAML has no datasource authentication block, +# and Prometheus on minikube typically does not require bearer auth. These tests only apply +# to OpenShift where Prometheus enforces OAuth/bearer token authentication. function authentication_tests() { + if [ "$cluster_type" == "minikube" ] || [ "$cluster_type" == "kind" ]; then + echo "Skipping authentication_tests: datasource auth is not configured on ${cluster_type} (Prometheus does not require bearer token)." + return 0 + fi + start_time=$(get_date) FAILED_CASES=() TESTS=0 From a5ba913d4088f6d6914c2743fd403082077ce483 Mon Sep 17 00:00:00 2001 From: Saad Khan Date: Thu, 14 May 2026 12:15:59 +0530 Subject: [PATCH 3/6] update script to exit with 0 and 1 based on the result Signed-off-by: Saad Khan --- tests/scripts/local_monitoring_tests/datasource_tests.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/scripts/local_monitoring_tests/datasource_tests.sh b/tests/scripts/local_monitoring_tests/datasource_tests.sh index 614cd8a437..89ab143819 100644 --- a/tests/scripts/local_monitoring_tests/datasource_tests.sh +++ b/tests/scripts/local_monitoring_tests/datasource_tests.sh @@ -138,6 +138,13 @@ function datasource_tests() { # print the testsuite summary testsuitesummary ${FUNCNAME} "${elapsed_time}" ${FAILED_CASES} + + # Exit with appropriate code: 0 on success, 1 on failure + if [ "${TESTS_FAILED}" -ne "0" ]; then + exit 1 + else + exit 0 + fi } run_datasource_scenario() { From ad046b2946d2549f80a6a43c80c83ccea6e061dc Mon Sep 17 00:00:00 2001 From: Saad Khan Date: Thu, 14 May 2026 12:27:12 +0530 Subject: [PATCH 4/6] update auth-tests to exit with 0 and 1 based on the result Signed-off-by: Saad Khan --- .../scripts/local_monitoring_tests/authentication_tests.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/scripts/local_monitoring_tests/authentication_tests.sh b/tests/scripts/local_monitoring_tests/authentication_tests.sh index 5701e902f3..1664835011 100644 --- a/tests/scripts/local_monitoring_tests/authentication_tests.sh +++ b/tests/scripts/local_monitoring_tests/authentication_tests.sh @@ -108,6 +108,13 @@ function authentication_tests() { # print the testsuite summary testsuitesummary ${FUNCNAME} "${elapsed_time}" ${FAILED_CASES} + + # Exit with appropriate code: 0 on success, 1 on failure + if [ "${TESTS_FAILED}" -ne "0" ]; then + exit 1 + else + exit 0 + fi } # Deploy app and check pod status From a036bfc8cd40c285af458cc4ec5dbb6a73ac92d6 Mon Sep 17 00:00:00 2001 From: Saad Khan Date: Wed, 20 May 2026 11:38:27 +0530 Subject: [PATCH 5/6] move ds and auth tests into a new dir Signed-off-by: Saad Khan --- tests/README.md | 81 +++++++++++++++++++ .../authentication_tests.sh | 19 ++--- .../datasource_tests.sh | 17 ++-- .../Local_monitoring_tests.md | 79 ------------------ tests/test_autotune.sh | 4 +- 5 files changed, 96 insertions(+), 104 deletions(-) rename tests/{scripts/local_monitoring_tests => config_tests}/authentication_tests.sh (90%) rename tests/{scripts/local_monitoring_tests => config_tests}/datasource_tests.sh (93%) diff --git a/tests/README.md b/tests/README.md index eee618fdd8..d6101c78c0 100644 --- a/tests/README.md +++ b/tests/README.md @@ -36,6 +36,87 @@ Here we test Kruize [Local monitoring APIs](/design/KruizeLocalAPI.md). For details refer this [doc](/tests/scripts/local_monitoring_tests/Local_monitoring_tests.md) +### Authentication Test: + +Kruize 0.2 onwards supports the authentication which provides the user an option to pass authentication details in the YAML for the service they are using. + +The authentication test is a standalone shell-based test. It contains various valid and invalid scenarios for testing. + +It can be run directly from the shell test location, for example: + +`tests/config_tests/authentication_tests.sh` + +#### Scenarios +**_valid_**: a valid path to the token + +**_expired_**: an expired token value + +**_invalid_**: an invalid path to the token + +**_empty_**: a blank input in place of the token file path + +### Datasource Availability/Serviceability Test: + +Kruize supports multiple datasources such as Prometheus and Thanos Querier. During startup, Kruize validates the reachability of all configured datasources before proceeding. + +The datasource availability/serviceability test is a standalone shell-based test and is not part of the pytest-based functional/local monitoring suite. +It validates Kruize behavior when one or more datasources are reachable or unreachable. + +Kruize startup behavior follows these rules: + +* Kruize continues startup if at least one datasource is reachable. +* Kruize logs an error for each unreachable datasource. +* Kruize fails startup only when all configured datasources are unreachable. + +The test can be run using the command below: + +``` +./test_autotune.sh -c -i --testsuite=datasource_tests +``` + +#### Scenarios + +Both cluster types support multiple datasources. Scenarios vary by which datasources are in the cluster YAML: +- **OpenShift:** YAML has Prometheus + Thanos (both available in cluster) +- **Minikube/Kind:** YAML has Prometheus only (Thanos not running; multiple Prometheus datasources are also valid) + +**both-valid** (OpenShift) + +Both datasources are reachable. + +**✔ Expected:** Kruize starts successfully. + +**valid-invalid** (OpenShift) + +Datasource 1 is reachable, datasource 2 is unreachable. + +**✔ Expected:** Kruize starts successfully and logs an error for datasource 2. + +**invalid-valid** (OpenShift) + +Datasource 1 is unreachable, datasource 2 is reachable. + +**✔ Expected:** Kruize starts successfully and logs an error for datasource 1. + +**both-invalid** (OpenShift) + +Both datasources are unreachable. + +**❌ Expected:** Kruize fails to start and exits with an error. + +**valid** (Minikube/Kind) + +Datasource is reachable. + +**✔ Expected:** Kruize starts successfully. + +**invalid** (Minikube/Kind) + +Datasource is unreachable. + +**❌ Expected:** Kruize fails to start and exits with an error. + + ## Supported Clusters - Minikube, Openshift diff --git a/tests/scripts/local_monitoring_tests/authentication_tests.sh b/tests/config_tests/authentication_tests.sh similarity index 90% rename from tests/scripts/local_monitoring_tests/authentication_tests.sh rename to tests/config_tests/authentication_tests.sh index 1664835011..0c37bfcfd4 100644 --- a/tests/scripts/local_monitoring_tests/authentication_tests.sh +++ b/tests/config_tests/authentication_tests.sh @@ -17,10 +17,10 @@ # # Get the path of the test dir -LOCAL_MONITORING_TEST_DIR="${KRUIZE_REPO}/tests/scripts/local_monitoring_tests" +CONFIG_TEST_DIR="${KRUIZE_REPO}/tests/config_tests" # Source the common functions scripts -. ${LOCAL_MONITORING_TEST_DIR}/../common/common_functions.sh +. ${KRUIZE_REPO}/tests/scripts/common/common_functions.sh APP_DEPLOYMENT="kruize" @@ -64,10 +64,10 @@ function authentication_tests() { if [ "$cluster_type" == "minikube" ] || [ "$cluster_type" == "kind" ]; then NAMESPACE="monitoring" - YAML_FILE="${LOCAL_MONITORING_TEST_DIR}/../../../manifests/crc/default-db-included-installation/minikube/kruize-crc-minikube.yaml" + YAML_FILE="${KRUIZE_REPO}/manifests/crc/default-db-included-installation/minikube/kruize-crc-minikube.yaml" elif [ "$cluster_type" == "openshift" ]; then NAMESPACE="openshift-tuning" - YAML_FILE="${LOCAL_MONITORING_TEST_DIR}/../../../manifests/crc/default-db-included-installation/openshift/kruize-crc-openshift.yaml" + YAML_FILE="${KRUIZE_REPO}/manifests/crc/default-db-included-installation/openshift/kruize-crc-openshift.yaml" else echo "Invalid cluster type found: ${cluster_type}" fi @@ -108,13 +108,6 @@ function authentication_tests() { # print the testsuite summary testsuitesummary ${FUNCNAME} "${elapsed_time}" ${FAILED_CASES} - - # Exit with appropriate code: 0 on success, 1 on failure - if [ "${TESTS_FAILED}" -ne "0" ]; then - exit 1 - else - exit 0 - fi } # Deploy app and check pod status @@ -145,7 +138,7 @@ deploy_and_check_pod() { $kubectl_cmd wait --for=condition=Ready pod -l app=$APP_DEPLOYMENT --timeout=120s > /dev/null # Check pod logs for errors echo "Checking logs for the pod..." - POD_NAME=$($kubectl_cmd get pods | grep 'kruize' | grep -v -E 'kruize-db|kruize-ui' | awk 'NR==1{print $1}') + POD_NAME=$($kubectl_cmd get pods | grep 'kruize' | grep -v -E 'kruize-db|kruize-ui' | awk 'NR==1{print $1}') echo "$kubectl_cmd logs -f ${POD_NAME} > ${POD_LOG} 2>&1 &" $kubectl_cmd logs -f "${POD_NAME}" > "${POD_LOG}" 2>&1 & sleep 10 @@ -196,3 +189,5 @@ update_yaml_with_token() { }' "$YAML_FILE" echo "Updated image in YAML to $KRUIZE_IMAGE" } + +# Made with Bob diff --git a/tests/scripts/local_monitoring_tests/datasource_tests.sh b/tests/config_tests/datasource_tests.sh similarity index 93% rename from tests/scripts/local_monitoring_tests/datasource_tests.sh rename to tests/config_tests/datasource_tests.sh index 89ab143819..26c89b135f 100644 --- a/tests/scripts/local_monitoring_tests/datasource_tests.sh +++ b/tests/config_tests/datasource_tests.sh @@ -17,10 +17,10 @@ # # Get the absolute path of current directory -LOCAL_MONITORING_TEST_DIR="${KRUIZE_REPO}/tests/scripts/local_monitoring_tests" +CONFIG_TEST_DIR="${KRUIZE_REPO}/tests/config_tests" # Source the common functions scripts -. ${LOCAL_MONITORING_TEST_DIR}/../common/common_functions.sh +. ${KRUIZE_REPO}/tests/scripts/common/common_functions.sh APP_DEPLOYMENT="kruize" @@ -67,10 +67,10 @@ function datasource_tests() { echo "" if [ "$cluster_type" == "minikube" ] || [ "$cluster_type" == "kind" ]; then NAMESPACE="monitoring" - YAML_FILE="${LOCAL_MONITORING_TEST_DIR}/../../../manifests/crc/default-db-included-installation/minikube/kruize-crc-minikube.yaml" + YAML_FILE="${KRUIZE_REPO}/manifests/crc/default-db-included-installation/minikube/kruize-crc-minikube.yaml" elif [ "$cluster_type" == "openshift" ]; then NAMESPACE="openshift-tuning" - YAML_FILE="${LOCAL_MONITORING_TEST_DIR}/../../../manifests/crc/default-db-included-installation/openshift/kruize-crc-openshift.yaml" + YAML_FILE="${KRUIZE_REPO}/manifests/crc/default-db-included-installation/openshift/kruize-crc-openshift.yaml" else echo "Invalid cluster type found: ${cluster_type}" return @@ -138,13 +138,6 @@ function datasource_tests() { # print the testsuite summary testsuitesummary ${FUNCNAME} "${elapsed_time}" ${FAILED_CASES} - - # Exit with appropriate code: 0 on success, 1 on failure - if [ "${TESTS_FAILED}" -ne "0" ]; then - exit 1 - else - exit 0 - fi } run_datasource_scenario() { @@ -253,3 +246,5 @@ restore_yaml() { mv "${YAML_FILE}".ds.bak "$YAML_FILE" mv "${YAML_FILE}".ds.bak.image.bak "$YAML_FILE" } + +# Made with Bob diff --git a/tests/scripts/local_monitoring_tests/Local_monitoring_tests.md b/tests/scripts/local_monitoring_tests/Local_monitoring_tests.md index 0cd15275f5..82ea1d9561 100644 --- a/tests/scripts/local_monitoring_tests/Local_monitoring_tests.md +++ b/tests/scripts/local_monitoring_tests/Local_monitoring_tests.md @@ -345,82 +345,3 @@ Else, you can change the workload name and namespace name in the test to match w Note: The test will fail if it's run as is if there are no matching workloads that the test looks for. This test result can be ignored in case of a non-gpu workload -### Authentication Test: - -Kruize 0.2 supports the authentication which provides the user an option to pass authentication details in the yaml for the service they are using. - -The authentication test is part of functional bucket and has a separate script similar to local_monitoring tests. It contains various valid and invalid scenarios for testing. - -It can be run as shown in the example below: - -`/test_autotune.sh -c -i -r benchmarks/ --testsuite=authentication_tests` - -#### Scenarios -**_valid_**: a valid path to the token - -**_expired_**: an expired token value - -**_invalid_**: an invalid path to the token - -**_empty_**: a blank input in place of the token file path - -### Datasource Availability/Serviceability Test: - -Kruize supports multiple datasources such as Prometheus and Thanos Querier. During startup, Kruize validates the reachability of all configured datasources before proceeding. - -The datasource availability/serviceability test is part of the functional test bucket and is implemented as a standalone shell script, similar to the authentication tests. -It validates Kruize behavior when one or more datasources are reachable or unreachable. - -Kruize startup behavior follows these rules: - -* Kruize continues startup if at least one datasource is reachable. -* Kruize logs an error for each unreachable datasource. -* Kruize fails startup only when all configured datasources are unreachable. - -The test can be run using the command below: - -``` -./test_autotune.sh -c -i -r benchmarks/ --testsuite=datasource_tests -``` - -#### Scenarios - -Both cluster types support multiple datasources. Scenarios vary by which datasources are in the cluster YAML: -- **OpenShift:** YAML has Prometheus + Thanos (both available in cluster) -- **Minikube/Kind:** YAML has Prometheus only (Thanos not running; multiple Prometheus datasources are also valid) - -**both-valid** (OpenShift) - -Both datasources are reachable. - -**✔ Expected:** Kruize starts successfully. - -**valid-invalid** (OpenShift) - -Datasource 1 is reachable, datasource 2 is unreachable. - -**✔ Expected:** Kruize starts successfully and logs an error for datasource 2. - -**invalid-valid** (OpenShift) - -Datasource 1 is unreachable, datasource 2 is reachable. - -**✔ Expected:** Kruize starts successfully and logs an error for datasource 1. - -**both-invalid** (OpenShift) - -Both datasources are unreachable. - -**❌ Expected:** Kruize fails to start and exits with an error. - -**valid** (Minikube/Kind) - -Datasource is reachable. - -**✔ Expected:** Kruize starts successfully. - -**invalid** (Minikube/Kind) - -Datasource is unreachable. - -**❌ Expected:** Kruize fails to start and exits with an error. diff --git a/tests/test_autotune.sh b/tests/test_autotune.sh index ef44a5c101..0964a4342c 100755 --- a/tests/test_autotune.sh +++ b/tests/test_autotune.sh @@ -25,8 +25,8 @@ SCRIPTS_DIR="${CURRENT_DIR}/scripts" # Source the test suite scripts . ${SCRIPTS_DIR}/remote_monitoring_tests/remote_monitoring_tests.sh . ${SCRIPTS_DIR}/local_monitoring_tests/local_monitoring_tests.sh -. ${SCRIPTS_DIR}/local_monitoring_tests/authentication_tests.sh -. ${SCRIPTS_DIR}/local_monitoring_tests/datasource_tests.sh +. ${CURRENT_DIR}/config_tests/authentication_tests.sh +. ${CURRENT_DIR}/config_tests/datasource_tests.sh resultsdir="${CURRENT_DIR}" From 5cde551d71f671af67fb732421e322d74d6e864b Mon Sep 17 00:00:00 2001 From: Saad Khan Date: Wed, 20 May 2026 11:47:41 +0530 Subject: [PATCH 6/6] minor cosmetic changes Signed-off-by: Saad Khan --- tests/config_tests/authentication_tests.sh | 4 +--- tests/config_tests/datasource_tests.sh | 2 -- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/tests/config_tests/authentication_tests.sh b/tests/config_tests/authentication_tests.sh index 0c37bfcfd4..df872aefd2 100644 --- a/tests/config_tests/authentication_tests.sh +++ b/tests/config_tests/authentication_tests.sh @@ -138,7 +138,7 @@ deploy_and_check_pod() { $kubectl_cmd wait --for=condition=Ready pod -l app=$APP_DEPLOYMENT --timeout=120s > /dev/null # Check pod logs for errors echo "Checking logs for the pod..." - POD_NAME=$($kubectl_cmd get pods | grep 'kruize' | grep -v -E 'kruize-db|kruize-ui' | awk 'NR==1{print $1}') + POD_NAME=$($kubectl_cmd get pods | grep 'kruize' | grep -v -E 'kruize-db|kruize-ui' | awk 'NR==1{print $1}') echo "$kubectl_cmd logs -f ${POD_NAME} > ${POD_LOG} 2>&1 &" $kubectl_cmd logs -f "${POD_NAME}" > "${POD_LOG}" 2>&1 & sleep 10 @@ -189,5 +189,3 @@ update_yaml_with_token() { }' "$YAML_FILE" echo "Updated image in YAML to $KRUIZE_IMAGE" } - -# Made with Bob diff --git a/tests/config_tests/datasource_tests.sh b/tests/config_tests/datasource_tests.sh index 26c89b135f..4d0d86f76f 100644 --- a/tests/config_tests/datasource_tests.sh +++ b/tests/config_tests/datasource_tests.sh @@ -246,5 +246,3 @@ restore_yaml() { mv "${YAML_FILE}".ds.bak "$YAML_FILE" mv "${YAML_FILE}".ds.bak.image.bak "$YAML_FILE" } - -# Made with Bob