Fix st2-self-check script reporting success on failed runs
When the test run contains several nested workflows the script assumes it's succeeded if at least single sub-workflow was successful.
Instead of that, the check should refer to the parent workflow "status: succeeded".
@@ -140,7 +140,7 @@ do
START_TS=$(date +%s)
OUTPUT=$(st2 run ${TEST} protocol=${PROTOCOL} token=${ST2_AUTH_TOKEN})
- echo ${OUTPUT} | grep "status" | grep -q "succeeded"
+ echo ${OUTPUT} | grep -q "status: 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 "status" | grep -q "succeeded"
+ echo ${OUTPUT} | grep -q "status: succeeded"
EXIT_CODE=$?
END_TS=$(date +%s)
DURATION=$(expr ${END_TS} - ${START_TS})
