-
-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: use the latest matching pact or verification to test webhook ex…
…ecution, or a placeholder if either is not found
- Loading branch information
Showing
17 changed files
with
294 additions
and
85 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
require 'pact_broker/domain/pact' | ||
|
||
module PactBroker | ||
module Pacts | ||
class PlaceholderPact < PactBroker::Domain::Pact | ||
def initialize | ||
consumer = OpenStruct.new(name: "placeholder-consumer") | ||
@provider = OpenStruct.new(name: "placeholder-provider") | ||
@consumer_version = OpenStruct.new(number: "1", pacticipant: consumer, tags: [OpenStruct.new(name: "master")]) | ||
@consumer_version_number = @consumer_version.number | ||
@created_at = DateTime.now | ||
@revision_number = 1 | ||
@pact_version_sha = "5d445a4612743728dfd99ccd4210423c052bb9db" | ||
end | ||
end | ||
end | ||
end |
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
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 @@ | ||
module PactBroker | ||
module Verifications | ||
class PlaceholderVerification | ||
attr_accessor :id, :number, :success, | ||
:consumer_name, :provider_name, :provider_version, | ||
:provider_version_number, :build_url, | ||
:execution_date, :created_at, :pact_version_sha | ||
|
||
def initialize | ||
@provider_name = "placeholder-provider" | ||
@consumer_name = "placeholder-consumer" | ||
@number = 1 | ||
@success = true | ||
@pact_version_sha = "5d445a4612743728dfd99ccd4210423c052bb9db" | ||
tags = [OpenStruct.new(name: "master")] | ||
@provider_version = OpenStruct.new(number: "aaaabbbbccccddddeeeeffff1111222233334444", tags: tags) | ||
@provider_version_number = @provider_version.number | ||
@execution_date = DateTime.now | ||
@created_at = DateTime.now | ||
end | ||
end | ||
end | ||
end |
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
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
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
Oops, something went wrong.