diff --git a/tests/k8s/1-014_validate_parallelism_limit/02-check-deployment.yaml b/tests/k8s/1-014_validate_parallelism_limit/02-check-deployment.yaml index b60954eb0..3eceece64 100644 --- a/tests/k8s/1-014_validate_parallelism_limit/02-check-deployment.yaml +++ b/tests/k8s/1-014_validate_parallelism_limit/02-check-deployment.yaml @@ -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 \ No newline at end of file + fi + if ! echo "$wlCommand" | grep -Fxq -- "$expected"; then + echo "Incorrect value for --kubectl-parallelism-limit detected." + echo "$wlCommand" + exit 1 + fi diff --git a/tests/k8s/1-014_validate_parallelism_limit/04-check-deployment.yaml b/tests/k8s/1-014_validate_parallelism_limit/04-check-deployment.yaml index edbdbe5eb..987657321 100644 --- a/tests/k8s/1-014_validate_parallelism_limit/04-check-deployment.yaml +++ b/tests/k8s/1-014_validate_parallelism_limit/04-check-deployment.yaml @@ -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 \ No newline at end of file diff --git a/tests/k8s/1-014_validate_parallelism_limit/06-check-deployment.yaml b/tests/k8s/1-014_validate_parallelism_limit/06-check-deployment.yaml index 753984460..7548a4525 100644 --- a/tests/k8s/1-014_validate_parallelism_limit/06-check-deployment.yaml +++ b/tests/k8s/1-014_validate_parallelism_limit/06-check-deployment.yaml @@ -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 \ No newline at end of file