-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'shen-sat-54/Support_webhook_upsert'
- Loading branch information
Showing
11 changed files
with
539 additions
and
227 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
lib/pact_broker/client/cli/create_or_update_webhook_long_desc.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Create a curl command that executes the request that you want your webhook to execute, then replace "curl" with "pact-broker create-or-update-webhook" and add the consumer, provider, event types and broker details. Note that the URL must be the first parameter when executing create-webhook and a uuid must also be provided. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
spec/lib/pact_broker/client/cli/broker_create_or_update_webhook_spec.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
require 'pact_broker/client/cli/broker' | ||
require 'pact_broker/client/webhooks/create' | ||
|
||
module PactBroker | ||
module Client | ||
module CLI | ||
describe Broker do | ||
describe "create_or_update_webhook" do | ||
|
||
let(:broker) { Broker.new } | ||
|
||
subject { broker.create_or_update_webhook "http://webhook" } | ||
|
||
it "calls PactBroker::Client::Webhooks::Create with the webhook params" do | ||
expect(broker).to receive(:run_webhook_commands).with("http://webhook") | ||
|
||
subject | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end |
Oops, something went wrong.