Srikanth Vemuri
05/19/2023, 12:33 PM--filter-state
for set 1 and the same thing for set 2.
Why does the pactflow makes all interactions green check mark, if I run only set 1 interactions?
Is that by design or a bug in pactflow?
@Timothy Jones: Thanks for your response, I don’t see any relation mentioned anywhere in docs on --filter-state
and publish
. We should be able to publish partial interaction in a contract.Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Timothy Jones
05/20/2023, 12:33 AMWe should be able to publish partial interaction in a contract.…why?
Adam Cox
05/22/2023, 12:47 PMsuccess: false
response.
The consumer has two routes in the code, one that uses the method and gets the success response and one that uses the method and gets a failure response and then calls a different method instead.
We have have a contract from the consumer with both the success response and the failure response. We are using provider state to capture whether or not we are expecting the method to be available.
Now we want to verify this contract on the provider side. The contract needs to be verified against two devices with different chips so we are using the provider state filter to get all the interactions for the first chip and then publishing the results. We will then run the verification on the other device with the inverse filter so we can get all of the interactions verified.
Basically, we want to be able to use provider state to know which chip to run the verification against.
We also considered having different provider names for each hardware but seeing as the consumer just thinks of this as a single provider API then it would push the responsibility of knowing which responses come from which hardware to the consumers.
Any advice on how best to approach this would be welcome.Timothy Jones
05/22/2023, 11:23 PMTimothy Jones
05/23/2023, 12:12 AMso we are using the provider state filter to get all the interactions for the first chip and then publishing the results. We will then run the verification on the other device with the inverse filter so we can get all of the interactions verified.This makes me nervous - how would you check that you have filtered the interactions correctly and not missed any?
Timothy Jones
05/23/2023, 12:15 AMTimothy Jones
05/23/2023, 12:17 AMTimothy Jones
05/23/2023, 12:20 AMBasically, we want to be able to use provider state to know which chip to run the verification against.This is a natural fit for state variables
fromProviderState
but I don't think Pact lets you use those in configurationTimothy Jones
05/23/2023, 12:20 AMAdam Cox
05/23/2023, 8:55 AMWith Pact, I probably would write a script that:
• Runs one chip
• Runs the other chip
• Publishes verification success or failureAre the verification results being written to a file by the pact-standalone-verifier, such that we can combine the results from each chip? I thought the results were being held in memory and just sent up at the end of the process. tbh I haven't looked into the mechanics of the verification result publishing at all yet.
This makes me nervous - how would you check that you have filtered the interactions correctly and not missed any?It is a good question. We thought that if there were partial results then the contract would not be marked as verified until all interactions were green lit and therefore that would allow us to know that all interactions in a contract were verified and we hadn't missed any. Hopefully we will be moving towards a system where the provider has consistent behaviour across all chips that are supported. However this a way off unfortunately and until we have that we are going to have to be diligent in ensuring our tests are covering all the right things.
Srikanth Vemuri
05/25/2023, 1:20 PM--json
option.
The plan is to combine the results from from 2 partial interaction verifiers into one .json file and post to pactflow.
Is there a way to post the .json verifier results to pactflow?Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)