-
-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mock service's set of interactions is not cleared out when the verification fails. #108
Comments
Thanks @pmacik. I'll take a look a bit later. |
Thanks. Found a workaround: that is to manually clear the mock server when verification failed: |
That'll work - clever! |
I just started to learn Pact, and got the same problem, even nastier. Even when the tests are ok, subsequent tests are failing because previously matched interactions are not removed... So had to put manually (very dirty and hope to find a better solution from pact team)
|
If you're new to Pact, I'd look to get onto the 2.x.x which we'd like to release in Q1 this year. It's stable, and has new features (and this probably should be gone). |
Software versions
go1.11.1 linux/amd64
Expected behaviour
When verification of one endpoint interaction fails I want other tests to be run anyway (not to fail fast).
When I do so I'd expect that I only see failed interactions (expected/unexpected) and that the correct ones pass.
Actual behaviour
It appears, that the set of interactions at mock server is not cleared out, when an interaction verification fails
api-1
in the example.This issues causes to duplicate/multiply "Missing requests" records and fails all the rest tests (even the correct ones
api-2
in the example:Steps to reproduce
Run:
go test -v
with https://gist.github.com/pmacik/6de15aa2a64937419fe54159863fd930Relevent log files
The text was updated successfully, but these errors were encountered: