Skip to content

test(compat-suite): add v4 plugin scenarios - #4

Draft
YOU54F wants to merge 2 commits into
mainfrom
feat/compat-suite-plugins
Draft

YOU54F wants to merge 2 commits into
mainfrom
feat/compat-suite-plugins

Conversation

@YOU54F

@YOU54F YOU54F commented Oct 29, 2026 •

Copy link
Copy Markdown
Owner

Summary

Adds the V4 plugin features to the pact-python compatibility suite: tests/compatibility_suite/test_v4_plugins.py.

A pytest_bdd_apply_tag hook in conftest.py stops the @plugin:*/@transport:* tags becoming unknown markers.

Depends on the suite branch feat/plugin-features (YOU54F/pact-compatibility-suite#1). Its features are read from PACT_COMPAT_SUITE, and the run is skipped when that is unset or has no features/V4/plugins. Needs plugins matt 0.1.1, csv 0.0.6, avro 0.1.3 and protobuf 0.8.0 installed.

PACT_COMPAT_SUITE=/path/to/pact-compatibility-suite pytest tests/compatibility_suite/test_v4_plugins.py

Results

  • 48/48 pass against released FFI. No src/ changes.
  • The existing suite is unchanged: 167 pass.

Limitations

  • with_plugin/with_plugin_contents are generic, but there's no public API for plugin-transport mock servers or raw mismatches. The runner uses pact_ffi.create_mock_server_for_transport and mock_server_mismatches through the private Pact._handle.
  • using_plugin load errors leave out the reason, so the runner appends get_error_message().
  • The protobuf mock server listens on ::1 only.

Core suite gaps (not in this PR): 12 skipped, 12 scenarios not collected

  • 4 broker scenarios need --container.
  • 6 V3 matching rules are marked "waiting on upstream FFI/suite": coerce, significant digits, number negative.
  • Kafka schema registry: "currently unable to implement".
  • Provider-state generator: implemented outside pytest-bdd.
  • Not collected: V4/synchronous_message_consumer (11) and V4/v4 (1).

CI

.github/workflows/compat-plugins.yml checks out YOU54F/pact-compatibility-suite@feat/plugin-features (overridable with workflow_dispatch inputs suite-repository/suite-ref), installs matt 0.1.1, csv 0.0.6, avro 0.1.3 and protobuf 0.8.0, and runs the 48 plugin scenarios with PACT_COMPAT_SUITE set. It has no PR base filter and runs on drafts, unlike test.yml.

It pins pytest<9.2: pytest-bdd 9.0 calls FixtureManager._arg2fixturedefs, which pytest 9.2 removed. The same break probably affects test.yml.

🤖 Generated with Claude Code

Run the V4 plugin features (HTTP, async/sync messages, lifecycle and
plugin transports) from an external compatibility suite checkout given by
PACT_COMPAT_SUITE. The module is skipped when the variable is unset or the
features are missing, and @wip scenarios are not collected.

Plugin and transport tags are not turned into pytest markers, as tags like
`@plugin:matt` are not valid marker names.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds a workflow that checks out the suite branch with features/V4/plugins
(YOU54F/pact-compatibility-suite#1), installs the matt, csv, avro and
protobuf plugins with the Pact CLI, and runs test_v4_plugins.py. It runs on
draft PRs and PRs to any base, which test.yml skips.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

1 participant