Skip to content

Commit

Permalink
[beaker-tests] get copr_id for triggering custom webhok
Browse files Browse the repository at this point in the history
  • Loading branch information
praiskup committed Apr 24, 2019
1 parent 55ff59d commit 030e098
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ rlJournalStart
rlRun 'echo workdir: $WORKDIR'


rlLogInfo "Create the project $PROJECT"
PROJECT=custom-1-$NAME_VAR
rlLogInfo "Create the project $PROJECT"
rlRun 'copr-cli create "$PROJECT" --chroot fedora-rawhide-x86_64'


Expand Down Expand Up @@ -155,6 +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')
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'
Expand Down

0 comments on commit 030e098

Please sign in to comment.