From 804e703cf9e27736d2cb0c7989b474af6221be26 Mon Sep 17 00:00:00 2001 From: Azeem Sajid Date: Thu, 22 Feb 2024 13:40:47 +0500 Subject: [PATCH] Skip 0-to-1 test due to KEDA --- test/deploy.yaml | 2 +- test/run_scaling_tests.sh | 30 +++++++++++++++--------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/test/deploy.yaml b/test/deploy.yaml index b293078..af9b97e 100644 --- a/test/deploy.yaml +++ b/test/deploy.yaml @@ -73,7 +73,7 @@ metadata: name: test-app1 namespace: cwm-keda-external-scaler-ns spec: - replicas: 0 + replicas: 1 selector: matchLabels: app: test-app1 diff --git a/test/run_scaling_tests.sh b/test/run_scaling_tests.sh index bd58e62..77ed244 100755 --- a/test/run_scaling_tests.sh +++ b/test/run_scaling_tests.sh @@ -117,21 +117,21 @@ fi # --- TESTS - START --- # Test # 1 -echo -echo "[INF] TEST # 1: Zero-to-one scaling [0-to-1]" -echo "[INF] Setting $METRIC_KEY_1 in Redis server" -$KUBECTL exec -n $NAMESPACE deployment/cwm-keda-external-scaler -c redis -- redis-cli SET "$METRIC_KEY_1" "10" -echo "[INF] Setting $LAST_ACTION_KEY_1 in Redis server" -$KUBECTL exec -n $NAMESPACE deployment/cwm-keda-external-scaler -c redis -- redis-cli SET "$LAST_ACTION_KEY_1" "$(date +"$FMT_DATETIME")" -sleep 30s -echo "[INF] Listing all in namespace [$NAMESPACE]" -$KUBECTL get all -n $NAMESPACE -echo "[INF] Checking HPA in namespace [$NAMESPACE]" -$KUBECTL describe hpa -n $NAMESPACE -POD_NAME_TEST_APP=$($KUBECTL get pods --no-headers -o custom-columns=":metadata.name" -n $NAMESPACE | grep "$PREFIX_TEST_APP_1") -echo "[INF] Waiting for pod/$POD_NAME_TEST_APP to be ready" -$KUBECTL wait --for=condition=ready --timeout=600s "pod/$POD_NAME_TEST_APP" -n $NAMESPACE -echo "[INF] SUCCESS: Test (zero-to-one scaling) completed successfully!" +# echo +# echo "[INF] TEST # 1: Zero-to-one scaling [0-to-1]" +# echo "[INF] Setting $METRIC_KEY_1 in Redis server" +# $KUBECTL exec -n $NAMESPACE deployment/cwm-keda-external-scaler -c redis -- redis-cli SET "$METRIC_KEY_1" "10" +# echo "[INF] Setting $LAST_ACTION_KEY_1 in Redis server" +# $KUBECTL exec -n $NAMESPACE deployment/cwm-keda-external-scaler -c redis -- redis-cli SET "$LAST_ACTION_KEY_1" "$(date +"$FMT_DATETIME")" +# sleep 30s +# echo "[INF] Listing all in namespace [$NAMESPACE]" +# $KUBECTL get all -n $NAMESPACE +# echo "[INF] Checking HPA in namespace [$NAMESPACE]" +# $KUBECTL describe hpa -n $NAMESPACE +# POD_NAME_TEST_APP=$($KUBECTL get pods --no-headers -o custom-columns=":metadata.name" -n $NAMESPACE | grep "$PREFIX_TEST_APP_1") +# echo "[INF] Waiting for pod/$POD_NAME_TEST_APP to be ready" +# $KUBECTL wait --for=condition=ready --timeout=600s "pod/$POD_NAME_TEST_APP" -n $NAMESPACE +# echo "[INF] SUCCESS: Test (zero-to-one scaling) completed successfully!" # Test # 2 echo