Skip to content

Commit

Permalink
Merge commit 'fa1f85fd4e37374d207e14f69984cb332c61e6dc'
Browse files Browse the repository at this point in the history
  • Loading branch information
rholshausen committed Feb 19, 2024
2 parents f5cc823 + fa1f85f commit 30c462b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 23 deletions.
2 changes: 1 addition & 1 deletion compatibility-suite/pact-compatibility-suite/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Set of BDD style tests to check compatibility between Pact implementations.
This repository contains the BDD features for verifying a Pact implementation. It requires the [Cucumber BDD](https://cucumber.io/) test tool to execute.

## Adding it to a project
The easyest way to add the suite to a project to to create a compatibility-suite subdirectory and then use the Git subtree command to pull the features and fixtures.
The easiest way to add the suite to a project to create a compatibility-suite subdirectory and then use the Git subtree command to pull the features and fixtures.
The project then needs the steps to be implemented to get the features to pass.

Recommend project layout:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,27 +32,6 @@ Feature: V3 era Matching Rules
Then the comparison should NOT be OK
And the mismatches will contain a mismatch with error "$.one" -> "Expected 'dog' to include 'a'"

Scenario: Supports an include matcher (positive case)
Given an expected request configured with the following:
| body | matching rules |
| file: basic.json | include-matcher-v3.json |
And a request is received with the following:
| body |
| JSON: { "one": "cat", "two": "b" } |
When the request is compared to the expected one
Then the comparison should be OK

Scenario: Supports an include matcher (negative case)
Given an expected request configured with the following:
| body | matching rules |
| file: basic.json | include-matcher-v3.json |
And a request is received with the following:
| body |
| JSON: { "one": "dog", "two": "b" } |
When the request is compared to the expected one
Then the comparison should NOT be OK
And the mismatches will contain a mismatch with error "$.one" -> "Expected 'dog' to include 'a'"

Scenario: Supports a minmax type matcher (positive case)
Given an expected request configured with the following:
| body | matching rules |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ Feature: Message provider
Then the verification will NOT be successful
And the verification results will contain a "Body had differences" error

@wip
Scenario: Supports messages with body formatted for the Kafka schema registry
Given a provider is started that can generate the "kafka" message with "file: kafka-body.xml"
And a Pact file for "kafka":"file: kafka-expected-body.xml" is to be verified
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@
"testResults": [
{
"interactionId": "ID1",
"interactionDescription":"ID1",
"mismatches": [
{
"attribute": "status",
Expand Down Expand Up @@ -334,7 +335,7 @@
}
]
},
"$.testResults[*].interactionId": {
"$.testResults.*": {
"combine": "AND",
"matchers": [
{
Expand Down

0 comments on commit 30c462b

Please sign in to comment.