I want this statement to keep looping while the value of the json field in this api response is null.
while $(curl --location --request GET "https://example.com/integration-test/results/json"| jq '.result') == null
do
echo "Waiting for Integration tests to finish. Trying again in 10 seconds."
sleep 2
done
The == null obviously doesn't work, but its illustrative of what I'm going for. When the Integration tests finish this api call will instead return SUCCESS or FAILURE in 'result'. Thats when I want the loop to stop.
wget ... | jq ...command that you want to test for? Is it actually going to be the string "null", or just nothing, or something else?