Make sure the newlines are preserved in the output from the command substitution
```
echo ${OUTPUT}
```
results in entire output being on a single line, which is why it breaks the grep rule at the first place.
Fixes when st2-self-check script reported success on failed runs.
@@ -140,7 +140,7 @@ do
START_TS=$(date +%s)
OUTPUT=$(st2 run ${TEST} protocol=${PROTOCOL} token=${ST2_AUTH_TOKEN})
- echo ${OUTPUT} | grep -q "status: succeeded"
+ echo "${OUTPUT}" | grep "status" | grep -q "succeeded"
EXIT_CODE=$?
END_TS=$(date +%s)
DURATION=$(expr ${END_TS} - ${START_TS})
@@ -159,7 +159,7 @@ if [ ${RUN_ORQUESTA_TESTS} = "true" ]; then
START_TS=$(date +%s)
OUTPUT=$(st2 run examples.orquesta-examples)
- echo ${OUTPUT} | grep -q "status: succeeded"
+ echo "${OUTPUT}" | grep "status" | grep -q "succeeded"
EXIT_CODE=$?
END_TS=$(date +%s)
DURATION=$(expr ${END_TS} - ${START_TS})
