Skip to content

Commit

Permalink
Added sleep
Browse files Browse the repository at this point in the history
  • Loading branch information
ciiay committed Jul 10, 2023
1 parent 1b77f45 commit 9e26139
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tests/ha/1-020_validate_redis_ha_nonha/02-assert.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: kuttl.dev/v1beta1
kind: TestAssert
timeout: 720
timeout: 780
---
apiVersion: v1
kind: Service
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ kind: TestStep
commands:
- script: |
set -e
sleep 30
expected="10"
wlCommand=$(kubectl get -n $NAMESPACE statefulset/argocd-application-controller -o jsonpath='{.spec.template.spec.containers[0].command}'| jq -r '.[]')
if ! echo "$wlCommand" | grep -Fxq -- "--kubectl-parallelism-limit"; then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ kind: TestStep
commands:
- script: |
set -e
sleep 30
expected="20"
wlCommand=$(kubectl get -n $NAMESPACE statefulset/argocd-application-controller -o jsonpath='{.spec.template.spec.containers[0].command}'| jq -r '.[]')
if ! echo "$wlCommand" | grep -Fxq -- "--kubectl-parallelism-limit"; then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ commands:
- script: |
set -e
sleep 15
kubectl patch cm argocd-notifications-cm -n $NAMESPACE --type merge -p '{"data": {"service.email.gmail": "{host: smtp4dev, port: 2525, from: [email protected]}" }}'
14 changes: 14 additions & 0 deletions tests/k8s/1-022_validate_notifications/05-verify-email.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,21 @@ commands:
- script: |
set -e
smtp4dev_pod=$(kubectl get pod -l=app=smtp4dev -o jsonpath='{.items[0].metadata.name}' -n $NAMESPACE)
if [ $? -eq 0 ]; then
echo "Successfully fetched smtp4dev_pod: ${smtp4dev_pod}"
else
echo "Failed to fetch smtp4dev_pod"
exit 1
fi
output=$(kubectl -n $NAMESPACE exec -i "${smtp4dev_pod}" -- /bin/bash -c 'grep -rnw /tmp -e "Subject: Application my-app-3 has been created."')
if [ $? -eq 0 ]; then
echo "Successfully executed command in smtp4dev_pod"
else
echo "Failed to execute command in smtp4dev_pod"
exit 1
fi
if [ -n "$output" ]; then
echo "Email notification received: Application my-app-3 has been created."
exit 0
Expand Down

0 comments on commit 9e26139

Please sign in to comment.