From 2089d48da8678eafebde4de72e9af3b09a6feb05 Mon Sep 17 00:00:00 2001 From: Ronald Holshausen Date: Mon, 19 Feb 2024 08:39:46 +1100 Subject: [PATCH] Squashed 'compatibility-suite/pact-compatibility-suite/' changes from 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 --- README.md | 2 +- features/V3/matching_rules.feature | 21 --------------------- features/V3/message_provider.feature | 1 + fixtures/pact-broker_c2.json | 3 ++- 4 files changed, 4 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 007ca2fcf..955ac495d 100644 --- a/README.md +++ b/README.md @@ -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: diff --git a/features/V3/matching_rules.feature b/features/V3/matching_rules.feature index 20e2ad29f..7dd079d77 100644 --- a/features/V3/matching_rules.feature +++ b/features/V3/matching_rules.feature @@ -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 | diff --git a/features/V3/message_provider.feature b/features/V3/message_provider.feature index 3423afd2c..5cebd8ce5 100644 --- a/features/V3/message_provider.feature +++ b/features/V3/message_provider.feature @@ -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 diff --git a/fixtures/pact-broker_c2.json b/fixtures/pact-broker_c2.json index d9b533faa..e2efca419 100644 --- a/fixtures/pact-broker_c2.json +++ b/fixtures/pact-broker_c2.json @@ -283,6 +283,7 @@ "testResults": [ { "interactionId": "ID1", + "interactionDescription":"ID1", "mismatches": [ { "attribute": "status", @@ -334,7 +335,7 @@ } ] }, - "$.testResults[*].interactionId": { + "$.testResults.*": { "combine": "AND", "matchers": [ {