John Ed Alvinez
07/20/2022, 11:51 AMpact-go
to v2.0.0-beta.14
and updated my consumer test to use Pact V4 such as replacing NewV3Pact()
with NewV4Pact()
.
i understand that Pact V4 adds a `key` field to an interaction and its value seems to be some hash when i looked at its value in the pact generated when i ran my test. i'm guessing the hash is calculated using the description
, provider_states
, request
, response
and pending
fields in https://github.com/pact-foundation/pact-reference/blob/9d30a4411dfab9f0993070ef34d2ea8bf8d28a6d/rust/pact_models/src/v4/synch_http.rs#L397
i ran my consumer test several times without changing the interactions. when i inspected the value of the key
field in the pact file generated, i was surprised to see that its value changes between runs. should its value stay the same instead since the pact didn't change?
the pact broker thinks my consumer published a new pact, but it shouldn't be the case since i just generated again the same pact and published it without changing anything. i've attached a snippet of my simplified setup of the mock provider with interactions in this thread for reference.John Ed Alvinez
07/20/2022, 11:52 AMJohn Ed Alvinez
07/20/2022, 11:55 AMWithRequestPathMatcher()
, the key
field's value in the pact generated stayed the same between runs though.
but this is not an option for me since i need that 3rd argument π
Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
John Ed Alvinez
07/20/2022, 11:22 PMkey
value that's different. everything else is the same πMatt (pactflow.io / pact-js / pact-go)
John Ed Alvinez
07/20/2022, 11:50 PMJohn Ed Alvinez
07/25/2022, 1:10 PMMatt (pactflow.io / pact-js / pact-go)