CDCT using Cloud Contract for Python
Producer: https://github.com/TYsewyn/cdct_python_producer
Consumer: https://github.com/TYsewyn/cdct_python_consumer
Contracts: this repo
For our usecase, we need support for messaging. In the consumer-driven contract testing world, the most popular solution is Pact.
Pact for Python has two competing solutions:
- Pact Python
- Pactman
Pact-python does not currently support messaging, although work is ongoing: pact-foundation/pact-python#88
Work has initially started, but has stalled since January (at the time of writing): pact-foundation/pact-python#119
Pactman does not currently support messaging (although they claim to support the Pact specification v3): reecetech/pactman#68
Cloud Contract does support messaging, and now also supports a polyglot solution: https://spring.io/blog/2018/02/13/spring-cloud-contract-in-a-polyglot-world
This repository demonstrates that solution.
git clone git@github.com:TYsewyn/cdct_python_producer.git
cd cdct_python_producer
pip install -r requirements.txt
./run_contract_tests.sh
git clone git@github.com:TYsewyn/cdct_python_consumer.git
cd cdct_python_consumer
./prereqs.sh
pip install -r requirements.txt
./run_test.sh