feat: added support for message provider using pact broker by pulphix · Pull Request #257 · pact-foundation/pact-python
Added Pact Broker Support for Message Provider Issue #253
This is looking great again! Just one question around the examples tests. I'll need to hook these into CI I think as well. I think I have an example that uses test containers you might want to consider btw.
This is looking great again! Just one question around the examples tests. I'll need to hook these into CI I think as well. I think I have an example that uses test containers you might want to consider btw.
I did change the examples for messages to use a broker docker instance.
In some Etiqa projects, we are using https://github.com/tox-dev/tox-docker
This allows tox to run a docker and run tests against it.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I used this and worked like a charm... anxiously waiting for it to be merged.
| }, | ||
| provider='ContentProvider', | ||
| consumer='DetectContentLambda', | ||
| pact_dir='pacts' |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the pact_dir should not be here anymore and works just fine if you remove it.
| 'A document created successfully': document_created_handler, | ||
| }, | ||
| provider='ContentProvider', | ||
| consumer='DetectContentLambda', |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the consumer should no longer be mandatory because does not make sense since you fetch the data from the pact broker
| return_code, _ = verifier.verify_pacts(pact_files, verbose=False) | ||
| assert (return_code == 0), f'Expected returned_code = 0, actual = {return_code}' | ||
|
|
||
| def verify_with_broker(self, enable_pending=False, include_wip_pacts_since=None, **kwargs): |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this user facing code? It's missing the consumer version selectors. How can we get those supported?
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file contains hidden or 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