pact-foundation / pact-mock_service

Provides a mock service for use with Pact
https://pact.io
MIT License
73 stars 69 forks source link

Fixed interaction delete endpoint #64

Closed MattTYXM closed 7 years ago

MattTYXM commented 7 years ago

@bethesque this pull request along with this one are the PR's that resulted from you requesting that I break them up by bug. I am just looking to find out when these may be considered?

bethesque commented 7 years ago

I'm sorry @MattTYXM, it's been so long that I've lost the context of this one. Can you explain it to me again? Where did this keep verified thing come from?

bethesque commented 7 years ago

I apologise for the slowness of my responses. I have just moved house with 13 month old twins and I often don't get a chance to check my emails for days at the moment!

MattTYXM commented 7 years ago

Not a problem, @bethesque. I just wanted to send out a reminder. The root of this one is that when the service is running and we need to test multiple consumers, the endpoint to clear the interactions after they have been verified and the contract has been written was only removing the unverified interactions. This was causing subsequent contracts to be written with the verified interactions from the first consumer.

bethesque commented 7 years ago

Hi MattTYXM,

The way you are using the mock service is not the way it was intended. Each mock service instance is meant to represent one provider. I'm not keen on accepting this because I'm unsure of the consequences. It runs the risk of data leaking between tests. Can you restart your mock service instead?

MattTYXM commented 7 years ago

Ok @bethesque I'll look into refactoring the test runner to run the consumers 1 at a time.

bethesque commented 7 years ago

👍