update script test
This commit is contained in:
@@ -109,6 +109,12 @@ echo ""
|
||||
echo "[1/${TOTAL_STEPS}] Listing thresholds"
|
||||
resp="$(request GET "${BASE_URL}/api/v1/alert-thresholds")"
|
||||
assert_status "200" "${resp}"
|
||||
threshold_count="$(jq -r '.data | length' "${resp}")"
|
||||
if [[ "${threshold_count}" -lt 12 ]]; then
|
||||
echo "Expected at least 12 alert thresholds, found ${threshold_count}."
|
||||
exit 1
|
||||
fi
|
||||
echo "OK: ${threshold_count} threshold(s) configured"
|
||||
threshold_id="$(jq -r '.data[] | select(.observationCode=="HEART_RATE") | .id' "${resp}" | head -n 1)"
|
||||
if [[ -z "${threshold_id}" || "${threshold_id}" == "null" ]]; then
|
||||
echo "Could not find HEART_RATE threshold id."
|
||||
|
||||
Reference in New Issue
Block a user