-
Notifications
You must be signed in to change notification settings - Fork 137
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
V1 provider compatibility suite #631
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Most of the publish option arguments are optional, but the initial implementation had these as compulsory. Signed-off-by: JP-Ellis <[email protected]>
The username and password authentication are passed through other arguments. Signed-off-by: JP-Ellis <[email protected]>
Signed-off-by: JP-Ellis <[email protected]>
These functions do not really belong to the class, and there's now a need for them to be called directly. Signed-off-by: JP-Ellis <[email protected]>
Required for the provider state callbacks. Signed-off-by: JP-Ellis <[email protected]>
This introduces a few important changes to the interaction definition: - Addition of `response_headers` - Support for the response status code through either the `response` or `status` kwargs - Combining the response content type and body to reflect the same logic as with the request body and content type. - A new `add_to_flask` method (akin to `add_to_pact`) which defines the interaction for a Flask app. Signed-off-by: JP-Ellis <[email protected]>
This is a utility function which is required in order to pass certain arguments between the test suite, and the Flask app running in a separate process. Signed-off-by: JP-Ellis <[email protected]>
Signed-off-by: JP-Ellis <[email protected]>
Signed-off-by: JP-Ellis <[email protected]>
JP-Ellis
added
difficulty:hard
A task requiring a lot of work and an in-depth understanding of the codebase
area:tests
Relating to the testing
area:v3
Relating to the pact.v3 module
type:chore
Part of regular code upkeep
labels
Mar 20, 2024
Signed-off-by: JP-Ellis <[email protected]>
Following recommendations from Ron, making the check a no-op. Ref: pact-foundation/pact-reference#404 Signed-off-by: JP-Ellis <[email protected]>
JP-Ellis
force-pushed
the
chore/v1-provider-compatibility-suite
branch
2 times, most recently
from
March 21, 2024 08:38
47c86a7
to
90f5321
Compare
As the provider is launched in its own Python process, logging is not configured. So instead of using various `logging` methods, directly write to `stderr`. Signed-off-by: JP-Ellis <[email protected]>
JP-Ellis
force-pushed
the
chore/v1-provider-compatibility-suite
branch
from
March 21, 2024 09:02
90f5321
to
4b45588
Compare
Signed-off-by: JP-Ellis <[email protected]>
JP-Ellis
force-pushed
the
chore/v1-provider-compatibility-suite
branch
3 times, most recently
from
March 22, 2024 01:13
a67d66c
to
d46243c
Compare
The initial implementation of the compatibility suite spun up and down the Pact Broker for each scenario, which also resulting in flaky tests in CI. This refactor uses a session pytest fixture which will spin up the broker once, and keep re-using it. Functionality to 'reset' the broker between tests has also been added. Signed-off-by: JP-Ellis <[email protected]>
Signed-off-by: JP-Ellis <[email protected]>
JP-Ellis
force-pushed
the
chore/v1-provider-compatibility-suite
branch
from
March 22, 2024 01:27
d46243c
to
5addbc1
Compare
Some tests are failing. I can identify two causes:
I am merging this, knowing that the tests are currently failing. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area:tests
Relating to the testing
area:v3
Relating to the pact.v3 module
difficulty:hard
A task requiring a lot of work and an in-depth understanding of the codebase
type:chore
Part of regular code upkeep
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📝 Summary
Implement the
V1/http_provider
compatibility suite.The majority of the changes are restricted to the tests folder, though a couple of fixes to the
v3
module have been introduced (see individual commits).🚨 Breaking Changes🔥 Motivation
Ensure consistency with other Pact implementations.
🔨 Test Plan
Through CI
🔗 Related issues/PRs
v1/http_provider.feature
#469