github.com/argoproj-labs/argocd-operator@v0.10.0/tests/k8s/1-009_validate_log_level_format/03-check-loglevel.yaml (about)

     1  apiVersion: kuttl.dev/v1beta1
     2  kind: TestStep
     3  commands:
     4  - script: sleep 15
     5  - script: |
     6      set -e
     7      for wl in deployment/argocd-server deployment/argocd-repo-server statefulset/argocd-application-controller; do
     8        wlCommand=$(kubectl get -n $NAMESPACE $wl -o jsonpath='{.spec.template.spec.containers[0].command}'| jq -r '.[]' )
     9        level="debug"
    10        format="json"
    11        if ! echo "$wlCommand" | grep -qPz -- "--loglevel\\n$level(\$|\\n)"; then
    12          echo "logLevel was not set correctly for $wl"
    13          echo "CWD: $wlCommand"
    14          exit 1
    15        fi
    16        if ! echo "$wlCommand" | grep -qPz -- "--logformat\\n$format(\$|\\n)"; then
    17          echo "logFormat was not set correctly for $wl"
    18          echo "CWD: $wlCommand"
    19          exit 1
    20        fi
    21      done