Skip to content

Commit

Permalink
Squashed 'compatibility-suite/pact-compatibility-suite/' changes from…
Browse files Browse the repository at this point in the history
… d22d4667..416f3a64

416f3a64 Fix grammar in README.md
bb740850 feat: Add interaction description to the published verification results
ec373503 Merge pull request #6 from tienvx/disable-kafka
c693b549 chore: Add @wip tag to Kafka scenario
db548451 Merge pull request #2 from tienvx/remove-duplicated-scenarios
96c35a0c chore: Remove duplicated scenarios

git-subtree-dir: compatibility-suite/pact-compatibility-suite
git-subtree-split: 416f3a64d49bee977b0f404a5ba3002eae570eb3
  • Loading branch information
rholshausen committed Feb 18, 2024
1 parent 3538f7f commit 2089d48
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 23 deletions.
2 changes: 1 addition & 1 deletion 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
21 changes: 0 additions & 21 deletions features/V3/matching_rules.feature
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
1 change: 1 addition & 0 deletions features/V3/message_provider.feature
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
3 changes: 2 additions & 1 deletion fixtures/pact-broker_c2.json
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 2089d48

Please sign in to comment.