Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/v2 consumer suite #546

Merged
merged 3 commits into from
Feb 8, 2024
Merged

Feat/v2 consumer suite #546

merged 3 commits into from
Feb 8, 2024

Conversation

JP-Ellis
Copy link
Contributor

@JP-Ellis JP-Ellis commented Feb 8, 2024

📝 Summary

This consists of two main changes:

  • On the feature front, the addition of with_matching_rules to the Interaction. This allows for matching rules to be explicitly given, without the need to pass the matching rule JSON format to one of the other with_* functions.
  • The implementation of the v2/consumer compatibility suite, which makes use of the new with_matching_rules.

🚨 Breaking Changes

🔥 Motivation

Another step towards the compatibility suite being implemented

🔨 Test Plan

Compatibility suite, as part of CI/CD

🔗 Related issues/PRs

With the upgrade to the Pact FFI library, it is now possible to set
matching rules directly during the Pact definition. These will be
leveraged during the `v2` compatibility suite tests.

Signed-off-by: JP-Ellis <[email protected]>
As most of the BDD steps are shared across the V1 and V2 suites, all of
the steps have been migrated into a shared module. Due to the way
PyTest-BDD inserts and resolves these steps, the general pattern of:

```python
def outer(stacklevel: int=1):
    @when/given/then(..., stacklevel=stacklevel + 1)
    def _():
        ...
```

is required; otherwise, the steps are not available.

This commit also includes the addition of a Markdown table parser, and a
few minor changes in preparation to the V2 suite (as this commit was
created following the implementation of the full V2 consumer suite).

Signed-off-by: JP-Ellis <[email protected]>
@JP-Ellis JP-Ellis merged commit 928f478 into master Feb 8, 2024
32 of 38 checks passed
@JP-Ellis JP-Ellis deleted the feat/v2-consumer-suite branch February 8, 2024 02:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

v2/http_consumer.feature
1 participant