Skip to content

Commit

Permalink
Skip 0-to-1 test due to KEDA
Browse files Browse the repository at this point in the history
  • Loading branch information
iamazeem committed Feb 22, 2024
1 parent dbfe93f commit 804e703
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion test/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ metadata:
name: test-app1
namespace: cwm-keda-external-scaler-ns
spec:
replicas: 0
replicas: 1
selector:
matchLabels:
app: test-app1
Expand Down
30 changes: 15 additions & 15 deletions test/run_scaling_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 804e703

Please sign in to comment.