Skip to content

Commit

Permalink
Fix 014 test
Browse files Browse the repository at this point in the history
  • Loading branch information
ciiay committed Jun 8, 2023
1 parent d90af83 commit 3fb86de
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,15 @@ commands:
- script: sleep 30
- script: |
set -e
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 -qPz -- "--kubectl-parallelism-limit\\n${expected}(\$|\\n)"; then
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
echo "Incorrect or missing --kubectl-parallelism-limit detected."
echo "$wlCommand"
exit 1
fi
fi
if ! echo "$wlCommand" | grep -Fxq -- "$expected"; then
echo "Incorrect value for --kubectl-parallelism-limit detected."
echo "$wlCommand"
exit 1
fi
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,15 @@ commands:
- script: sleep 30
- script: |
set -e
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 -qPz -- "--kubectl-parallelism-limit\\n${expected}(\$|\\n)"; then
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
echo "Incorrect or missing --kubectl-parallelism-limit detected."
echo "$wlCommand"
exit 1
fi
if ! echo "$wlCommand" | grep -Fxq -- "$expected"; then
echo "Incorrect value for --kubectl-parallelism-limit detected."
echo "$wlCommand"
exit 1
fi
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,15 @@ commands:
- script: sleep 30
- script: |
set -e
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 -qPz -- "--kubectl-parallelism-limit\\n${expected}(\$|\\n)"; then
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
echo "Incorrect or missing --kubectl-parallelism-limit detected."
echo "$wlCommand"
exit 1
fi
if ! echo "$wlCommand" | grep -Fxq -- "$expected"; then
echo "Incorrect value for --kubectl-parallelism-limit detected."
echo "$wlCommand"
exit 1
fi

0 comments on commit 3fb86de

Please sign in to comment.