You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm a bit confused about the instructions for having multiple pacts. The README states:
During a test run you're likely to need to write multiple pact interactions for a consumer/provider relationship. pactman will manage the pact file as follows:
...
These instructions make sense if you're trying to split up the same Consumer-Provider relationship into several test files in the same module. But it seems like this applies to having multiple different Consumer-Provider relationships as well - the behavior I am seeing is that only one of my pacts will get created when I run pytest, even though I have two different Consumer-Provider relationships.
This behavior can be seen here in this repo: https://github.com/atra2396/pactman-demo
If you go to the "CatalogService" folder, you will see what I mean; I have two files defining two different relationships (Catalog -> Accounting, and Catalog -> Inventory). But if you run make up && make create-pacts, only the Catalog -> Accounting pact gets created.
I am not adept at writing Python so maybe I am missing something obvious here, I apologize in advance if that's the case. My organization has been considering implementing contract testing in some fashion for a while now, and so far this library seems to be exactly what we'd need to get started. Thank you for all your hard work!
The text was updated successfully, but these errors were encountered:
atra2396
changed the title
Multiple pacts per consumer
Multiple pacts for different consumer-provider pairs seem to ovewrite each other
Jul 22, 2021
atra2396
changed the title
Multiple pacts for different consumer-provider pairs seem to ovewrite each other
Multiple pacts for different consumer-provider pairs seem to overwrite each other
Jul 22, 2021
I'm a bit confused about the instructions for having multiple pacts. The README states:
These instructions make sense if you're trying to split up the same Consumer-Provider relationship into several test files in the same module. But it seems like this applies to having multiple different Consumer-Provider relationships as well - the behavior I am seeing is that only one of my pacts will get created when I run pytest, even though I have two different Consumer-Provider relationships.
This behavior can be seen here in this repo: https://github.com/atra2396/pactman-demo
If you go to the "CatalogService" folder, you will see what I mean; I have two files defining two different relationships (Catalog -> Accounting, and Catalog -> Inventory). But if you run
make up && make create-pacts
, only the Catalog -> Accounting pact gets created.I am not adept at writing Python so maybe I am missing something obvious here, I apologize in advance if that's the case. My organization has been considering implementing contract testing in some fashion for a while now, and so far this library seems to be exactly what we'd need to get started. Thank you for all your hard work!
The text was updated successfully, but these errors were encountered: