Alexandru Mihai
08/04/2022, 10:31 AMvoid setup {
mockClient instantiation
}
public void pactTest(){
pact for a POST to the client
}
This worked fine untill we implemented service descovery, and due to that, in setup is now an extra GET call to the mock server which generates Unexpected Request error.
Debugging this, I discovered that the pactTest runs just fine, the post request is made after the get one and even if asserts are run and everything is ok, in the end it fails due to that unexpected request error.
My question would be, is there any method to ignore the unexpected request, or to tell mock server how to respond to it, without adding it into the pact file ?
Thanks in advanceMatt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Alexandru Mihai
08/04/2022, 1:35 PMAlexandru Mihai
08/04/2022, 1:42 PMTimothy Jones
08/04/2022, 3:56 PMTimothy Jones
08/04/2022, 4:00 PMAlexandru Mihai
08/04/2022, 6:45 PMTimothy Jones
08/04/2022, 10:29 PM/
Alexandru Mihai
08/05/2022, 7:48 AMAlexandru Mihai
08/05/2022, 7:50 AMTimothy Jones
08/05/2022, 7:51 AMTimothy Jones
08/05/2022, 7:51 AMMatt (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)
Timothy Jones
08/05/2022, 8:07 AMTimothy Jones
08/05/2022, 8:09 AMMatt (pactflow.io / pact-js / pact-go)
How did this get solved for the broker, Matt? From provider state?Because the Ruby app doesn’t support v3, it uses a “Hal relation proxy” - https://github.com/pact-foundation/pact_broker/blob/467780123bd717500f4317b34ade68471d2ff61a/spec/service_consumers/hal_relation_proxy_app.rb#L3-L5
Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)