Arnold Simha
06/27/2024, 8:21 AMMatt (pactflow.io / pact-js / pact-go)
In the when I publish the contracts and integrations, I get 2 integrations (this is very logical).It’s the same set of apps talking to each other, so it’s possible for it only to be one. If using V4 of the pact spec, there should be one consumer contract with both HTTP and messages If you are using an older spec version, then technically you can’t have both in the same pact file and you would need to map to two different integrations
Matt (pactflow.io / pact-js / pact-go)
Consumer
-> HTTP Provider
Consumer
-> Messaging Provider
then if it’s mapped as two integrations, you would need to call can-i-deploy
(I think this is what you meant?) once on the consumer side (because PactFlow would automatically detect the dependencies) and twice on the provider side, one for each logical name of the providerArnold Simha
06/29/2024, 7:47 PMMatt (pactflow.io / pact-js / pact-go)
Arnold Simha
06/30/2024, 6:36 AMvar pact = Pact.V3("Cart API", "Products API", pactConfig);
_pactBuilder = pact.WithHttpInteractions();
This is a messaging integration file
var pact = Pact.V3("Cart API", "Products API", pactConfig);
_pactBuilder = pact.WithMessageInteractions();
When I run it, I get the following error.
The reason for it is that all the tests run in parallel, so you can't create the same file with the same name in parallel.
Test method Cart.API.Tests.ProductsEventsTests.ReceiveSomeProductsEvents threw exception:
PactNet.Exceptions.PactMessageConsumerVerificationException: The message could not be verified by the consumer handler ---> System.InvalidOperationException: The pact file could not be written
at PactNet.Drivers.AbstractPactDriver.WritePactFile(String directory)
at PactNet.ConfiguredMessageVerifier.Verify[T](Action`1 handler)
--- End of inner exception stack trace ---
at PactNet.ConfiguredMessageVerifier.Verify[T](Action`1 handler)
at Cart.API.Tests.ProductsEventsTests.ReceiveSomeProductsEvents() in /Users/arnoldsi/Desktop/dev/Pact-Demo/poc-pactflow-consumer-1/Cart.API.Tests/ProductsEventsTests.cs:line 39.
Matt (pactflow.io / pact-js / pact-go)
The reason for it is that all the tests run in parallel, so you can’t create the same file with the same name in parallel.Are you sure this is true? The underlying core knows how to put file locks etc. in place, so this (parallel tests) should be allowed
Arnold Simha
07/01/2024, 4:23 PMArnold Simha
07/01/2024, 4:27 PMMatt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Arnold Simha
07/02/2024, 8:36 AMArnold Simha
07/02/2024, 9:03 AMMatt (pactflow.io / pact-js / pact-go)