From c0f4b3de8b9a480a24337a39344df7ff03bacd4c Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: May 22 2019 08:23:49 +0000 Subject: [beaker-tests] use jq instead of grep With jq it doesn't matter whether the input is pretty-printed, or e.g. written on single line. --- diff --git a/beaker-tests/Sanity/copr-cli-basic-operations/runtest-custom-method.sh b/beaker-tests/Sanity/copr-cli-basic-operations/runtest-custom-method.sh index 6b5af0d..a89d3fc 100755 --- a/beaker-tests/Sanity/copr-cli-basic-operations/runtest-custom-method.sh +++ b/beaker-tests/Sanity/copr-cli-basic-operations/runtest-custom-method.sh @@ -155,7 +155,7 @@ rlJournalStart rlLogInfo "Still should fail, since this build is not triggered by webhook." rlRun 'copr watch-build $BUILD_ID' 4 - copr_id=$(curl "$FRONTEND_URL/api_3/project?ownername=$USER&projectname=$PROJECT" | sed -n 's/.*"id": \([0-9]\+\),.*/\1/p') + copr_id=$(curl "$FRONTEND_URL/api_3/project?ownername=$USER&projectname=$PROJECT" | jq '.id') trigger_url="$FRONTEND_URL/webhooks/custom/$copr_id/webhook_secret/quick-package/" rlRun -s 'curl -I "$trigger_url"' 0 # GET can't work rlRun 'check_http_status 405'