Pact keeps outdated interactions in contract JSON
See original GitHub issueSee reproduction steps from https://github.com/pkubowicz/pact-merge
I remove an old interaction and define a new one - with a new description, new endpoint, new expected answer. However, the contract JSON on my disk does not reflect what I have in my test - it keeps the removed interaction.
As a workaround, I always clean pact directory to prevent Pact from doing strange things with already existing files:
test {
doFirst {
delete pactOutputDir
}
}
This however has negative performance implications for Gradle, as described in https://github.com/gradle/gradle/issues/6864#issuecomment-423837703
Can this strange ‘merging’ be fixed as a bug, or can I have a system property to disable it?
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Pact keeps outdated interactions in contract JSON #804 - GitHub
I remove an old interaction and define a new one - with a new description, new endpoint, new expected answer. However, the contract...
Read more >Removed old interactions in outputted pact json file
I've managed to get pact contract testing working and it outputs the json file. But it has previous interactions in the json file...
Read more >FAQ | Pact Docs
Maintainability: Pact is "contract by example", and the examples may involve large quantities of JSON. Maintaining the JSON files by hand would ...
Read more >Message Pact - Contract Testing In Event-Driven Applications
Pact works great for interactions between services that follow a request-response pattern, for example when using HTTP. However, not all ...
Read more >@pact-foundation/pact - npm
Implementation of the consumer driven contract library Pact for ... interactions and asynchronous interactions with JSON-formatted payloads.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Version 3.6.5 has been released
Setting the Java system property
pact.writer.overwrite
totrue
will now force overwriting the file.